/* ============================================================
   KISHOR GOSWAMI — PORTFOLIO
   Design system: developer-premium.
   Light engineered paper · ink · blueprint blue · terminal islands.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #F7F8FA;            /* cool paper */
  --bg-2: rgba(228, 234, 244, 0.5);  /* translucent band — lets the ambient gradient through */
  --bg-3: #FCFCFD;          /* raised paper */
  --panel: #FFFFFF;
  --line: #E4E7EE;          /* hairline */
  --line-2: #D2D7E1;
  --ink: #0F1115;           /* cool near-black */
  --muted: #5A6372;
  --faint: #8B94A7;
  --accent: #2563EB;        /* blueprint blue */
  --accent-deep: #1D4ED8;
  --ok: #16A34A;            /* terminal green */
  --blue-wash: rgba(37, 99, 235, 0.07);
  /* terminal / code island palette */
  --t-bg: #0D1117;
  --t-bg-2: #161B22;
  --t-line: #242B36;
  --t-ink: #E6EDF3;
  --t-muted: #8B949E;
  --t-blue: #58A6FF;
  --t-green: #3FB950;
  --t-red: #FF7B72;
  --t-yellow: #D29922;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.05), 0 4px 14px rgba(15, 17, 21, 0.05);
  --shadow-md: 0 2px 4px rgba(15, 17, 21, 0.05), 0 14px 38px rgba(15, 17, 21, 0.09);
  --shadow-lg: 0 4px 8px rgba(15, 17, 21, 0.05), 0 28px 64px rgba(15, 17, 21, 0.14);
  --font-display: "Geist", "Inter", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-swift: cubic-bezier(0.65, 0, 0.35, 1);
  --nav-h: 72px;
  --radius: 14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Ambient tinted washes behind everything — viewport-anchored */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 720px at 88% -10%, rgba(37, 99, 235, 0.085), transparent 60%),
    radial-gradient(950px 680px at -8% 28%, rgba(96, 165, 250, 0.075), transparent 55%),
    radial-gradient(1000px 700px at 60% 115%, rgba(37, 99, 235, 0.06), transparent 60%),
    linear-gradient(168deg, #F9FAFC 0%, #F3F5FA 48%, #EDF1F8 100%);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(37, 99, 235, 0.18); }

/* Subtle scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #CBD2DE; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #B4BdCd; }

/* ---------- Grain (very subtle) ---------- */
.noise {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 3000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(37, 99, 235, 0.45);
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              border-color .35s, background-color .35s;
}
.cursor-ring.is-hover {
  width: 56px; height: 56px;
  border-color: rgba(37, 99, 235, 0.8);
  background: rgba(37, 99, 235, 0.05);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Page transition curtains ---------- */
.pt { position: fixed; inset: 0; z-index: 4000; display: flex; pointer-events: none; }
.pt__panel {
  flex: 1;
  background: #0F1115;
  transform: scaleY(0);
  transform-origin: top;
}
.pt__panel:nth-child(2) { background: #171B22; }
.pt__panel:nth-child(3) { background: #0F1115; }
body.is-leaving .pt { pointer-events: all; }
body.is-leaving .pt__panel {
  animation: curtainIn .55s var(--ease-swift) forwards;
}
body.is-leaving .pt__panel:nth-child(2) { animation-delay: .07s; }
body.is-leaving .pt__panel:nth-child(3) { animation-delay: .14s; }
@keyframes curtainIn { to { transform: scaleY(1); } }

body.is-entering .pt__panel {
  transform: scaleY(1);
  transform-origin: bottom;
  animation: curtainOut .65s var(--ease-swift) forwards;
}
body.is-entering .pt__panel:nth-child(2) { animation-delay: .07s; }
body.is-entering .pt__panel:nth-child(3) { animation-delay: .14s; }
@keyframes curtainOut { to { transform: scaleY(0); } }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  z-index: 1500;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--accent);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background .4s, border-color .4s, box-shadow .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(247, 248, 250, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: 1240px; height: 100%;
  margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  position: relative;
  font-family: var(--font-display);
  font-weight: 650; font-size: 19px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
}
.nav__logo::after {
  content: "";
  position: absolute;
  inset: -12px -16px;
}
.nav__logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600; color: #fff;
}
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__link {
  position: relative;
  padding: 9px 15px;
  font-size: 14.5px; font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color .3s, background .3s;
}
.nav__link:hover { color: var(--ink); background: rgba(15, 17, 21, 0.04); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: "";
  position: absolute; left: 15px; right: 15px; bottom: 3px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
}
.nav__cta {
  margin-left: 14px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  transition: background .3s, transform .3s var(--ease-out), box-shadow .3s;
}
.nav__cta:hover { background: #23272F; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  position: relative;
}
.nav__burger::after {
  content: "";
  position: absolute;
  top: -15px; right: -15px; bottom: -15px; left: -15px;
}
.nav__burger span {
  display: block; width: 24px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease-swift), opacity .3s;
}
/* Attention nudge — cursor "click" + pulsing ring + wiggle until the menu is first opened.
   burger-pulse and cursor-click share one 3.5s cycle: the ripple fires at 10%,
   the exact moment the cursor presses down. */
@keyframes burger-pulse {
  0%, 10% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
  44%     { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
  100%    { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
}
@keyframes burger-wiggle {
  0%, 84%, 100% { transform: rotate(0); }
  87% { transform: rotate(9deg); }
  90% { transform: rotate(-8deg); }
  93% { transform: rotate(6deg); }
  96% { transform: rotate(-4deg); }
  98% { transform: rotate(2deg); }
}
.nav:not(.is-open) .nav__burger.is-nudging {
  border-radius: 50%;
  animation:
    burger-pulse 3.5s var(--ease-out) infinite,
    burger-wiggle 7s ease-in-out infinite;
}
.nav:not(.is-open) .nav__burger.is-nudging span {
  background: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .nav__burger.is-nudging { animation: none; }
}
/* Cursor click hint — drops in from the top, presses the burger (ripple fires),
   then vanishes. Sits on the right half since the pointer tip aims up-left. */
.nav-click {
  position: absolute;
  left: 50%; top: 50%;
  width: 26px; height: auto;
  margin: -4px 0 0 -3px; /* pointer tip lands on the burger's center */
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  will-change: transform, opacity;
}
.nav__burger.is-nudging .nav-click { animation: cursor-click 3.5s ease-in-out infinite; }
@keyframes cursor-click {
  /* drop in from above */
  0%   { opacity: 0; transform: translate(6px, -30px) scale(0.9); }
  7%   { opacity: 1; transform: translate(0, 0) scale(1); }
  /* press down — the ripple starts here (10% of burger-pulse) */
  10%  { transform: translate(1px, 1px) scale(0.8); }
  15%  { transform: translate(0, 0) scale(1); }
  /* linger a beat, then vanish upward */
  24%  { opacity: 1; transform: translate(0, 0) scale(1); }
  33%  { opacity: 0; transform: translate(5px, -22px) scale(0.85); }
  100% { opacity: 0; transform: translate(5px, -22px) scale(0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-click { display: none; }
}
@media (max-width: 960px) {
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 20px 24px 28px;
    background: rgba(250, 251, 252, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .45s var(--ease-swift), opacity .35s;
  }
  .nav.is-open .nav__links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__link { padding: 14px 16px; font-size: 17px; }
  .nav__cta { margin: 10px 16px 0; text-align: center; }
  .nav__burger { display: flex; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px;
  border-radius: 11px;
  font-weight: 600; font-size: 15px;
  transition: transform .35s var(--ease-out), box-shadow .35s, background .35s, border-color .35s, color .35s;
  will-change: transform;
}
.btn--primary {
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: #23272F; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn--ghost {
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: var(--panel);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--blue-wash); transform: translateY(-3px); }
.btn .arr { transition: transform .35s var(--ease-out); }
.btn:hover .arr { transform: translateX(5px); }

/* ---------- Layout helpers ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.section { position: relative; padding: 130px 0; }
.section--tight { padding: 90px 0; }
.section__head { margin-bottom: 64px; max-width: 780px; }
.section__index {
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
  text-transform: lowercase;
}
.section__index::before {
  content: "//";
  color: var(--faint);
  font-weight: 400;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 650;
  line-height: 1.06; letter-spacing: -0.03em;
}
.section__title em {
  font-style: normal;
  color: var(--accent);
  background: linear-gradient(transparent 68%, var(--blue-wash) 0);
  padding: 0 0.06em;
}
.section__desc { margin-top: 22px; color: var(--muted); font-size: 17.5px; max-width: 640px; }

/* Huge outlined background word (parallax decoration) */
.bg-word {
  position: absolute;
  top: 40px; left: 50%;
  font-family: var(--font-display);
  font-size: clamp(110px, 18vw, 260px);
  font-weight: 700; letter-spacing: -0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(15, 17, 21, 0.06);
  pointer-events: none; user-select: none;
  z-index: 0;
  transform: translateX(-50%);
}

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-52px); }
[data-reveal="right"] { transform: translateX(52px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 800px) {
  [data-reveal="left"],
  [data-reveal="right"] {
    transform: translateY(30px);
  }
}

/* ============================================================
   TERMINAL / CODE ISLANDS (shared)
   ============================================================ */
.term {
  border-radius: 12px;
  background: var(--t-bg);
  border: 1px solid var(--t-line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: left;
}
.term__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  background: var(--t-bg-2);
  border-bottom: 1px solid var(--t-line);
}
.term__dot { width: 10px; height: 10px; border-radius: 50%; }
.term__dot--r { background: #FF5F56; }
.term__dot--y { background: #FFBD2E; }
.term__dot--g { background: #27C93F; }
.term__title {
  margin-left: 8px;
  color: var(--t-muted);
  font-size: 11px; letter-spacing: 0.06em;
}
.term__body {
  padding: 18px 20px 20px;
  color: var(--t-ink);
  line-height: 2.05;
}
.term__line { white-space: pre-wrap; min-height: 1em; }
.term__line .p { color: var(--t-blue); }
.term__line .cmd { color: var(--t-ink); }
.term__line .ok { color: var(--t-green); }
.term__line .dim { color: var(--t-muted); }
.term__line .hl { color: var(--t-blue); }
.term__line .warn { color: var(--t-yellow); }
.caret {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--t-blue);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: clip;
  padding: calc(var(--nav-h) + 50px) 0 90px;
  /* dot-matrix drafting grid */
  background-image: radial-gradient(rgba(15, 17, 21, 0.075) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
#particles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }

/* Soft atmospheric washes — parallax layers */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}
.orb--1 {
  width: 560px; height: 560px;
  top: -14%; right: -8%;
  background: radial-gradient(circle at 35% 35%, rgba(37, 99, 235, 0.13), transparent 65%);
  animation: drift1 16s ease-in-out infinite alternate;
}
.orb--2 {
  width: 460px; height: 460px;
  bottom: -12%; left: -10%;
  background: radial-gradient(circle at 60% 40%, rgba(15, 17, 21, 0.07), transparent 65%);
  animation: drift2 19s ease-in-out infinite alternate;
}
.orb--3 {
  width: 320px; height: 320px;
  top: 44%; left: 58%;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.08), transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate-reverse;
}
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-50px, 44px) scale(1.08); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(56px, -38px) scale(1.05); } }

/* Blueprint perspective grid floor */
.grid-plane {
  position: absolute;
  left: 50%; bottom: -6%;
  width: 190%; height: 55%;
  transform: translateX(-50%) perspective(700px) rotateX(64deg);
  transform-origin: center bottom;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 48%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 48%, #000 82%, transparent 100%);
  animation: gridScroll 4s linear infinite;
}
@keyframes gridScroll { from { background-position: 0 0; } to { background-position: 0 56px; } }

.hero__content {
  position: relative; z-index: 2; width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.hero__side { position: relative; }
.hero__side .term {
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (max-width: 1080px) {
  .hero__content { grid-template-columns: 1fr; gap: 56px; }
  .hero__side { max-width: 560px; }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}
.hero__eyebrow b { color: var(--accent); font-weight: 600; }
.hero__eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 11px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 700;
  line-height: 1.03; letter-spacing: -0.035em;
}
.hero__title .grad { color: var(--accent); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(112%);
  animation: lineUp 1s var(--ease-out) forwards;
}
.hero__title .line:nth-child(2) > span { animation-delay: .12s; }
.hero__title .line:nth-child(3) > span { animation-delay: .24s; }
@keyframes lineUp { to { transform: translateY(0); } }

/* Rotating word */
.word-rotator {
  display: inline-grid;
  vertical-align: top;
  overflow: hidden;
  position: relative;
}
.word-rotator span {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(105%) rotateX(-42deg);
  transition: transform .6s var(--ease-swift), opacity .45s;
  color: var(--accent);
  white-space: nowrap;
}
.word-rotator span.is-on { opacity: 1; transform: translateY(0) rotateX(0); }
.word-rotator span.is-off { opacity: 0; transform: translateY(-105%) rotateX(42deg); }

.hero__sub {
  margin-top: 30px;
  font-size: clamp(16px, 1.5vw, 18.5px);
  color: var(--muted);
  max-width: 560px;
}
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__cta { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero__scroll {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--faint);
}
.hero__scroll .wheel {
  width: 24px; height: 38px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  position: relative;
  background: var(--panel);
}
.hero__scroll .wheel::after {
  content: "";
  position: absolute; top: 7px; left: 50%;
  width: 3px; height: 8px; border-radius: 3px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 12px); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: clip;
  background: var(--panel);
}
.marquee__track {
  display: flex; gap: 52px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee__item {
  display: flex; align-items: center; gap: 52px;
  font-family: var(--font-mono);
  font-size: 14.5px; font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.marquee__item::after { content: "/"; color: var(--accent); opacity: 0.5; }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat {
  background: var(--panel);
  padding: 42px 34px;
  transition: background .4s;
}
.stat:hover { background: var(--bg-3); }
.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.stat__num span { color: var(--accent); }
.stat__label { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Edge / dual-identity panel ---------- */
.edge {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px;
  position: relative; z-index: 1;
}
.edge__card {
  position: relative;
  padding: 44px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
  transition: box-shadow .4s, transform .4s var(--ease-out), border-color .4s;
}
.edge__card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--line-2);
}
.edge__card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, 0.06), transparent 42%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.edge__card:hover::before { opacity: 1; }
.edge__num {
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 500;
  color: var(--accent); letter-spacing: 0.06em;
}
.edge__card h3 {
  font-family: var(--font-display);
  font-size: 25px; font-weight: 650; letter-spacing: -0.02em;
  margin: 16px 0 14px;
}
.edge__card p { color: var(--muted); font-size: 15.5px; }
.edge--quad { grid-template-columns: repeat(4, 1fr); }
.edge--quad .edge__card { padding: 36px 30px; }
.edge__join { grid-column: 1 / -1; min-width: 0; }
@media (max-width: 1080px) { .edge--quad { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) {
  .edge, .edge--quad { grid-template-columns: 1fr; }
  .edge__card { padding: 30px 20px; }
}

/* Git-diff panel */
.diff {
  font-family: var(--font-mono);
  font-size: clamp(12.5px, 1.6vw, 15px);
  line-height: 2.1;
  background: var(--t-bg);
  border: 1px solid var(--t-line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 26px 30px;
  overflow-x: auto;
  color: var(--t-muted);
  max-width: 100%;
}
@media (max-width: 800px) {
  .diff { padding: 20px 16px; }
}
.diff .del { color: var(--t-red); display: block; }
.diff .del::before { content: "- "; opacity: 0.6; }
.diff .add { color: var(--t-green); display: block; }
.diff .add::before { content: "+ "; opacity: 0.6; }
.diff .cmt { color: var(--t-muted); display: block; }

/* ---------- Tilt cards (featured work) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  position: relative; z-index: 1;
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 40px 38px;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color .4s, box-shadow .4s;
}
.card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow-lg);
}
.card__glare {
  position: absolute; inset: 0;
  background: radial-gradient(480px circle at var(--gx, 50%) var(--gy, 50%), rgba(37, 99, 235, 0.06), transparent 45%);
  opacity: 0; transition: opacity .35s;
  pointer-events: none;
}
.card:hover .card__glare { opacity: 1; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.card__tag {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: lowercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 7px;
  background: var(--blue-wash);
}
.card__year { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); }
.card__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 28px);
  font-weight: 650; letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 26px 0 12px;
  transform: translateZ(34px);
}
.card__desc { color: var(--muted); font-size: 15.5px; flex: 1; transform: translateZ(22px); }
.card__meta {
  margin-top: 28px;
  display: flex; align-items: center; justify-content: space-between;
  transform: translateZ(26px);
}
.card__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 500;
  color: var(--muted);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  transition: color .3s, border-color .3s;
}
.card:hover .chip { color: var(--ink); border-color: var(--line-2); }
.card__arrow {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 17px;
  color: var(--ink);
  transition: background .35s, transform .45s var(--ease-out), border-color .35s, color .35s;
}
.card:hover .card__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}
@media (max-width: 800px) {
  .cards { grid-template-columns: 1fr; }
  .card { padding: 30px 20px; min-height: auto; }
}

/* ============================================================
   WORK PAGE — case studies
   ============================================================ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 110px) 0 80px;
  overflow: clip;
  background-image: radial-gradient(rgba(15, 17, 21, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.02; letter-spacing: -0.035em;
}
.page-hero__title em {
  font-style: normal;
  color: var(--accent);
  background: linear-gradient(transparent 68%, var(--blue-wash) 0);
  padding: 0 0.06em;
}
.page-hero__sub { margin-top: 28px; color: var(--muted); font-size: 18px; max-width: 660px; }

.cs {
  position: relative;
  scroll-margin-top: 90px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 90px 0;
  border-top: 1px solid var(--line);
}
.cs:nth-of-type(even) .cs__media { order: 2; }
.cs__kicker {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.cs__num {
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 500;
  color: var(--faint); letter-spacing: 0.08em;
}
.role-badge {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: lowercase;
  padding: 6px 13px;
  border-radius: 7px;
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.3);
  background: var(--blue-wash);
}
.cs__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 650;
  letter-spacing: -0.025em; line-height: 1.12;
}
.cs__body p { margin-top: 18px; color: var(--muted); font-size: 16.5px; }
.cs__body p strong { color: var(--ink); font-weight: 600; }
.cs__points { margin-top: 22px; list-style: none; display: grid; gap: 13px; }
.cs__points li {
  position: relative;
  padding-left: 30px;
  color: var(--muted); font-size: 15.5px;
}
.cs__points li::before {
  content: "→";
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}
.cs__points li b { color: var(--ink); font-weight: 600; }
.tech-chips { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 9px; }

/* Flow diagram panel — dark terminal island */
.cs__media { position: relative; }
.flow-panel {
  position: relative;
  padding: 34px 30px;
  border: 1px solid var(--t-line);
  border-radius: 14px;
  background: var(--t-bg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  will-change: transform;
}
.flow-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}
.flow-panel__label {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: lowercase;
  color: var(--t-muted);
  margin-bottom: 26px;
  display: flex; align-items: center; gap: 10px;
}
.flow-panel__label::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: #FF5F56;
  box-shadow: 16px 0 0 #FFBD2E, 32px 0 0 #27C93F;
  margin-right: 34px;
}
.flow { display: grid; gap: 11px; position: relative; }
.flow__node {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  font-family: var(--font-mono);
  font-size: 12.5px;
  transition: transform .35s var(--ease-out), border-color .35s, background .35s;
}
.flow__node:hover {
  transform: translateX(8px);
  border-color: var(--t-blue);
  background: rgba(88, 166, 255, 0.07);
}
.flow__node .dot {
  flex-shrink: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.flow__node.is-ai .dot { background: var(--t-green); box-shadow: 0 0 10px rgba(63, 185, 80, 0.6); }
.flow__node .lbl { color: var(--t-ink); }
.flow__node .sub { margin-left: auto; color: var(--t-muted); font-size: 9.5px; letter-spacing: 0.08em; }
.flow__arrow {
  text-align: center;
  color: var(--t-blue);
  font-size: 13px;
  line-height: 0.6;
  animation: flowPulse 2.2s ease-in-out infinite;
}
@keyframes flowPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.9; } }
@media (max-width: 940px) {
  .cs { grid-template-columns: 1fr; gap: 44px; padding: 70px 0; }
  .cs:nth-of-type(even) .cs__media { order: 0; }
}

/* Impact strip inside dark flow panel */
.impact {
  margin-top: 26px;
  display: flex; gap: 14px; flex-wrap: wrap;
  position: relative;
}
.impact__item {
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.impact__val {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600;
  color: var(--t-green);
}
.impact__lbl { font-size: 11.5px; color: var(--t-muted); margin-top: 2px; font-family: var(--font-mono); }

/* R&D grid */
.rd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.rd-item {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 15px; font-weight: 500;
  display: flex; align-items: center; gap: 13px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s;
}
.rd-item:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow-md);
}
.rd-item .ico { font-size: 19px; }

/* ============================================================
   PROJECTS PAGE — timeline
   ============================================================ */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 60px;
}
.filter-btn {
  font-family: var(--font-mono);
  padding: 10px 20px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  transition: all .3s;
}
.filter-btn:hover { color: var(--ink); border-color: var(--line-2); }
.filter-btn.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 7px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-2), rgba(210, 215, 225, 0.15));
}
.t-year {
  position: relative;
  padding-left: 44px;
  margin: 64px 0 30px;
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700;
  letter-spacing: -0.02em;
}
.t-year:first-child { margin-top: 0; }
.t-year::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  transform: translateY(-50%);
}
.t-year .t-count {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--faint); font-weight: 400; margin-left: 12px; letter-spacing: 0.02em;
}
.t-year.is-hidden { display: none; }

.project-card {
  position: relative;
  margin: 0 0 22px 44px;
  padding: 34px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: border-color .4s, box-shadow .4s;
  will-change: transform;
  overflow: hidden;
}
.project-card::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .4s;
}
.project-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-lg);
}
.project-card:hover::after { opacity: 1; }
.project-card.is-hidden { display: none; }
.p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.p-title {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 650; letter-spacing: -0.02em;
}
.p-title .flag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 12px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: lowercase;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
}
.p-date {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--faint); white-space: nowrap; padding-top: 8px;
}
.p-desc { margin-top: 14px; color: var(--muted); font-size: 15.5px; max-width: 760px; }
.p-desc b { color: var(--ink); font-weight: 600; }
.p-foot {
  margin-top: 24px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.p-links { display: flex; flex-wrap: wrap; gap: 10px; }
.gh-link {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  padding: 10px 16px;
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--panel);
  transition: all .3s var(--ease-out);
}
.gh-link svg { width: 15px; height: 15px; fill: currentColor; }
.gh-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 70px;
  align-items: center;
}
/* Code editor card */
.about-portrait {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--t-line);
  background: var(--t-bg);
  box-shadow: var(--shadow-lg);
  will-change: transform;
  font-family: var(--font-mono);
}
.about-portrait .term__bar { border-radius: 0; }
.code-block {
  padding: 24px 22px 28px;
  font-size: 13px;
  line-height: 2.05;
  color: var(--t-ink);
  overflow-x: auto;
  counter-reset: ln;
}
.code-block .ln {
  display: block;
  white-space: pre;
}
.code-block .ln::before {
  counter-increment: ln;
  content: counter(ln);
  display: inline-block;
  width: 2ch;
  margin-right: 18px;
  color: rgba(139, 148, 158, 0.45);
  text-align: right;
}
.code-block .k { color: var(--t-blue); }      /* key */
.code-block .s { color: #A5D6FF; }            /* string */
.code-block .v { color: var(--t-green); }     /* value/special */
.code-block .pn { color: var(--t-muted); }    /* punctuation */
.about-copy p { margin-top: 20px; color: var(--muted); font-size: 17px; }
.about-copy p strong { color: var(--ink); font-weight: 600; }
.about-copy p:first-of-type { font-size: 19px; }
@media (max-width: 940px) { .about-hero { grid-template-columns: 1fr; gap: 50px; } }

.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skill-group {
  padding: 38px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.skill-group:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.skill-group h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 650;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.skill-group h3 .ico {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--blue-wash);
  border: 1px solid rgba(37, 99, 235, 0.25);
  display: grid; place-items: center;
  font-size: 16px;
}
.skill-group ul { list-style: none; display: grid; gap: 11px; }
.skill-group li {
  color: var(--muted); font-size: 14.5px;
  padding-left: 22px; position: relative;
}
.skill-group li::before {
  content: "▸";
  position: absolute; left: 0;
  font-size: 11px; top: 1px;
  color: var(--accent);
  font-family: var(--font-mono);
}
@media (max-width: 900px) { .skill-groups { grid-template-columns: 1fr; } }

.cred-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cred {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: border-color .35s, box-shadow .35s, transform .35s var(--ease-out);
}
.cred:hover { border-color: rgba(37, 99, 235, 0.4); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cred__ico {
  flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-wash);
  border: 1px solid rgba(37, 99, 235, 0.25);
  display: grid; place-items: center;
  font-size: 20px;
}
.cred h4 { font-family: var(--font-display); font-size: 17.5px; font-weight: 650; letter-spacing: -0.01em; }
.cred p { color: var(--muted); font-size: 14px; margin-top: 5px; }
@media (max-width: 760px) { .cred-row { grid-template-columns: 1fr; } }

/* ---------- Award & certification cards (attention variants) ---------- */
.cred--award, .cred--cert {
  position: relative;
  overflow: hidden;
}
.cred--award .cred__ico, .cred--cert .cred__ico { position: relative; }

/* Corner tag */
.cred--award::before, .cred--cert::before {
  content: attr(data-ribbon);
  position: absolute; top: 14px; right: 14px;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 6px;
  z-index: 2;
}
.cred--award::before {
  color: #7A5A0E;
  background: linear-gradient(135deg, #FBE7A8, #F2C94C);
  box-shadow: 0 2px 8px rgba(212, 164, 54, 0.4);
}
.cred--cert::before {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Light sweep across the card */
.cred--award::after, .cred--cert::after {
  content: "";
  position: absolute; top: -60%; bottom: -60%;
  width: 42%; left: -70%;
  transform: rotate(10deg);
  pointer-events: none;
  animation: shineSweep 4.4s ease-in-out infinite;
}
.cred--award::after {
  background: linear-gradient(105deg, transparent, rgba(242, 201, 76, 0.28), transparent);
}
.cred--cert::after {
  background: linear-gradient(105deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  animation-duration: 5.8s;
  animation-delay: 1.2s;
}
@keyframes shineSweep {
  0% { left: -70%; }
  38% { left: 135%; }
  100% { left: 135%; }
}

/* — Winner card: gold treatment — */
.cred--award {
  border-color: rgba(212, 164, 54, 0.5);
  background: linear-gradient(140deg, #FFFFFF 30%, #FFF7E2 100%);
  animation: awardGlow 3.6s ease-in-out infinite;
}
.cred--award:hover { border-color: rgba(212, 164, 54, 0.8); }
@keyframes awardGlow {
  0%, 100% { box-shadow: var(--shadow-sm); }
  50% { box-shadow: var(--shadow-sm), 0 0 30px rgba(226, 178, 61, 0.35); }
}
.cred--award .cred__ico {
  background: linear-gradient(135deg, #F9D976, #EDAE1F);
  border-color: rgba(212, 164, 54, 0.6);
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(212, 164, 54, 0.45);
}
.cred--award.is-in .cred__ico {
  animation:
    stampIn .75s var(--ease-out) both,
    trophyBob 3.4s ease-in-out .9s infinite;
}
@keyframes stampIn {
  0% { transform: scale(2.6) rotate(-28deg); opacity: 0; }
  55% { transform: scale(0.9) rotate(5deg); opacity: 1; }
  75% { transform: scale(1.08) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes trophyBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}
/* twinkling sparks around the trophy */
.cred--award .cred__ico::before,
.cred--award .cred__ico::after {
  content: "✦";
  position: absolute;
  color: #E2A93B;
  animation: twinkle 2.2s ease-in-out infinite;
  pointer-events: none;
}
.cred--award .cred__ico::before { top: -12px; right: -10px; font-size: 12px; }
.cred--award .cred__ico::after { bottom: -10px; left: -11px; font-size: 9px; animation-delay: 1.1s; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(90deg); }
}

/* — Certification cards: floating badge + sonar ring — */
.cred--cert { border-color: rgba(37, 99, 235, 0.3); }
.cred--cert .cred__ico {
  animation: certFloat 3.8s ease-in-out infinite;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}
.cred--cert:nth-child(odd) .cred__ico { animation-delay: .9s; }
@keyframes certFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-6px) rotate(-3deg); }
  65% { transform: translateY(-2px) rotate(2.5deg); }
}
.cred--cert .cred__ico::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(37, 99, 235, 0.55);
  animation: ringPulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes ringPulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* Confetti (spawned by JS on the winner card) */
.confetti {
  position: absolute;
  top: -12px;
  width: 6px; height: 11px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  animation: confettiFall 1.6s ease-in forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(150px) rotate(480deg); }
}

/* ---------- Contact / CTA footer — dark island ---------- */
.cta-footer {
  position: relative;
  padding: 150px 0 130px;
  text-align: center;
  overflow: clip;
  background: var(--t-bg);
  border-top: 1px solid var(--t-line);
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
}
.cta-footer .orb--1 {
  top: auto; bottom: -30%; right: 8%; opacity: 0.8;
  background: radial-gradient(circle at 35% 35%, rgba(37, 99, 235, 0.22), transparent 65%);
}
.cta-footer .orb--2 {
  bottom: auto; top: -20%; left: 4%; opacity: 0.7;
  background: radial-gradient(circle at 60% 40%, rgba(88, 166, 255, 0.14), transparent 65%);
}
.cta-footer__kicker {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--t-blue);
  margin-bottom: 26px;
}
.cta-footer__kicker::before { content: "// "; color: var(--t-muted); }
.cta-footer__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 84px);
  font-weight: 700;
  line-height: 1.04; letter-spacing: -0.035em;
  position: relative; z-index: 1;
  color: #fff;
}
.cta-footer__title em {
  font-style: normal;
  color: var(--t-blue);
}
.cta-footer__actions {
  margin-top: 48px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 16px;
  position: relative; z-index: 1;
}
.cta-footer .btn--primary { background: #fff; color: var(--ink); }
.cta-footer .btn--primary:hover { background: #E8EDF6; }
.cta-footer .btn--ghost {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--t-ink);
  background: rgba(255, 255, 255, 0.04);
}
.cta-footer .btn--ghost:hover { border-color: var(--t-blue); color: var(--t-blue); background: rgba(88, 166, 255, 0.08); }

.footer {
  border-top: 1px solid var(--t-line);
  padding: 32px 0;
  background: #0B0D11;
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 13.5px; color: var(--t-muted);
}
.footer__links { display: flex; gap: 26px; }
.footer__links a { color: var(--t-muted); transition: color .3s; }
.footer__links a:hover { color: var(--t-blue); }

/* ---------- 404 ---------- */
.err-page {
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  position: relative;
  overflow: clip;
  background-image: radial-gradient(rgba(15, 17, 21, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
}
.err-code {
  font-family: var(--font-mono);
  font-size: clamp(110px, 24vw, 280px);
  font-weight: 600; line-height: 1;
  letter-spacing: -0.06em;
  color: var(--ink);
}
.err-code::after { content: "_"; color: var(--accent); animation: blink 1.1s steps(1) infinite; }

/* ============================================================
   ACHIEVEMENTS PAGE
   ============================================================ */

/* --- Featured winner card — pairs with .cred--award for the gold
       treatment, ribbon, light sweep and JS confetti --- */
.honor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 52px;
  align-items: center;
  padding: 58px 56px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.honor__kicker {
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #A87B14;
  margin-bottom: 16px;
}
.honor__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.1;
}
.honor__title em {
  font-style: normal;
  color: #B8860B;
  background: linear-gradient(transparent 68%, rgba(242, 201, 76, 0.28) 0);
  padding: 0 0.06em;
}
.honor__desc { margin-top: 18px; color: var(--muted); font-size: 16.5px; max-width: 620px; }
.honor__desc strong { color: var(--ink); font-weight: 600; }
.honor__meta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 9px; }
.honor__cta { margin-top: 32px; }

/* medal + spinning orbit */
.honor__medal-wrap {
  position: relative;
  width: 216px; height: 216px;
  display: grid; place-items: center;
  margin: 0 auto;
}
.honor__orbit {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px dashed rgba(212, 164, 54, 0.55);
  animation: orbitSpin 16s linear infinite;
}
.honor__orbit::before {
  content: "✦";
  position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%);
  color: #E2A93B; font-size: 15px;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.honor .cred__ico {
  width: 138px; height: 138px;
  border-radius: 34px;
  font-size: 58px;
}
.honor .cred__ico::before { font-size: 18px; top: -18px; right: -16px; }
.honor .cred__ico::after { font-size: 14px; bottom: -16px; left: -18px; }
@media (max-width: 800px) {
  .honor { grid-template-columns: 1fr; gap: 38px; padding: 44px 28px; }
  .honor__medal-wrap { order: -1; width: 180px; height: 180px; }
  .honor .cred__ico { width: 112px; height: 112px; font-size: 46px; border-radius: 28px; }
}

/* --- Certification cards --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.cert-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 38px 36px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s, border-color .4s;
}
.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
/* blue light sweep, staggered per card via --sweep */
.cert-card::after {
  content: "";
  position: absolute; top: -60%; bottom: -60%;
  width: 42%; left: -70%;
  transform: rotate(10deg);
  background: linear-gradient(105deg, transparent, rgba(37, 99, 235, 0.09), transparent);
  animation: shineSweep 5.6s ease-in-out infinite;
  animation-delay: var(--sweep, 0s);
  pointer-events: none;
}
.cert-card__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}
.cert-card__ico {
  position: relative;
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--blue-wash);
  border: 1px solid rgba(37, 99, 235, 0.25);
  display: grid; place-items: center;
  font-size: 23px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
  animation: certFloat 3.8s ease-in-out infinite;
  animation-delay: var(--float, 0s);
}
.cert-card__ico::after {
  content: "";
  position: absolute; inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(37, 99, 235, 0.5);
  animation: ringPulse 2.6s ease-out infinite;
  animation-delay: var(--float, 0s);
  pointer-events: none;
}
.cert-card__badge {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  white-space: nowrap;
}
.cert-card__badge--gold {
  color: #7A5A0E;
  background: linear-gradient(135deg, #FBE7A8, #F2C94C);
  box-shadow: 0 2px 8px rgba(212, 164, 54, 0.4);
}
.cert-card h3 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 650;
  letter-spacing: -0.015em; line-height: 1.25;
}
.cert-card > p { margin-top: 10px; color: var(--muted); font-size: 15px; flex: 1; }
.cert-card__foot {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px; color: var(--faint);
}
.cert-card__foot .issuer { color: var(--muted); font-weight: 500; }
.cert-card__foot .ok { color: var(--ok); font-weight: 600; }
@media (max-width: 800px) {
  .cert-grid { grid-template-columns: 1fr; }
  .cert-card { padding: 30px 26px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .cursor-dot, .cursor-ring, .noise { display: none; }
  .hero__title .line > span { transform: none; animation: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .section { padding: 90px 0; }
  .btn { padding: 14px 24px; font-size: 14.5px; }
  .project-card { margin-left: 30px; padding: 26px 24px; }
  .t-year { padding-left: 30px; font-size: 24px; }
  .cs { gap: 34px; }
  .flow-panel { padding: 26px 18px; }
  .term__body { padding: 14px 14px 16px; font-size: 12px; }
  .code-block { font-size: 11.5px; }
}

/* ============================================================
   BRAND ASSETS — flying logos, badge fly-ins, mascots, photo
   ============================================================ */

/* ---------- Icon slots that hold a real logo image ---------- */
.cred__ico--img,
.cert-card__ico--img {
  background: none;
  border: none;
  overflow: visible;
}
.cred__ico--img { width: 56px; height: 56px; }
.cert-card__ico--img { width: 62px; height: 62px; }
.cred__ico--img img,
.cert-card__ico--img img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(37, 99, 235, 0.28));
}
/* round sticker (Agentblazer) — circular sonar ring */
.cred__ico--img.is-round,
.cert-card__ico--img.is-round { border-radius: 50%; }

/* ---------- Badge fly-in — logos fly across and land in their slot ---------- */
[data-reveal] .fly-in { opacity: 0; }
[data-reveal].is-in .fly-in {
  animation: badgeFly 1.05s var(--ease-out) both;
  animation-delay: calc(var(--d, 0s) + 0.35s);
}
@keyframes badgeFly {
  0% {
    opacity: 0;
    transform: translate(var(--fly-x, -110px), var(--fly-y, -70px))
               rotate(var(--fly-r, -40deg)) scale(0.35);
  }
  55% {
    opacity: 1;
    transform: translate(calc(var(--fly-x, -110px) * -0.07), calc(var(--fly-y, -70px) * -0.09))
               rotate(calc(var(--fly-r, -40deg) * -0.12)) scale(1.12);
  }
  78% { transform: translate(0, 0) rotate(calc(var(--fly-r, -40deg) * 0.05)) scale(0.97); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Mascots (decorative robots) ---------- */
.mascot-wrap {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.mascot-wrap img { width: 100%; height: auto; }
.mascot--float {
  animation: mascotFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 18px 30px rgba(15, 17, 21, 0.22));
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}
.mascot--wave {
  transform-origin: 50% 88%;
  animation: mascotWave 3.6s ease-in-out infinite;
  filter: drop-shadow(0 14px 24px rgba(15, 17, 21, 0.22));
}
@keyframes mascotWave {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  12% { transform: rotate(-4deg) translateY(-4px); }
  24% { transform: rotate(3.5deg) translateY(-7px); }
  36% { transform: rotate(-3deg) translateY(-4px); }
  48% { transform: rotate(0deg) translateY(0); }
}

/* Home hero — support bot peeking from behind the terminal, waving */
.hero__side .term { position: relative; z-index: 2; }
.mascot-wrap--hero-bot {
  width: 150px;
  top: -108px; right: 8px;
}

/* Salesforce hero — Astro agent drifting beside the terminal */
.hero-visual { position: relative; }
.mascot-wrap--astro {
  width: 150px;
  right: -54px; bottom: -48px;
  z-index: 3;
}

/* Salesforce hero — giant translucent cloud drifting across the sky */
.sf-cloud {
  position: absolute;
  top: 110px; left: -150px;
  width: 460px; height: auto;
  opacity: 0.08;
  pointer-events: none;
  animation: cloudDrift 52s ease-in-out infinite alternate;
}
@keyframes cloudDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(48vw, 34px); }
}

/* ---------- Marquee — Salesforce cloud rides along ---------- */
.marquee__item--logo img {
  height: 24px; width: auto;
  opacity: 0.85;
}

/* ---------- Floating credential badges (achievements hero) ---------- */
.float-badge {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}
.float-badge img {
  width: 100%; height: auto;
  animation: badgeBob 5.2s ease-in-out infinite;
  animation-delay: var(--bob, 0s);
  filter: drop-shadow(0 10px 22px rgba(37, 99, 235, 0.3));
}
@keyframes badgeBob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-11px) rotate(4deg); }
}
.float-badge--1 { width: 78px; top: -38px; left: -34px; }
.float-badge--2 { width: 66px; right: -28px; top: 36%; }
.float-badge--3 { width: 82px; bottom: -34px; left: 10%; }

/* ---------- TDX polaroid snapshot (salesforce hero, links to the win) ---------- */
.tdx-snap {
  position: absolute;
  left: -58px; bottom: -54px;
  width: 172px;
  z-index: 4;
  display: block;
  padding: 9px 9px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  transform: rotate(-6deg);
  transition: transform .5s var(--ease-out), box-shadow .5s;
}
.tdx-snap:hover {
  transform: rotate(-1deg) translateY(-6px) scale(1.05);
  box-shadow: var(--shadow-lg);
}
.tdx-snap img { width: 100%; height: auto; border-radius: 5px; }
.tdx-snap span {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #A87B14;
}

/* ---------- The winning moment — framed photo on the honor card ---------- */
.honor__medal-wrap--photo { width: 320px; height: auto; }
.honor__medal-wrap--photo .honor__orbit { inset: -26px; }
.tdx-polaroid {
  position: relative;
  margin: 0;
  padding: 12px 12px 14px;
  background: #fff;
  border: 1px solid rgba(212, 164, 54, 0.45);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transform: rotate(3.5deg);
  transition: transform .6s var(--ease-out), box-shadow .6s;
  will-change: transform;
}
.honor:hover .tdx-polaroid { transform: rotate(0deg) scale(1.03); }
.tdx-polaroid img { width: 100%; height: auto; border-radius: 6px; }
.tdx-polaroid figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #A87B14;
}
/* gold sparkles on the frame */
.tdx-polaroid::before,
.tdx-polaroid::after {
  content: "✦";
  position: absolute;
  color: #E2A93B;
  animation: twinkle 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
.tdx-polaroid::before { top: -14px; right: -10px; font-size: 16px; }
.tdx-polaroid::after { bottom: -10px; left: -12px; font-size: 12px; animation-delay: 1.1s; }
/* stamp-in entrance when the honor card reveals */
.honor[data-reveal] .honor__medal-wrap--photo { opacity: 0; }
.honor[data-reveal].is-in .honor__medal-wrap--photo {
  animation: photoStamp .9s var(--ease-out) .35s both;
}
@keyframes photoStamp {
  0% { opacity: 0; transform: scale(1.45) rotate(-10deg) translateY(-28px); }
  60% { opacity: 1; transform: scale(0.96) rotate(2deg) translateY(4px); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 940px) {
  .tdx-snap { left: 8px; }
}
@media (max-width: 800px) {
  .honor__medal-wrap--photo { width: min(300px, 78vw); height: auto; }
}
@media (max-width: 640px) {
  .mascot-wrap--hero-bot { width: 104px; top: -74px; right: 0; }
  .mascot-wrap--astro { width: 102px; right: -14px; bottom: -34px; }
  .tdx-snap { width: 126px; bottom: -34px; }
  .float-badge--1 { width: 56px; top: -26px; left: -12px; }
  .float-badge--2 { width: 50px; right: -10px; }
  .float-badge--3 { width: 60px; bottom: -24px; }
  .sf-cloud { width: 300px; }
}
