/* =========================================================
   Satyam Tiwari - AI / LLM / ML Engineer Portfolio
   Light theme · bilingual (EN / 日本語) · animated
   ========================================================= */

:root {
  --bg: #f5f7fe;
  --bg-2: #eef1fc;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --text: #0f1729;
  --heading: #0b1220;
  --muted: #51607a;
  --faint: #8893a7;
  --border: rgba(15, 23, 41, 0.08);
  --border-strong: rgba(15, 23, 41, 0.14);

  --primary: #6d5efc;
  --primary-ink: #4f46e5;
  --violet: #a855f7;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --emerald: #10b981;
  --amber: #f59e0b;

  --grad: linear-gradient(120deg, #6d5efc 0%, #a855f7 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(120deg, rgba(109, 94, 252, .16), rgba(6, 182, 212, .16));

  --shadow-sm: 0 2px 10px rgba(20, 27, 50, .06);
  --shadow: 0 14px 40px rgba(31, 38, 80, .10);
  --shadow-lg: 0 30px 70px rgba(31, 38, 80, .16);
  --glow: 0 0 0 1px rgba(109, 94, 252, .18), 0 18px 50px rgba(109, 94, 252, .28);

  --radius: 20px;
  --radius-sm: 14px;
  --maxw: 1180px;

  --font-head: "Space Grotesk", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

html[lang="ja"] { --font-head: "Space Grotesk", "Noto Sans JP", sans-serif; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(109, 94, 252, .22); color: var(--primary-ink); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- Animated background ---------- */
.bg-aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-aurora span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: float 18s ease-in-out infinite;
}
.bg-aurora .b1 { width: 520px; height: 520px; top: -120px; left: -100px;
  background: radial-gradient(circle, #8b7bff, transparent 65%); }
.bg-aurora .b2 { width: 460px; height: 460px; top: 18%; right: -120px;
  background: radial-gradient(circle, #5ad9ec, transparent 65%); animation-delay: -5s; }
.bg-aurora .b3 { width: 480px; height: 480px; bottom: -140px; left: 30%;
  background: radial-gradient(circle, #f59ad0, transparent 65%); animation-delay: -9s; }
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(15,23,41,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,41,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px,-30px) scale(1.08); }
  66% { transform: translate(-30px,25px) scale(.96); }
}

/* cursor spotlight */
.spotlight {
  position: fixed; width: 360px; height: 360px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(109,94,252,.12), transparent 60%);
  transform: translate(-50%, -50%); pointer-events: none; transition: opacity .4s; opacity: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 96px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--primary-ink);
  background: var(--grad-soft); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 0 4px rgba(109,94,252,.18); }
h2.section-title {
  font-family: var(--font-head); font-weight: 700; line-height: 1.1;
  font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--heading); letter-spacing: -.02em;
}
.section-sub { color: var(--muted); margin-top: 14px; font-size: 1.02rem; }
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .95rem; padding: 13px 24px; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent; transition: transform .25s, box-shadow .25s, background .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: #fff; background: var(--grad); background-size: 180% 180%; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-3px); animation: gradShift 3s linear infinite; }
@keyframes gradShift { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
.btn-ghost { background: var(--surface); color: var(--heading); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: padding .3s, background .3s, box-shadow .3s;
  padding: 18px 0;
}
.nav.scrolled { padding: 10px 0; background: rgba(247, 249, 255, .82);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); box-shadow: 0 1px 0 var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; color: var(--heading); }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 700; box-shadow: var(--glow); font-family: var(--font-head);
}
.brand small { display: block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; color: var(--faint); font-weight: 500; text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  font-size: .92rem; font-weight: 500; color: var(--muted); padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--heading); background: rgba(15,23,41,.04); }
.nav__links a.active { color: var(--primary-ink); background: var(--grad-soft); }
.nav__right { display: flex; align-items: center; gap: 12px; }

/* language toggle */
.lang {
  display: inline-flex; align-items: center; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); position: relative;
}
.lang button {
  position: relative; z-index: 1; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-weight: 600; font-size: .76rem; letter-spacing: .04em;
  padding: 7px 13px; border-radius: 999px; color: var(--muted); transition: color .25s;
  white-space: nowrap;
}
.lang button.on { color: #fff; }
.lang .pill { position: absolute; top: 4px; bottom: 4px; border-radius: 999px; background: var(--grad);
  transition: transform .32s cubic-bezier(.4,0,.2,1), width .32s; z-index: 0; box-shadow: var(--glow); }

.nav__burger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; place-items: center; }
.nav__burger span, .nav__burger span::before, .nav__burger span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--heading); border-radius: 2px; position: relative; transition: .25s; }
.nav__burger span::before { position: absolute; top: -6px; } .nav__burger span::after { position: absolute; top: 6px; }

.scrollbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: var(--grad); }

/* ---------- Hero ---------- */
.hero { padding-top: 150px; padding-bottom: 70px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__status {
  display: inline-flex; align-items: center; gap: 9px; font-size: .85rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); padding: 7px 15px; border-radius: 999px;
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70%{box-shadow:0 0 0 8px rgba(16,185,129,0)} 100%{box-shadow:0 0 0 0 rgba(16,185,129,0)} }

.hero h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.025em; line-height: 1.06;
  font-size: clamp(2.5rem, 6vw, 4.2rem); color: var(--heading); }
.hero h1 .wave { display: inline-block; animation: wave 2.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100%{transform:rotate(0)} 15%{transform:rotate(16deg)} 30%{transform:rotate(-8deg)} 45%{transform:rotate(12deg)} }
.hero__role { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem,3.6vw,2.4rem); margin-top: 6px; min-height: 1.2em; }
.typed { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { display: inline-block; width: 3px; height: 1em; background: var(--primary); margin-left: 4px;
  vertical-align: -2px; animation: blink 1s steps(2) infinite; border-radius: 2px; }
@keyframes blink { 50%{opacity:0} }
.hero__lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 22px 0 14px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.hero__tags span { font-family: var(--font-mono); font-size: .74rem; color: var(--primary-ink);
  border: 1px solid var(--border); background: var(--surface); padding: 6px 11px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__socials { display: flex; gap: 10px; margin-top: 26px; }
.hero__socials a {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); box-shadow: var(--shadow-sm);
  transition: transform .25s, color .25s, border-color .25s; }
.hero__socials a:hover { transform: translateY(-4px); color: var(--primary-ink); border-color: var(--primary); }
.hero__socials svg { width: 19px; height: 19px; }

/* hero portrait */
.hero__art { display: grid; place-items: center; position: relative; }
.portrait { position: relative; width: min(360px, 78vw); aspect-ratio: 1; }
.portrait__ring { position: absolute; inset: -14px; border-radius: 34px; background: var(--grad); background-size: 200% 200%;
  animation: gradShift 6s linear infinite; filter: blur(2px); opacity: .9; }
.portrait__img { position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  border: 5px solid #fff; box-shadow: var(--shadow-lg); }
.portrait__img img { width: 100%; height: 100%; object-fit: cover; }
.chip-float {
  position: absolute; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: .76rem; font-weight: 600; color: var(--heading); background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--border); padding: 9px 13px; border-radius: 12px;
  box-shadow: var(--shadow); animation: bob 5s ease-in-out infinite;
}
.chip-float i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chip-float.c1 { top: 6%; left: -8%; } .chip-float.c1 i { background: var(--primary); }
.chip-float.c2 { top: 40%; right: -14%; animation-delay: -1.5s; } .chip-float.c2 i { background: var(--cyan); }
.chip-float.c3 { bottom: 10%; left: -12%; animation-delay: -3s; } .chip-float.c3 i { background: var(--pink); }
.chip-float.c4 { bottom: -4%; right: 6%; animation-delay: -2.2s; } .chip-float.c4 i { background: var(--emerald); }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.stat { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px 14px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat b { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--heading); display: block; }
.stat b .text-grad { font-size: inherit; }
.stat span { font-size: .82rem; color: var(--muted); }

/* marquee */
.marquee { overflow: hidden; padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: linear-gradient(var(--surface-2), var(--surface-2)); margin-top: 64px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: 46px; width: max-content; animation: scrollx 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--faint);
  display: inline-flex; align-items: center; gap: 46px; white-space: nowrap; }
.marquee__track span::after { content: "✦"; color: var(--primary); font-size: .8rem; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); }
.about p { color: var(--muted); margin-bottom: 16px; }
.about p strong { color: var(--heading); }
.about__list { display: grid; gap: 14px; margin-top: 6px; }
.about__list li { display: flex; gap: 13px; align-items: flex-start; color: var(--muted); }
.about__list .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--primary-ink); }
.about__list .ic svg { width: 18px; height: 18px; }
.about__list b { color: var(--heading); display: block; font-size: .95rem; }
.lang-bars { display: grid; gap: 16px; margin-top: 8px; }
.lang-bars .row { display: flex; flex-direction: column; gap: 6px; }
.lang-bars .row .top { display: flex; justify-content: space-between; font-size: .9rem; }
.lang-bars .top b { color: var(--heading); } .lang-bars .top span { color: var(--faint); font-family: var(--font-mono); font-size: .78rem; }
.bar { height: 8px; border-radius: 999px; background: rgba(15,23,41,.07); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad);
  transition: width 1.4s cubic-bezier(.4,0,.2,1); }

/* ---------- Skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s, border-color .3s; position: relative; overflow: hidden; }
.skill-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); opacity: 0; transition: opacity .3s; }
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.skill-card:hover::before { opacity: 1; }
.skill-card__head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.skill-card__ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--primary-ink); }
.skill-card__ic svg { width: 24px; height: 24px; }
.skill-card h3 { font-family: var(--font-head); font-size: 1.12rem; color: var(--heading); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: .82rem; font-weight: 500; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); padding: 7px 12px; border-radius: 9px; transition: transform .2s, color .2s, border-color .2s, background .2s; }
.chips span:hover { transform: translateY(-3px) scale(1.03); color: var(--primary-ink); border-color: var(--primary); background: #fff; }

/* ---------- Experience timeline ---------- */
.timeline { position: relative; max-width: 920px; margin: 0 auto; padding-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--primary), var(--cyan)); opacity: .4; }
.tl-item { position: relative; padding: 0 0 38px 56px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 9px; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary); box-shadow: 0 0 0 5px rgba(109,94,252,.12); }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s; }
.tl-card:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.tl-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.tl-date { font-family: var(--font-mono); font-size: .74rem; color: #fff; background: var(--grad); padding: 4px 11px; border-radius: 999px; }
.tl-place { font-size: .82rem; color: var(--faint); }
.tl-card h3 { font-family: var(--font-head); font-size: 1.16rem; color: var(--heading); }
.tl-card .role { color: var(--primary-ink); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.tl-sub { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.tl-sub h4 { font-size: .96rem; color: var(--heading); display: flex; gap: 8px; align-items: baseline; }
.tl-sub h4 small { font-family: var(--font-mono); font-size: .68rem; color: var(--faint); font-weight: 500; }
.tl-sub ul { margin-top: 8px; display: grid; gap: 7px; }
.tl-sub li { position: relative; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.tl-sub li::before { content: "▸"; position: absolute; left: 0; color: var(--primary); }
.tl-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tl-stack span { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 9px; border-radius: 7px; }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.filters button { font-size: .86rem; font-weight: 500; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border-strong); padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: .25s; }
.filters button:hover { color: var(--primary-ink); border-color: var(--primary); }
.filters button.active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: var(--glow); }

.projects__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.proj { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .35s, box-shadow .35s, border-color .35s; display: flex; flex-direction: column; }
.proj:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.proj__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.proj__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.proj:hover .proj__media img { transform: scale(1.08); }
.proj__media--cover { display: grid; place-items: center; }
.proj__media--cover::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1.4px, transparent 1.6px);
  background-size: 16px 16px; opacity: .6; }
.proj__media--cover.g1 { background: linear-gradient(135deg, #6d5efc, #a855f7); }
.proj__media--cover.g2 { background: linear-gradient(135deg, #0ea5e9, #6d5efc); }
.proj__media--cover.g3 { background: linear-gradient(135deg, #ec4899, #a855f7); }
.proj__icon { position: relative; z-index: 1; width: 62px; height: 62px; color: #fff;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.25)); transition: transform .5s; }
.proj:hover .proj__icon { transform: scale(1.1) rotate(-4deg); }
.proj__icon svg { width: 100%; height: 100%; }
.proj__badge { position: absolute; bottom: 12px; right: 12px; z-index: 1; font-family: var(--font-mono);
  font-size: .66rem; color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  padding: 4px 9px; border-radius: 7px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.proj__cat { position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: .68rem; color: #fff;
  background: rgba(15,23,41,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 5px 10px; border-radius: 8px; }
.proj__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.proj__body h3 { font-family: var(--font-head); font-size: 1.1rem; color: var(--heading); margin-bottom: 8px; }
.proj__body p { color: var(--muted); font-size: .9rem; flex: 1; }
.proj__stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.proj__stack span { font-family: var(--font-mono); font-size: .68rem; color: var(--primary-ink);
  background: var(--grad-soft); padding: 4px 9px; border-radius: 7px; }
.proj__link { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .88rem; color: var(--primary-ink); }
.proj__link svg { width: 16px; height: 16px; transition: transform .25s; }
.proj:hover .proj__link svg { transform: translate(3px,-3px); }
/* whole-card click target → opens animated flowchart in new tab */
.proj { cursor: pointer; position: relative; }
.proj__stretch { position: absolute; inset: 0; z-index: 4; border-radius: var(--radius); }
.proj__stretch:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- Education & certs ---------- */
.edu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.edu-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.edu-card h3 { font-family: var(--font-head); display: flex; gap: 10px; align-items: center; color: var(--heading); margin-bottom: 18px; font-size: 1.15rem; }
.edu-card h3 svg { width: 22px; height: 22px; color: var(--primary-ink); }
.edu-item { padding: 14px 0; border-bottom: 1px dashed var(--border-strong); }
.edu-item:last-child { border-bottom: none; padding-bottom: 0; }
.edu-item b { color: var(--heading); display: block; }
.edu-item span { color: var(--muted); font-size: .9rem; }
.edu-item .when { font-family: var(--font-mono); font-size: .74rem; color: var(--primary-ink); }
.cert-list { display: grid; gap: 12px; }
.cert-list li { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .92rem; }
.cert-list .badge { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary-ink); }
.cert-list .badge svg { width: 17px; height: 17px; }
.cert-list b { color: var(--heading); }

/* ---------- Contact ---------- */
.contact__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 50px; box-shadow: var(--shadow); text-align: center; position: relative; overflow: hidden; }
.contact__card::before { content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: .5; z-index: 0; }
.contact__inner { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; }
.contact h2 { font-family: var(--font-head); font-size: clamp(1.8rem,4vw,2.6rem); color: var(--heading); margin-bottom: 14px; }
.contact p { color: var(--muted); margin-bottom: 28px; }
.contact__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact__meta { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.contact__meta a, .contact__meta span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; }
.contact__meta svg { width: 17px; height: 17px; color: var(--primary-ink); }

/* ---------- Footer ---------- */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer__socials { display: flex; gap: 10px; }
.footer__socials a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: .25s; }
.footer__socials a:hover { color: var(--primary-ink); border-color: var(--primary); transform: translateY(-3px); }
.footer__socials svg { width: 18px; height: 18px; }
.footer p { color: var(--faint); font-size: .88rem; }

/* back to top */
.totop { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); cursor: pointer;
  opacity: 0; transform: translateY(20px); transition: .3s; border: none; }
.totop.show { opacity: 1; transform: translateY(0); }
.totop svg { width: 20px; height: 20px; }

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

/* ---------- AI neural-net canvas + role badge ---------- */
.hero__net { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: .5; }
.hero__3d { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.hero > .container { position: relative; z-index: 2; }
/* keep the hero text/CTA (and the résumé menu inside it) above the stats row */
.hero > .container.hero__grid { z-index: 5; }
.hero__role-badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary-ink); background: var(--grad-soft); border: 1px solid var(--border);
  padding: 8px 15px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero__role-badge svg { width: 16px; height: 16px; }

/* ---------- résumé dropdown ---------- */
.resume-dd { position: relative; display: inline-flex; }
.resume-dd .dd-caret { width: 15px; height: 15px; transition: transform .25s; }
.resume-dd.open .dd-caret { transform: rotate(180deg); }
.resume-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30;
  min-width: min(300px, 84vw); padding: 8px; display: grid; gap: 3px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top left;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.resume-dd.open .resume-menu { opacity: 1; visibility: visible; transform: none; }
.resume-group {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); padding: 9px 12px 4px;
}
.resume-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.resume-item:hover { background: var(--surface-2); }
.ri-flag {
  flex: none; width: 36px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: .72rem; color: #fff; background: var(--grad);
  box-shadow: var(--shadow-sm);
}
.ri-txt { flex: 1; line-height: 1.3; }
.ri-txt b { display: block; color: var(--heading); font-size: .92rem; }
.ri-txt small { color: var(--muted); font-size: .75rem; }
.ri-go { color: var(--primary-ink); display: grid; place-items: center; }
.ri-go svg { width: 16px; height: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 30px; }
  .hero__art { order: -1; }
  .about__grid, .skills__grid, .edu__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav__links { position: fixed; inset: 0 0 0 auto; width: min(290px, 84vw); flex-direction: column; align-items: stretch;
    gap: 4px; padding: 100px 20px; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(110%);
    transition: transform .35s; border-left: 1px solid var(--border); }
  .nav__links.open { transform: none; }
  .nav__links a { padding: 13px 16px; }
  .nav__burger { display: grid; }
}
@media (max-width: 760px) {
  section { padding: 70px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: 1fr; }
  .contact__card { padding: 34px 22px; }
  .portrait { width: min(280px, 72vw); }
}
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .nav__inner { gap: 10px; }
  .brand { font-size: .96rem; gap: 9px; }
  .brand small { display: none; }
  .brand .logo { width: 34px; height: 34px; border-radius: 10px; }
  .nav__right { gap: 8px; }
  .lang { padding: 3px; }
  .lang button { padding: 6px 10px; font-size: .72rem; }
  .nav__burger { width: 38px; height: 38px; }
  .hero { padding-top: 120px; }
  .hero__cta { width: 100%; }
  .hero__cta > .btn { flex: 1 1 auto; justify-content: center; }
  .hero__cta .resume-dd { flex: 1 1 auto; }
  .resume-dd > .btn { width: 100%; justify-content: center; }
  .resume-menu { left: 50%; transform: translate(-50%, -8px); transform-origin: top center; }
  .resume-dd.open .resume-menu { transform: translateX(-50%); }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
