/* Bipin Fultariya — Senior Full-Stack Developer
   Design system: near-black canvas, single blue accent, Inter + JetBrains Mono. */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #08090c;
  --bg-1: #0d0f15;
  --bg-2: #12151d;
  --bg-3: #171b25;

  /* Lines */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  /* Text */
  --ink: #eef1f6;
  --muted: #b6bfcf;
  --faint: #8b95a8;

  /* Accent */
  --accent: #6aa9ff;
  --accent-hi: #a3c9ff;
  --accent-dim: rgba(106, 169, 255, 0.14);
  --accent-line: rgba(106, 169, 255, 0.34);
  --accent-ink: #06121f;

  /* Support */
  --green: #3ddc97;
  --green-dim: rgba(61, 220, 151, 0.14);

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape */
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --r-pill: 999px;

  /* Depth */
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 32px 70px -28px rgba(0, 0, 0, 0.95);

  /* Metrics */
  --max: 1180px;
  --gutter: 24px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.22, 0.68, 0.3, 1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 650;
}

p { margin: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible { transform: translate(-50%, 0); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.i-solid { fill: currentColor; stroke: none; }

/* ==========================================================================
   3. Backdrop
   ========================================================================== */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% -4%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse 78% 58% at 50% -4%, #000 8%, transparent 72%);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 460px at 76% -8%, rgba(106, 169, 255, 0.16), transparent 62%),
    radial-gradient(620px 420px at 6% 4%, rgba(61, 220, 151, 0.07), transparent 60%);
}

main, footer, .nav { position: relative; z-index: 1; }

/* ==========================================================================
   4. Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.nav.is-stuck {
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--line);
}

.nav-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.nav.is-stuck .nav-progress { opacity: 1; }

.nav-inner {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--accent), #3f7fe0);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-name span { color: var(--faint); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-links a {
  position: relative;
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--faint);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav-links a[aria-current="true"] { color: var(--ink); }

.nav-links a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0.7rem; right: 0.7rem;
  bottom: 0.16rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.05rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
              transform 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.btn .i { font-size: 1.05em; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
}

.btn-primary:hover {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-inline: 0.55rem;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }

.btn-lg { padding: 0.82rem 1.4rem; font-size: 0.95rem; border-radius: var(--r-md); }

/* Strong secondary — reads almost as loud as primary. */
.btn-strong {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-strong:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-email {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent-hi);
}

.btn-email:hover {
  background: rgba(106, 169, 255, 0.22);
  border-color: var(--accent);
  color: #d6e7ff;
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-toggle .chev { transition: transform 0.2s var(--ease); }
.dropdown.open .dropdown-toggle .chev { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 232px;
  display: none;
  padding: 0.35rem;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 90;
}

.dropdown.open .dropdown-menu { display: grid; animation: popIn 0.16s var(--ease) both; }

@keyframes popIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  font-size: 0.875rem;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.dropdown-menu a:hover,
.dropdown-menu button:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.dropdown-menu .i { color: var(--accent); }

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.15rem;
  cursor: pointer;
}

/* ==========================================================================
   6. Section furniture
   ========================================================================== */

section { scroll-margin-top: calc(var(--nav-h) + 16px); }

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }

/* Supporting sections should not compete with Experience and Projects. */
.section-tight { padding: clamp(2.25rem, 4.5vw, 3.25rem) 0; }
.section-tight .section-head { margin-bottom: 1.25rem; }
.section-tight .section-head h2 { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--muted); }

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--faint);
  font-size: 1rem;
  max-width: 56ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-line);
}

.card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* ==========================================================================
   7. Hero
   ========================================================================== */

.hero {
  padding: clamp(2.5rem, 6vw, 4.75rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 4.5vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

.identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  object-fit: cover;
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 4px rgba(106, 169, 255, 0.1);
}

.identity-meta {
  display: grid;
  gap: 0.1rem;
  font-size: 0.875rem;
}

.identity-meta b { font-weight: 600; letter-spacing: -0.01em; }

.identity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--faint);
  font-size: 0.82rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6);
  animation: ping 2.6s var(--ease) infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.hero h1 {
  font-size: clamp(2.15rem, 5.1vw, 3.55rem);
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin-bottom: 1.15rem;
  text-wrap: balance;
}

.hero h1 .hl {
  background: linear-gradient(100deg, var(--accent-hi), var(--accent) 45%, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.09rem);
  max-width: 54ch;
  margin-bottom: 1.9rem;
  text-wrap: pretty;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--faint);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.text-link:hover { color: var(--accent); background: var(--accent-dim); }
.text-link .i { transition: transform 0.2s var(--ease); }
.text-link:hover .i { transform: translateX(3px); }

/* Proof strip */
.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.proof div {
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  padding: 1.05rem 1.25rem;
}

.proof b {
  display: block;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.proof span {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--faint);
}

/* Code card */
.code-card {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--line);
}

.code-dots { display: flex; gap: 0.35rem; }
.code-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.code-dots i:first-child { background: #ff5f57; }
.code-dots i:nth-child(2) { background: #febc2e; }
.code-dots i:nth-child(3) { background: #28c840; }

.code-file {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.code-body {
  margin: 0;
  padding: 1.15rem 1.25rem 1.35rem;
  font-family: var(--mono);
  font-size: 0.795rem;
  line-height: 1.85;
  color: var(--muted);
  overflow-x: auto;
  tab-size: 2;
}

.code-body .k { color: #c98cff; }
.code-body .p { color: var(--ink); }
.code-body .s { color: var(--green); }
.code-body .c { color: #7180a0; font-style: italic; }
.code-body .n { color: #ffb86b; }

.caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  vertical-align: -0.18em;
  background: var(--accent);
  animation: blink 1.15s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   8. About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}

.about-copy p {
  color: var(--muted);
  font-size: 1.04rem;
  text-wrap: pretty;
}

.about-copy p + p { margin-top: 1rem; }

.about-quote {
  margin-top: 1.6rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent-line);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.cap {
  padding: 1.15rem 1.2rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.cap-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 1rem;
}

.cap h3 { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.3rem; }
.cap p { font-size: 0.86rem; line-height: 1.6; color: var(--faint); }

/* ==========================================================================
   9. Experience
   ========================================================================== */

.progression {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.1rem;
  margin-bottom: 2.25rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.progression-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.progression-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  color: var(--faint);
  white-space: nowrap;
}

.progression b {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
  margin-right: 0.35rem;
}

.step {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.83rem;
  color: var(--faint);
}

.step em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  color: var(--faint);
  opacity: 0.75;
}

.step.now {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--ink);
  font-weight: 550;
}

.step.now em { color: var(--accent); opacity: 1; }

.progression .arw { color: var(--faint); font-size: 0.9rem; opacity: 0.7; }

.timeline {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-line), var(--line-2) 22%, var(--line-2) 90%, transparent);
}

.role {
  position: relative;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.role::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 1.85rem;
  width: 15px;
  height: 15px;
  margin-left: 0px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-2);
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.role:first-child::before {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(106, 169, 255, 0.14);
}

.role:hover {
  border-color: var(--line-2);
  transform: translateX(3px);
  box-shadow: var(--shadow);
}

.role:hover::before { border-color: var(--accent); }

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.85rem;
}

.role-head h3 { font-size: 1.16rem; font-weight: 620; }

.role-co {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.role-co a { color: var(--accent); }
.role-co a:hover { text-decoration: underline; text-underline-offset: 3px; }

.role-dates {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.role-when {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* Tenure length is a stability signal — make it readable at a glance. */
.role-tenure {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-hi);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
}

/* Outcomes, lifted out of the responsibility bullets. */
.impact-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 0 0;
  margin-bottom: 1.05rem;
  border-top: 1px dashed var(--line);
}

.impact-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--green);
  padding-top: 0.28rem;
}

/* Scoped to .role so these win over the generic .role ul / .role li rules. */
.role .impact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
  margin: 0;
  max-width: none;
}

.role .impact li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.75rem;
  font-size: 0.845rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--green-dim);
  border: 1px solid rgba(61, 220, 151, 0.26);
  border-radius: var(--r-pill);
}

.role .impact li::before { content: none; }
.role .impact li .i { font-size: 0.95em; color: var(--green); }

.role-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
}

.role-foot .tags { flex: 1; }

.role ul {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.05rem;
  max-width: 88ch;
}

.role li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.role li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

/* ==========================================================================
   10. Tags
   ========================================================================== */

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tag {
  font-family: var(--mono);
  font-size: 0.715rem;
  letter-spacing: 0.01em;
  color: var(--faint);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.tag:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }

/* ==========================================================================
   11. Case study
   ========================================================================== */

.case {
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-1), var(--bg) 60%);
  border: 1px solid var(--line);
  border-radius: clamp(var(--r-md), 2vw, 22px);
}

.case-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(700px 240px at 12% 0%, rgba(106, 169, 255, 0.11), transparent 70%);
}

.case-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  margin-bottom: 0.9rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.case-top h3 {
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  margin-bottom: 0.5rem;
}

.case-top h3 a { display: inline-flex; align-items: center; gap: 0.5rem; }
.case-top h3 a:hover { color: var(--accent); }
.case-top h3 .i { font-size: 0.62em; color: var(--faint); }

.case-sub { color: var(--faint); font-size: 0.95rem; }

.case-facts {
  display: grid;
  gap: 0.55rem;
  text-align: right;
  font-size: 0.83rem;
  flex: none;
}

.case-facts div span {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.1rem;
}

.case-facts div b { font-weight: 550; color: var(--ink); }

.case-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}

.case-col { padding: clamp(1.4rem, 3vw, 2.1rem); }
.case-col + .case-col { border-left: 1px solid var(--line); }

.case-block + .case-block { margin-top: 1.6rem; }

.case-block h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.case-block p { color: var(--muted); font-size: 0.94rem; text-wrap: pretty; }

.case-block ul { display: grid; gap: 0.5rem; }

.case-block li {
  position: relative;
  padding-left: 1.55rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

.case-block li .i {
  position: absolute;
  left: 0;
  top: 0.28em;
  font-size: 1em;
  color: var(--green);
}

.case-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1.4rem, 3vw, 2.1rem);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

/* Architecture diagram */
.arch {
  display: grid;
  gap: 0.5rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    var(--bg);
}

.arch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.arch-node {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 0.755rem;
  line-height: 1.45;
  text-align: center;
  color: var(--muted);
}

.arch-node.core {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent-hi);
  font-weight: 500;
}

.arch-node.ext { border-style: dashed; color: var(--faint); }

.arch-node small {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}

.arch-flow {
  display: grid;
  place-items: center;
  color: var(--line-2);
  font-size: 0.85rem;
  line-height: 1;
}

.arch-cap {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--faint);
  text-align: center;
}

/* ==========================================================================
   12. Project cards
   ========================================================================== */

.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.proj {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.4rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.proj:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.proj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.proj h3 { font-size: 1.12rem; font-weight: 620; margin-bottom: 0.35rem; }

.proj-when {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.proj-co { font-size: 0.86rem; color: var(--faint); }
.proj p { color: var(--muted); font-size: 0.92rem; flex: 1; text-wrap: pretty; }

/* ==========================================================================
   13. Skills
   ========================================================================== */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.skill {
  padding: 1.25rem 1.3rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease);
}

.skill:hover { border-color: var(--line-2); transform: translateY(-2px); }

.skill-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.skill-head .i { color: var(--accent); font-size: 1.05rem; }

.skill-head h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chip {
  padding: 0.34rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.83rem;
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease), transform 0.18s var(--ease);
}

.chip:hover { transform: translateY(-2px); border-color: var(--line-2); color: var(--ink); }

.chip.core {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent-hi);
  font-weight: 550;
}

.chip.core:hover { background: rgba(106, 169, 255, 0.22); color: #d6e7ff; }

.skill-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--faint);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
}

/* ==========================================================================
   14. Education
   ========================================================================== */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.edu {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.edu-ico {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 1.05rem;
}

.edu h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.edu p { font-size: 0.89rem; color: var(--faint); }

.edu-meta {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

/* ==========================================================================
   15. Contact
   ========================================================================== */

.contact { border-top: 1px solid var(--line); }

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 5vw, 3.75rem);
  border: 1px solid var(--line-2);
  border-radius: clamp(var(--r-md), 2vw, 24px);
  background:
    radial-gradient(760px 320px at 50% -30%, rgba(106, 169, 255, 0.2), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.85rem);
  letter-spacing: -0.035em;
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

.cta > p {
  max-width: 56ch;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.03rem;
  text-wrap: pretty;
}

.cta-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  text-align: left;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

a.contact-item:hover {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.contact-item .i { font-size: 1.05rem; color: var(--accent); }

.contact-item div { min-width: 0; }

.contact-item span {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
}

.contact-item b {
  display: block;
  font-size: 0.87rem;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   16. Footer
   ========================================================================== */

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 1.75rem 0 2.25rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.83rem;
  color: var(--faint);
}

.socials { display: flex; gap: 0.4rem; }

.socials a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--faint);
  font-size: 1rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.socials a:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }

/* ==========================================================================
   17. Motion
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

[data-stagger].is-visible > * { opacity: 1; transform: none; }
[data-stagger].is-visible > *:nth-child(1) { transition-delay: 0.04s; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: 0.1s; }
[data-stagger].is-visible > *:nth-child(3) { transition-delay: 0.16s; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: 0.22s; }
[data-stagger].is-visible > *:nth-child(5) { transition-delay: 0.28s; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: 0.34s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

body.is-ready .hero-grid > * { animation: heroIn 0.7s var(--ease) both; }
body.is-ready .hero-grid > *:nth-child(2) { animation-delay: 0.14s; }

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .code-card { max-width: 560px; }
  .case-body { grid-template-columns: 1fr; }
  .case-col + .case-col { border-left: 0; border-top: 1px solid var(--line); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links a { padding-inline: 0.55rem; font-size: 0.845rem; }
}

@media (max-width: 900px) {
  :root { --nav-h: 62px; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.9rem var(--gutter) 1.6rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }

  body.nav-open { overflow: hidden; }
  body.nav-open .nav-links { opacity: 1; transform: none; visibility: visible; }

  .nav-links a {
    padding: 0.85rem 0.75rem;
    font-size: 1rem;
    font-weight: 550;
    color: var(--muted);
    border-radius: var(--r-md);
  }

  .nav-links a[aria-current="true"] { background: var(--accent-dim); color: var(--accent-hi); }
  .nav-links a[aria-current="true"]::after { display: none; }

  .menu-toggle { display: grid; }
  .btn-email .btn-label { display: none; }
  .btn-email { padding-inline: 0.8rem; }

  .progression { justify-content: flex-start; }
  .progression-note { white-space: normal; }

  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proj-grid { grid-template-columns: 1fr; }
  .case-facts { text-align: left; }
  .case-top { align-items: flex-start; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }

  body { font-size: 15.5px; }

  .brand-name span { display: none; }

  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 1.5rem; }
  .role::before { left: -1.5rem; width: 13px; height: 13px; }
  .role { padding: 1.15rem 1.15rem; }
  .role:hover { transform: none; }

  .hero-cta .btn { flex: 1 1 190px; }
  .code-body { font-size: 0.72rem; padding: 1rem; }

  .progression { gap: 0.5rem; }
  .progression-steps { gap: 0.4rem; }
  .progression .arw { display: none; }

  .impact-row { flex-direction: column; gap: 0.55rem; }
  .impact-label { padding-top: 0; }
  .impact li { font-size: 0.82rem; }

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

@media (max-width: 360px) {
  .proof { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-btns .btn { width: 100%; }
  .code-body { font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  [data-stagger] > * { opacity: 1 !important; transform: none !important; }
  .caret { opacity: 1; }
}

/* ==========================================================================
   19. Print
   ========================================================================== */

@media print {
  .nav, .backdrop, .hero-cta, .hero-links, .cta-btns, .socials, .code-card, .menu-toggle {
    display: none !important;
  }

  body { background: #fff; color: #000; font-size: 11pt; }
  .section { border-top: 1px solid #ccc; padding: 1rem 0; break-inside: avoid; }
  .card, .role, .proj, .skill, .edu, .cta, .case { border-color: #ccc; background: none; box-shadow: none; }
  .reveal, [data-stagger] > * { opacity: 1 !important; transform: none !important; }
  a { color: #000; }
}
