/* ░░░░░░░░░░ TOKENS ░░░░░░░░░░ */
:root {
  --bg: #fafbfd;
  --bg-tint: #ffffff;
  --surface: #fafbfd;
  --ink: #1c1f26;
  --ink-soft: #4e5664;
  --ink-mute: #8a909c;
  --accent: #0f9d7a;
  --accent-soft: rgba(15, 157, 122, 0.10);
  --accent-glow: rgba(15, 157, 122, 0.28);
  --danger: #d04545;

  /* Neumorphic shadow tokens */
  --sh-light: #ffffff;
  --sh-dark: #c8ccd6;

  /* Elevation presets */
  --shadow-raised: 10px 10px 24px var(--sh-dark);
  --shadow-raised-sm: 6px 6px 14px var(--sh-dark);
  --shadow-pressed: inset 5px 5px 12px var(--sh-dark), inset -5px -5px 12px var(--sh-light);
  --shadow-pressed-sm: inset 3px 3px 7px var(--sh-dark), inset -3px -3px 7px var(--sh-light);
  --shadow-flat: 4px 4px 10px var(--sh-dark);

  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;

  --gap: 24px;
  --gap-lg: 48px;
  --gap-xl: 96px;

  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #1f2330;
  --bg-tint: #232838;
  --surface: #1f2330;
  --ink: #e7ecf5;
  --ink-soft: #aab3c4;
  --ink-mute: #7c8597;
  --sh-light: #2a3042;
  --sh-dark: #14171f;
  --accent: #2bd4a0;
  --accent-soft: rgba(43, 212, 160, 0.14);
  --accent-glow: rgba(43, 212, 160, 0.32);
}

body, .btn, .skill, .project, .card-soft, .card-id, .dock, .dock__item,
.chip, .section__num, .skill__icon, .skill__tag, .callout, .contact__card,
.contact__icon, .tags li, .chips li, .lang li, .job, .job__period {
  transition: background 0.4s var(--ease), color 0.3s var(--ease),
              box-shadow 0.4s var(--ease);
}

/* Theme switch */
/* Language switch */
.lang-switch {
  position: fixed;
  top: 24px;
  right: 96px;
  z-index: 100;
  display: inline-flex;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
}

.lang-switch__btn {
  border: none;
  background: transparent;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  cursor: pointer;
  transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease);
}

.lang-switch__btn:hover { color: var(--ink); }

.lang-switch__btn[aria-pressed="true"] {
  color: var(--accent);
  box-shadow: var(--shadow-pressed-sm);
}

@media (max-width: 640px) {
  .lang-switch {
    top: 16px;
    right: 76px;
    padding: 4px;
  }
  .lang-switch__btn {
    width: 36px;
    height: 40px;
    font-size: 0.68rem;
  }
}

.theme-switch {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
}

.theme-switch__btn {
  border: none;
  background: transparent;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ink-mute);
  cursor: pointer;
  position: relative;
  transition: color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.theme-switch__btn:hover { color: var(--ink); }

[data-theme="dark"] .theme-switch__btn {
  color: var(--accent);
  box-shadow: var(--shadow-pressed-sm);
}

.theme-switch__btn svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}

.theme-switch__btn .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-switch__btn .icon-sun  { opacity: 1; transform: rotate(0) scale(1); }

[data-theme="dark"] .theme-switch__btn .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-switch__btn .icon-moon { opacity: 1; transform: rotate(0) scale(1); }

@media (max-width: 640px) {
  .theme-switch {
    top: 16px;
    right: 16px;
    padding: 4px;
  }
  .theme-switch__btn {
    width: 40px;
    height: 40px;
  }
  .theme-switch__btn svg { width: 18px; height: 18px; }
}

/* ░░░░░░░░░░ BASE ░░░░░░░░░░ */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Make [hidden] attribute reliable across components that override display */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: white; }

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.04em; }
.muted { color: var(--ink-mute); }
.accent { color: var(--accent); }
.accent-bg { background: var(--accent); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ░░░░░░░░░░ DOCK NAV ░░░░░░░░░░ */
.dock {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 6px;
  padding: 8px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
}

.dock__item {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.dock__item svg { width: 20px; height: 20px; }

.dock__item:hover {
  color: var(--ink);
  box-shadow: var(--shadow-pressed-sm);
}

.dock__item.is-active {
  color: var(--accent);
  box-shadow: var(--shadow-pressed-sm);
}

.dock__item:active { transform: translateY(1px); }

/* ░░░░░░░░░░ HERO ░░░░░░░░░░ */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 140px 32px 80px;
  position: relative;
}

.hero__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 64px;
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: var(--shadow-raised);
}

.hero__left,
.hero__right {
  background: transparent;
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
  font-size: 0.84rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: chip-pulse 2.4s ease-in-out infinite;
}

@keyframes chip-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.hero__title {
  margin-top: 28px;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero__sub {
  margin-top: 28px;
  max-width: 52ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.hero__cta {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.96rem;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-raised-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.18s var(--ease), color 0.2s;
  border: none;
}

.btn svg { width: 18px; height: 18px; }

.btn:hover { color: var(--accent); }
.btn:active {
  box-shadow: var(--shadow-pressed-sm);
  transform: translateY(1px);
}

.btn--primary { color: var(--accent); }

.hero__meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 540px;
}

.meta { display: flex; flex-direction: column; gap: 4px; }
.meta__k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.meta__v { font-size: 0.92rem; color: var(--ink); font-weight: 500; }

/* HERO RIGHT — neumorphic id card */
.hero__right { display: grid; place-items: center; }

/* ---- Stage ---- */
.card-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  isolation: isolate;
}

/* Halo glow behind */
.card-halo {
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(43, 212, 160, 0.12), transparent 60%);
  filter: blur(40px);
  z-index: -2;
  opacity: 0.9;
  pointer-events: none;
}

/* Decorative rings */
.card-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--sh-dark);
  pointer-events: none;
  z-index: -1;
}

.card-orbit--1 {
  inset: -28px;
  opacity: 0.45;
}

.card-orbit--2 {
  inset: 22px;
  border-style: dotted;
  opacity: 0.25;
}

/* ---- The Card (flat inside the elevated hero__inner) ---- */
.card-id {
  position: relative;
  width: 100%;
  padding: 0;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  overflow: hidden;
  z-index: 1;
}

.card-id__spotlight,
.card-id__sheen { display: none; }

.card-id__inner {
  position: relative;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transform: translateZ(40px);
  z-index: 2;
}

.card-id__head { display: flex; align-items: center; gap: 16px; }

.card-id__avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.card-id__title strong { display: block; font-size: 1.05rem; font-weight: 600; }
.card-id__title span { font-size: 0.86rem; color: var(--ink-mute); }

.card-id__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sh-dark), transparent);
  opacity: 0.6;
}

.card-id__stats { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.card-id__stats li { display: flex; justify-content: space-between; align-items: center; }
.card-id__k { font-size: 0.84rem; color: var(--ink-mute); }
.card-id__v { font-size: 0.9rem; font-weight: 500; }
.card-id__v b { color: var(--accent); font-weight: 600; }

.card-id__foot { display: flex; justify-content: space-between; align-items: center; color: var(--ink-mute); }
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: chip-pulse 2.4s ease-in-out infinite;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero__scroll svg { width: 16px; height: 16px; animation: bob 2.2s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ░░░░░░░░░░ SECTIONS ░░░░░░░░░░ */
.section { padding: var(--gap-xl) 0; }
.section--last { padding-bottom: 120px; }

.section__head {
  margin-bottom: 64px;
  max-width: 760px;
}

.section__num {
  display: inline-block;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
}

.section__title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

/* ░░░░░░░░░░ ABOUT ░░░░░░░░░░ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.about-grid .card-soft:nth-child(3) {
  grid-column: span 2;
}

.card-soft {
  padding: 36px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-raised);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.card-soft:hover {
  transform: translateY(-3px);
}

.card-soft h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.card-soft p { color: var(--ink-soft); max-width: 60ch; }

.card-soft--accent {
  background: linear-gradient(135deg, var(--bg) 60%, var(--accent-soft));
}

.card-soft--accent h3 { color: var(--accent); }

/* ░░░░░░░░░░ SKILLS ░░░░░░░░░░ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.skill {
  padding: 28px;
  border-radius: var(--r-md);
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.skill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}

.skill__head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.skill__head h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.skill__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--ink-soft);
}

.skill__icon svg { width: 20px; height: 20px; }

.skill__icon--accent { color: var(--accent); }

.skill--feature {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg) 70%, var(--accent-soft));
}

.skill__tag {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-flat);
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 0.2s, box-shadow 0.25s var(--ease);
}

.tags li:hover {
  color: var(--accent);
  box-shadow: var(--shadow-pressed-sm);
}

/* ░░░░░░░░░░ JOB / EXPERIENCE ░░░░░░░░░░ */
.job {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  padding: 48px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-raised);
}

.job__side {
  position: sticky;
  top: 100px;
  align-self: start;
}

.job__company {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.job__role {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.job__period {
  display: inline-block;
  color: var(--ink-mute);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
}

.bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bullets li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
}

.callout {
  margin-top: 28px;
  padding: 26px;
  border-radius: var(--r-md);
  background: var(--bg);
  box-shadow: var(--shadow-pressed);
}

.callout__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.callout__tag {
  margin-left: auto;
  color: var(--accent);
}

.callout p { color: var(--ink-soft); }

/* ░░░░░░░░░░ PROJECTS ░░░░░░░░░░ */
.projects {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
}

.project {
  padding: 36px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.project::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-glow),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  z-index: -1;
}

.project:hover {
  transform: translateY(-4px);
}

.project:hover::after {
  opacity: 1;
}

.project--feature {
  grid-row: span 2;
  background: linear-gradient(160deg, var(--bg) 55%, var(--accent-soft));
  justify-content: space-between;
}

.project--feature .project__title { font-size: 2.6rem; }
.project--feature .project__desc { font-size: 1.05rem; max-width: 38ch; }

.project__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: var(--ink-mute);
}

.project__index { color: var(--accent); }
.project__type { font-size: 0.78rem; }

.project__arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition: color 0.3s var(--ease), box-shadow 0.3s var(--ease),
              transform 0.4s var(--ease);
  flex-shrink: 0;
}

.project__arrow svg { width: 16px; height: 16px; }

.project:hover .project__arrow {
  color: var(--accent);
  transform: rotate(-12deg) scale(1.05);
}

.project:active .project__arrow {
  box-shadow: var(--shadow-pressed-sm);
}

.project__title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.project__desc {
  color: var(--ink-soft);
  font-size: 0.96rem;
  max-width: 58ch;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.chips li {
  padding: 6px 12px;
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--ink-soft);
}

/* ░░░░░░░░░░ TIMELINE (CAREER) ░░░░░░░░░░ */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-left: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 14px;
  width: 2px;
  background: var(--sh-dark);
  border-radius: 2px;
  opacity: 0.35;
}

.timeline__progress {
  position: absolute;
  top: 16px;
  left: 14px;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-soft));
  border-radius: 2px;
  pointer-events: none;
  will-change: height;
  z-index: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.timeline__marker {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-top: 14px;
  z-index: 1;
}

.timeline__dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  position: relative;
}

.timeline__dot--active {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow-flat);
  animation: chip-pulse 2.4s ease-in-out infinite;
}

.timeline__dot--passed {
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-pressed-sm);
}

.timeline__card {
  padding: 36px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline__company {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 4px;
}

.timeline__location {
  font-size: 0.86rem;
  color: var(--ink-mute);
}

.timeline__period {
  color: var(--ink-mute);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  white-space: nowrap;
}

.timeline__intro {
  color: var(--ink-soft);
  font-size: 0.96rem;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--sh-dark);
}

.role {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--sh-dark);
}

.role:last-child { border-bottom: none; padding-bottom: 0; }

.role--current {
  padding-top: 6px;
}

.role__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.role__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.role__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.role__current {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.role__period {
  color: var(--ink-mute);
  font-size: 0.78rem;
}

.role__body {
  color: var(--ink-soft);
  font-size: 0.94rem;
  max-width: 70ch;
}

.role__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.role__tags li {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--ink-soft);
}

/* ░░░░░░░░░░ PROJECT CARD EXTRAS ░░░░░░░░░░ */
.project {
  border: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.project:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-flat);
  color: var(--ink-soft);
}

.store-badge svg {
  width: 12px;
  height: 12px;
}

.press-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ░░░░░░░░░░ PROJECT MODAL ░░░░░░░░░░ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.modal.is-open {
  display: flex;
  animation: modal-fade 0.3s var(--ease);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 25, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .modal__backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-raised), 0 30px 80px rgba(0,0,0,0.25);
  animation: modal-rise 0.45s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: var(--sh-dark) transparent;
}

.modal__panel::-webkit-scrollbar {
  width: 8px;
}
.modal__panel::-webkit-scrollbar-thumb {
  background: var(--sh-dark);
  border-radius: 8px;
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-raised-sm);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  z-index: 2;
}

.modal__close:hover {
  color: var(--accent);
  box-shadow: var(--shadow-pressed-sm);
}

.modal__close svg { width: 20px; height: 20px; }

.modal__head {
  margin-bottom: 32px;
  padding-right: 56px;
}

.modal__type {
  display: inline-block;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.7rem;
}

.modal__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 12px;
}

.modal__tagline {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 60ch;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.modal__section h3.modal__heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
  font-weight: 500;
}

.modal__section p {
  color: var(--ink-soft);
  font-size: 0.96rem;
  max-width: 65ch;
}

.modal__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal__features li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.modal__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal__stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal__stack li {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  color: var(--ink-soft);
}

.modal__press {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--bg) 60%, var(--accent-soft));
  box-shadow: var(--shadow-raised-sm);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.94rem;
  transition: color 0.25s, transform 0.25s var(--ease);
}

.modal__press:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.modal__press svg { width: 16px; height: 16px; }

.modal__foot {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px dashed var(--sh-dark);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.92rem;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-raised-sm);
  transition: box-shadow 0.25s var(--ease), transform 0.18s var(--ease), color 0.2s;
}

.store-btn svg { width: 18px; height: 18px; }

.store-btn:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.store-btn:active {
  box-shadow: var(--shadow-pressed-sm);
  transform: translateY(1px);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .modal { padding: 16px; }
  .modal__panel { padding: 32px 22px; max-height: 94vh; }
  .modal__head { padding-right: 44px; }
  .modal__close { top: 14px; right: 14px; width: 38px; height: 38px; }
}

/* ░░░░░░░░░░ SPLIT (EDU + LANG) ░░░░░░░░░░ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.split__card { display: flex; flex-direction: column; gap: 12px; }

.split__title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.split__sub { color: var(--ink-soft); }
.split__meta { color: var(--ink-mute); margin-top: 6px; }

.lang { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.lang li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-radius: var(--r-sm);
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  font-weight: 500;
}

.lang__level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ░░░░░░░░░░ CONTACT ░░░░░░░░░░ */
.contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.contact__card {
  padding: 32px;
  border-radius: var(--r-lg);
  background: var(--bg);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease), color 0.25s, box-shadow 0.3s var(--ease);
}

.contact__card:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.contact__card:active {
  box-shadow: var(--shadow-pressed);
  transform: translateY(1px);
}

.contact__icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--bg);
  box-shadow: var(--shadow-pressed-sm);
  display: grid;
  place-items: center;
  color: inherit;
  margin-bottom: 8px;
}

.contact__icon svg { width: 22px; height: 22px; }

.contact__k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.contact__v {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

.contact__card:hover .contact__v { color: var(--accent); }

.foot {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px dashed var(--sh-dark);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-mute);
}

/* ░░░░░░░░░░ REVEAL ANIM ░░░░░░░░░░ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .chip__dot, .pulse, .hero__scroll svg {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ░░░░░░░░░░ RESPONSIVE ░░░░░░░░░░ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 56px; padding: 48px; }
  .hero__right { justify-content: flex-start; }
  .card-id { transform: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-grid .card-soft:nth-child(3) { grid-column: span 1; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skill--feature { grid-column: span 2; }

  .job { grid-template-columns: 1fr; gap: 32px; padding: 32px; }
  .job__side { position: static; }

  .timeline__card { padding: 28px; }
  .timeline__head { flex-direction: column; align-items: flex-start; }

  .projects { grid-template-columns: 1fr; }
  .project--feature { grid-row: span 1; }
  .project--feature .project__title { font-size: 2rem; }

  .split { grid-template-columns: 1fr; }

  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 120px 20px 80px; }
  .hero__inner { padding: 32px 22px; gap: 40px; border-radius: var(--r-lg); }
  .section { padding: 72px 0; }
  .section__head { margin-bottom: 48px; }

  .hero__meta { grid-template-columns: 1fr; gap: 16px; }

  .skills-grid { grid-template-columns: 1fr; }
  .skill--feature { grid-column: span 1; }

  .card-soft, .skill, .project, .contact__card { padding: 24px; }
  .job { padding: 24px; }
  .timeline__card { padding: 22px; }
  .timeline { gap: 28px; }
  .timeline__item { grid-template-columns: 32px 1fr; gap: 14px; }
  .timeline::before { left: 8px; }

  .dock {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: none;
    justify-content: space-around;
  }
  .dock__item { width: 40px; height: 40px; }

  .hero__scroll { display: none; }

  .foot { flex-direction: column; align-items: flex-start; }
}
