/* ============================================================
   Vikas Kukreti — Portfolio & Résumé
   A typographic, dark-mode personal site
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg: #0b0d10;
  --bg-soft: #101318;
  --bg-raised: #14171d;
  --bg-elevated: #1a1e25;

  /* Hairlines */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #e8ebf0;
  --text-dim: #a3abba;
  --text-faint: #7d8593;

  /* Accent — a single, muted brass */
  --accent: #c9a26b;
  --accent-soft: rgba(201, 162, 107, 0.12);
  --accent-line: rgba(201, 162, 107, 0.32);

  /* Type */
  --font-display: "Schibsted Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Layout */
  --max: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(6rem, 12vw, 10rem);
  --radius: 14px;

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

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: #2a3038 var(--bg);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #0b0d10;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #2a3038;
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #3a414b;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
}

.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;
}

/* ---------- Background texture ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), rgba(201, 162, 107, 0.4));
  z-index: 10000;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 13, 16, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  color: var(--accent);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.logo:hover .logo-mark {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.logo .logo-name {
  color: var(--text);
}
.logo .logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  list-style: none;
}
.nav-links a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.25rem 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a.is-active {
  color: var(--text);
}
.nav-links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-cta {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--text);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #0b0d10;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #0b0d10;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: #d8b37e;
  border-color: #d8b37e;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(201, 162, 107, 0.5);
}
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--text-faint);
  background: var(--bg-raised);
  transform: translateY(-2px);
}
.btn .arrow {
  transition: transform 0.35s var(--ease);
}
.btn:hover .arrow {
  transform: translate(3px, -3px);
}

/* ---------- Eyebrow labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.eyebrow .index {
  color: var(--text-faint);
}
.eyebrow::after {
  content: "";
  height: 1px;
  width: 2.5rem;
  background: var(--accent-line);
}

/* ---------- Section scaffolding ---------- */
.section {
  padding-block: var(--section-pad);
}
.section-head {
  margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 1.1rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(52% 60% at 78% 12%, rgba(201, 162, 107, 0.09), transparent 60%),
    radial-gradient(46% 52% at 8% 88%, rgba(90, 110, 140, 0.1), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 78%);
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 8vw, 6rem);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.hero-badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.hero-badge .pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 1; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 8.6vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  max-width: 14ch;
}
.hero-title .dim {
  color: var(--text-faint);
}
.hero-role {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  color: var(--text-dim);
  max-width: 52ch;
}
.hero-role strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
}
.hero-meta-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-meta-item span {
  display: block;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-hint .line {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--text-faint), transparent);
  animation: drop 2s var(--ease) infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.lead {
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}
.lead em {
  font-style: normal;
  color: var(--accent);
}
.about-body p {
  color: var(--text-dim);
  font-size: 1.02rem;
  margin-top: 1.25rem;
  max-width: 58ch;
}
.about-body p:first-of-type {
  margin-top: 1.75rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 2.5rem;
}
.stat {
  background: var(--bg-soft);
  padding: 1.5rem 1.5rem;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.4rem;
}

/* ---------- Skills ---------- */
.skills {
  margin-top: clamp(4rem, 8vw, 6rem);
}
.skills-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
}
.skill-pill {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-soft);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.skill-pill:hover {
  color: var(--text);
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

/* ---------- Experience ---------- */
.experience-list {
  position: relative;
  display: flex;
  flex-direction: column;
}
.exp-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease),
    background 0.35s var(--ease);
}
.exp-item:first-child {
  border-top: 1px solid var(--line);
}
.exp-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.35s var(--ease);
}
.exp-item:hover::before {
  background: var(--accent);
}
.exp-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.exp-role {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transition: color 0.35s var(--ease);
}
.exp-item:hover .exp-role {
  color: var(--accent);
}
.exp-company {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 1.02rem;
  margin-top: 0.3rem;
}
.exp-company a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.exp-company a:hover {
  border-color: var(--accent-line);
}
.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  white-space: nowrap;
}
.exp-location {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-top: 0.15rem;
}
.exp-body {
  margin-top: 1.25rem;
  max-width: 78ch;
}
.exp-body p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.75;
}
.exp-body ul {
  list-style: none;
  margin-top: 1rem;
}
.exp-body ul li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dim);
  font-size: 0.98rem;
  margin-bottom: 0.65rem;
}
.exp-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-line);
}
.exp-sub {
  font-weight: 600;
  color: var(--text);
}
.exp-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}
.exp-tech span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.project-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
  transition: opacity 0.8s var(--ease), transform 0.45s var(--ease),
    border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-line);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}
.project-media {
  position: relative;
  aspect-ratio: 16 / 9.5;
  overflow: hidden;
  background: var(--bg-elevated);
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
  transition: transform 0.7s var(--ease), filter 0.5s var(--ease);
}
.project-card:hover .project-media img {
  transform: scale(1.06);
  filter: saturate(1) contrast(1.04);
}
.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 13, 16, 0.55));
}
.project-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 16, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s var(--ease);
}
.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateY(0);
}
.project-arrow:hover {
  background: var(--accent);
}
.project-arrow svg {
  color: var(--text);
}
.project-arrow:hover svg {
  color: #0b0d10;
}
.project-body {
  padding: 1.6rem 1.6rem 1.8rem;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
}
.project-desc {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-top: 0.7rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}
.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.contact-title .accent {
  color: var(--accent);
}
.contact-text {
  color: var(--text-dim);
  font-size: 1.08rem;
  margin-top: 1.5rem;
  max-width: 46ch;
}
.contact-cta {
  margin-top: 2.25rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0.25rem;
  border-bottom: 1px solid var(--line);
  transition: padding 0.35s var(--ease);
}
.contact-link:hover {
  padding-left: 0.6rem;
}
.contact-link .label {
  width: 7.5rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.contact-link .value {
  flex: 1;
  font-weight: 500;
  color: var(--text);
  font-size: 1.05rem;
  transition: color 0.3s var(--ease);
}
.contact-link:hover .value {
  color: var(--accent);
}
.contact-link .arrow {
  color: var(--text-faint);
  transition: transform 0.35s var(--ease), color 0.3s var(--ease);
}
.contact-link:hover .arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer .credit {
  color: var(--text-faint);
  font-size: 0.88rem;
}
.footer .credit span {
  color: var(--accent);
}
.footer-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 0.88rem;
  transition: color 0.3s var(--ease);
}
.footer-links a:hover {
  color: var(--text);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint .line, .hero-badge .pulse::after { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Stack (categorised, as on LinkedIn) ---------- */
.stack {
  margin-top: clamp(4rem, 8vw, 6rem);
}
.stack-list {
  border-top: 1px solid var(--line);
}
.stack-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.4fr) 1fr;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.stack-row dt {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.stack-row dd {
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
}

/* ---------- Earlier roles ---------- */
.exp-earlier {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}
.earlier-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.earlier-role {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.earlier-role span {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-faint);
}
.earlier-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  white-space: nowrap;
}
.earlier-row p {
  grid-column: 1 / -1;
  color: var(--text-dim);
  font-size: 0.96rem;
}

/* ---------- Case studies ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2vw, 1.5rem);
  margin-top: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.case-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  transition: opacity 0.8s var(--ease), transform 0.45s var(--ease),
    border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-line);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}
.case-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.case-metric {
  margin-top: 2.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--accent);
  text-wrap: balance;
}
.case-title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.case-desc {
  margin-top: 0.6rem;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.65;
}
.case-card .project-tech {
  margin-top: auto;
  padding-top: 1.25rem;
}

@media (max-width: 900px) {
  .case-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .stack-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .earlier-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    inset: 0;
    top: 72px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    background: rgba(11, 13, 16, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 2rem var(--gutter);
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    font-size: 1.6rem;
    font-family: var(--font-display);
    font-weight: 600;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
  }
  .nav-links a::after { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .exp-top { flex-direction: column; gap: 0.5rem; }
  .exp-date { white-space: normal; }
}
