/* ==========================================================================
   PORTFOLIO — MAIN STYLESHEET
   --------------------------------------------------------------------------
   1.  Design tokens (colors, fonts, spacing)  <-- edit colors here
   2.  Reset & base
   3.  Background layers (grid, glow, orbs)
   4.  Layout helpers
   5.  Typography helpers
   6.  Buttons
   7.  Header & navigation
   8.  Hero (home)
   9.  Portrait / profile photo frame
   10. Page hero (inner pages) & breadcrumbs
   11. Cards, chips, tags
   12. Projects
   13. Skills
   14. Timeline (experience)
   15. Services & process
   16. Contact & form
   17. Resume
   18. CTA band
   19. Footer
   20. 404
   21. Utilities
   Responsive rules live in responsive.css, keyframes in animations.css.
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Brand palette (from the supplied palette) */
  --c-navy: #1C2644;      /* Primary dark navy  */
  --c-blue: #0A387D;      /* Primary blue       */
  --c-sky: #3D87CB;       /* Light blue accent  */
  --c-mist: #DAE4EE;      /* Light gray         */
  --c-orange: #E77723;    /* Tiny accent only   */

  /* Supporting neutrals derived from the palette */
  --bg: #0B1122;
  --bg-2: #0F172E;
  --surface: rgba(28, 38, 68, 0.55);
  --surface-solid: #141D38;
  --surface-hover: rgba(28, 38, 68, 0.8);
  --line: rgba(218, 228, 238, 0.10);
  --line-strong: rgba(218, 228, 238, 0.20);
  --ink: #EEF3F8;
  --ink-muted: rgba(218, 228, 238, 0.74);
  --ink-faint: rgba(218, 228, 238, 0.5);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0A387D 0%, #3D87CB 100%);
  --grad-text: linear-gradient(100deg, #DAE4EE 0%, #3D87CB 55%, #8FC0EE 100%);
  --grad-border: linear-gradient(135deg, rgba(61, 135, 203, 0.8), rgba(10, 56, 125, 0.15) 40%, rgba(61, 135, 203, 0.5));

  /* Typography */
  --f-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Sizing */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 11vw, 140px);
  --radius: 18px;
  --radius-sm: 10px;
  --notch: 10px;
  --header-h: 76px;
  --grid: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
  --dur: 0.5s;

  /* Shadows & glows */
  --shadow-lg: 0 30px 80px -20px rgba(3, 8, 20, 0.75);
  --glow-sky: 0 0 40px rgba(61, 135, 203, 0.35);

  /* Cursor position (updated by JS) */
  --mx: 50vw;
  --my: 30vh;

  color-scheme: dark;
}

/* 2. RESET & BASE ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
p { max-width: 68ch; }
strong { font-weight: 600; color: var(--ink); }

::selection { background: var(--c-sky); color: #fff; }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  background: var(--c-sky);
  color: #fff;
  border-radius: 8px;
  transform: translateY(-200%);
  transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); }

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

/* 3. BACKGROUND LAYERS ----------------------------------------------------- */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Faint blueprint grid */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(218, 228, 238, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(218, 228, 238, 0.045) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

/* Brighter grid revealed around the cursor (position set by JS) */
.bg-grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(61, 135, 203, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(61, 135, 203, 0.35) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  mask-image: radial-gradient(240px circle at var(--mx) var(--my), #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(240px circle at var(--mx) var(--my), #000 0%, transparent 100%);
  opacity: 0.7;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.bg-orb--1 {
  width: 46vw; height: 46vw;
  min-width: 380px; min-height: 380px;
  top: -18vw; right: -10vw;
  background: radial-gradient(circle, rgba(10, 56, 125, 0.9), transparent 70%);
}
.bg-orb--2 {
  width: 38vw; height: 38vw;
  min-width: 320px; min-height: 320px;
  bottom: -14vw; left: -12vw;
  background: radial-gradient(circle, rgba(61, 135, 203, 0.35), transparent 70%);
}

/* Subtle CRT scanlines, a nod to the terminal aesthetic */
.bg-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px);
  opacity: 0.6;
}

/* Scroll progress bar (width set by JS) */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(61, 135, 203, 0.7);
}

/* 4. LAYOUT HELPERS -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* clip (not hidden) keeps position: sticky working while preventing sideways scroll */
main, .site-footer { display: block; overflow-x: clip; }

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }
.section + .section { padding-top: calc(var(--section-y) * 0.5); }

.section-head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(36px, 6vw, 64px);
  max-width: 760px;
}
.section-head--split {
  max-width: none;
  grid-template-columns: 1fr auto;
  align-items: end;
}
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 28px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 24px); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.stack > * + * { margin-top: 1.1em; }

/* 5. TYPOGRAPHY HELPERS ---------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-sky);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.section-head--center .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); line-height: 1.02; letter-spacing: -0.035em; }
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-muted);
}
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.mono { font-family: var(--f-mono); }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose p { color: var(--ink-muted); }
.prose p + p { margin-top: 1em; }

/* Placeholder text you still need to replace — styled subtly so it is easy to spot */
.ph { color: var(--ink-faint); font-style: normal; }

/* 6. BUTTONS --------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn-bg);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, color 0.3s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

/* Rolling label: the text slides up and a copy rolls in from below */
.btn__label {
  display: inline-block;
  height: 1.3em;
  line-height: 1.3em;
  overflow: hidden;
}
.btn__label > span { display: block; transition: transform 0.45s var(--ease-out); }
.btn__label > span::after { content: attr(data-text); display: block; }
.btn:hover .btn__label > span,
.btn:focus-visible .btn__label > span { transform: translateY(-50%); }

.btn__icon {
  display: inline-grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.4s var(--ease-out);
}
.btn:hover .btn__icon { transform: translate(3px, -3px); }

.btn--primary {
  --btn-bg: var(--grad-primary);
  --btn-fg: #fff;
  box-shadow: 0 10px 30px -10px rgba(61, 135, 203, 0.6);
}
/* Diagonal shine sweep */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(120%); }
.btn--primary:hover { box-shadow: 0 16px 40px -10px rgba(61, 135, 203, 0.85); }

/* Ghost: border drawn with an inset pseudo-element so it follows the notch */
.btn--ghost { --btn-bg: var(--line-strong); }
.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: var(--bg);
  clip-path: inherit;
  transition: background 0.3s;
}
.btn--ghost:hover { --btn-bg: var(--c-sky); }
.btn--ghost:hover::before { background: #0F1B38; }

.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.75rem; }
.btn--block { width: 100%; }

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Text link with animated underline */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-sky);
}
.link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.link:hover::after { transform: scaleX(1); }

/* 7. HEADER & NAVIGATION --------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.4s, border-color 0.4s, height 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  --header-h: 66px;
  background: rgba(11, 17, 34, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

/* Logo / monogram */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}
.logo__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0;
  color: #fff;
  background: var(--grad-primary);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: transform 0.5s var(--ease-out);
}
.logo__mark::after {
  /* small pixel accent */
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 4px;
  height: 4px;
  background: var(--c-mist);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }
.logo__accent { color: var(--c-sky); }
.logo__img { width: 40px; height: 40px; object-fit: contain; }

/* Desktop nav */
.nav { position: relative; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.25s;
}
.nav__num { display: none; font-size: 0.7rem; color: var(--c-sky); }
.nav__link:hover,
.nav__link[aria-current="page"] { color: var(--ink); }

/* Sliding indicator pill (positioned by navigation.js) */
.nav__indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: 36px;
  width: 0;
  border-radius: 999px;
  background: rgba(61, 135, 203, 0.14);
  border: 1px solid rgba(61, 135, 203, 0.35);
  transform: translate(var(--ind-x, 0), -50%);
  opacity: 0;
  transition: transform 0.45s var(--ease-out), width 0.45s var(--ease-out), opacity 0.3s;
  pointer-events: none;
}
.nav__indicator.is-visible { opacity: 1; }

/* Underline fallback for the current page when JS is unavailable */
.no-js .nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1px;
  background: var(--c-sky);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 29, 56, 0.6);
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-open .nav-toggle span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

.nav__footer { display: none; }

/* 8. HERO (HOME) ----------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__content { display: grid; gap: 26px; justify-items: start; }

/* Terminal-style "$ build" line inspired by the reference */
.terminal-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 46, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.terminal-line__prompt { color: var(--c-sky); }
.terminal-line__bar { color: var(--c-mist); letter-spacing: 0.02em; }
.terminal-line__pct { min-width: 3.2ch; color: var(--ink); }
.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--c-orange); /* the only orange accent in the design */
  vertical-align: -0.15em;
}

.hero__title { max-width: 14ch; }
.hero__title .word { display: inline-block; }
.hero__intro { max-width: 52ch; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--c-sky);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--c-sky);
}

.hero__visual { position: relative; display: grid; place-items: center; }

/* HUD corners: cursor coordinates + scroll cue */
.hero__hud {
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; }
.scroll-cue__line {
  position: relative;
  width: 1px;
  height: 36px;
  background: var(--line-strong);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 1px; height: 40%;
  background: var(--c-sky);
}

/* CSS-only 3D fallback (shown when WebGL is unavailable) */
.hero__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  pointer-events: none;
}
.no-webgl .hero__fallback { display: block; }

/* 9. PORTRAIT / PROFILE PHOTO ---------------------------------------------- */
.portrait {
  position: relative;
  width: min(100%, 400px);
  perspective: 1000px;
}
.portrait__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  padding: 2px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out);
  isolation: isolate;
}
/* Rotating gradient border */
.portrait__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--angle, 0deg), var(--c-sky), transparent 30%, var(--c-blue) 50%, transparent 75%, var(--c-sky));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* Soft glow behind the frame */
.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 8%;
  z-index: -2;
  border-radius: inherit;
  background: var(--grad-primary);
  filter: blur(50px);
  opacity: 0.55;
  transform: translateZ(-40px);
}
.portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;   /* keeps faces in frame; adjust if needed */
  border-radius: 26px;
  background: var(--surface-solid);
}
/* Bracket corners */
.portrait__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--c-sky);
  border-style: solid;
  transform: translateZ(30px);
}
.portrait__corner--tl { top: -12px; left: -12px; border-width: 2px 0 0 2px; }
.portrait__corner--tr { top: -12px; right: -12px; border-width: 2px 2px 0 0; }
.portrait__corner--bl { bottom: -12px; left: -12px; border-width: 0 0 2px 2px; }
.portrait__corner--br { bottom: -12px; right: -12px; border-width: 0 2px 2px 0; }

/* Floating chips around the portrait */
.portrait__chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(15, 23, 46, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
  transform: translateZ(60px);
}
.portrait__chip--a { left: -14%; bottom: 14%; }
.portrait__chip--b { right: -10%; top: 40%; }
.portrait__chip b { color: var(--c-sky); font-weight: 500; }

/* 10. PAGE HERO (INNER PAGES) & BREADCRUMBS -------------------------------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(56px, 9vw, 110px)) 0 clamp(48px, 7vw, 90px);
  overflow: hidden;
}
.page-hero__inner { position: relative; z-index: 2; display: grid; gap: 22px; justify-items: start; }
.page-hero__inner > * { max-width: 820px; }
.page-hero__title { font-size: clamp(2.6rem, 6vw, 4.8rem); letter-spacing: -0.035em; line-height: 1.03; }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--c-sky); }
.breadcrumbs a { transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs [aria-current="page"] { color: var(--ink-muted); }

/* CSS 3D floating shapes used on inner pages */
.shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.shape-layer { position: absolute; inset: 0; will-change: transform; }
.shape { position: absolute; transform-style: preserve-3d; }

.shape--cube { width: 90px; height: 90px; top: 30%; right: 12%; perspective: 600px; }
.cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.cube__face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(61, 135, 203, 0.65);
  background: linear-gradient(135deg, rgba(61, 135, 203, 0.18), rgba(10, 56, 125, 0.05));
  box-shadow: inset 0 0 24px rgba(61, 135, 203, 0.15);
}
.cube__face:nth-child(1) { transform: rotateY(0deg) translateZ(45px); }
.cube__face:nth-child(2) { transform: rotateY(90deg) translateZ(45px); }
.cube__face:nth-child(3) { transform: rotateY(180deg) translateZ(45px); }
.cube__face:nth-child(4) { transform: rotateY(-90deg) translateZ(45px); }
.cube__face:nth-child(5) { transform: rotateX(90deg) translateZ(45px); }
.cube__face:nth-child(6) { transform: rotateX(-90deg) translateZ(45px); }

.shape--ring {
  width: 220px; height: 220px;
  top: 8%; right: 26%;
  border-radius: 50%;
  border: 1px solid rgba(61, 135, 203, 0.35);
  box-shadow: 0 0 30px rgba(61, 135, 203, 0.12), inset 0 0 30px rgba(61, 135, 203, 0.08);
}
.shape--ring::after {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-sky);
  box-shadow: 0 0 14px var(--c-sky);
}
.shape--orb {
  width: 140px; height: 140px;
  bottom: 6%; right: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(143, 192, 238, 0.7), rgba(10, 56, 125, 0.6) 45%, rgba(11, 17, 34, 0) 72%);
  filter: blur(0.5px);
}
.shape--diamond {
  width: 48px; height: 48px;
  bottom: 22%; right: 34%;
  border: 1px solid rgba(218, 228, 238, 0.35);
  transform: rotate(45deg);
}

/* 11. CARDS, CHIPS, TAGS --------------------------------------------------- */
.card {
  position: relative;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s, transform 0.6s var(--ease-out);
  isolation: isolate;
}
.card:hover {
  border-color: rgba(61, 135, 203, 0.4);
  background: var(--surface-hover);
  box-shadow: var(--shadow-lg);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  border-radius: 14px;
  color: var(--c-sky);
  background: rgba(61, 135, 203, 0.1);
  border: 1px solid rgba(61, 135, 203, 0.28);
}
.card__icon svg { width: 24px; height: 24px; }
.card__title { font-size: 1.3rem; margin-bottom: 10px; }
.card__text { color: var(--ink-muted); font-size: 0.98rem; }
.card__index {
  position: absolute;
  top: 24px;
  right: 26px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* 3D tilt (driven by animations.js) with a soft glare following the pointer */
[data-tilt] { transform-style: preserve-3d; }
/* .is-tilting is added on first hover; the long selector beats the scroll-reveal reset */
[data-tilt].is-tilting,
.js [data-reveal][data-tilt].is-revealed.is-tilting {
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.25s ease-out, border-color 0.4s, background 0.4s, box-shadow 0.4s, opacity 0.6s;
  transition-delay: 0s;
  will-change: transform;
}
[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(61, 135, 203, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
[data-tilt]:hover::after { opacity: 1; }
[data-tilt] .tilt-pop { transform: translateZ(40px); }

.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--ink);
  border-radius: 999px;
  background: rgba(218, 228, 238, 0.05);
  border: 1px solid var(--line-strong);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}
.chip:hover { border-color: var(--c-sky); background: rgba(61, 135, 203, 0.12); transform: translateY(-2px); }
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--c-sky);
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--c-mist);
  background: rgba(10, 56, 125, 0.45);
  border: 1px solid rgba(61, 135, 203, 0.3);
  border-radius: 6px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Feature list with check marks */
.check-list { display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-muted);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(61, 135, 203, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%233D87CB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1px solid rgba(61, 135, 203, 0.4);
}

/* Infinite skills marquee */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 22px;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 500;
  color: var(--ink-faint);
  white-space: nowrap;
}
.marquee__item::after { content: "✦"; font-size: 0.7em; color: var(--c-sky); }

/* Info rows (key/value) */
.info-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.info-list span:first-child {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 3px;
}
.info-list span:last-child { text-align: right; color: var(--ink); }

/* 12. PROJECTS ------------------------------------------------------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.6s var(--ease-out);
}
.project-card:hover { border-color: rgba(61, 135, 203, 0.45); box-shadow: var(--shadow-lg); }
.project-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 0.9fr; }

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-solid);
}
.project-card--featured .project-card__media { aspect-ratio: auto; min-height: 100%; }
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.project-card:hover .project-card__media img { transform: scale(1.05); }
.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11, 17, 34, 0.6));
}
.project-card__badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 6px 12px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(10, 56, 125, 0.85);
  border: 1px solid rgba(61, 135, 203, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.project-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3vw, 36px);
  flex: 1;
}
.project-card__meta {
  display: flex;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.project-card__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.project-card__title a::before {
  /* makes the whole card clickable while keeping a single real link */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}
.project-card__text { color: var(--ink-muted); }
.project-card__footer {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 8px;
}

/* "More coming soon" slot — honest placeholder, no fake projects */
.project-card--soon {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 40px;
  text-align: center;
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
}
.project-card--soon .h3 { margin: 14px 0 8px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  padding: 9px 16px;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: all 0.3s;
}
.filter-btn:hover { color: var(--ink); border-color: var(--c-sky); }
.filter-btn.is-active { color: #fff; background: var(--c-blue); border-color: var(--c-sky); }

/* Project details */
.case-hero__media {
  position: relative;
  margin-top: clamp(32px, 5vw, 56px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background: var(--surface-solid);
}
.case-hero__media img { width: 100%; height: 100%; object-fit: cover; }

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.case-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 24px; }
.case-block + .case-block { margin-top: clamp(48px, 6vw, 72px); }
.case-block .h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 18px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gallery figure {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
}
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  padding: 12px 16px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.case-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 40px;
  margin-top: 64px;
  border-top: 1px solid var(--line);
}

/* 13. SKILLS --------------------------------------------------------------- */
.skill-group { display: grid; gap: 20px; align-content: start; }
.skill-group__head { display: flex; align-items: center; gap: 14px; }
.skill-group__head .card__icon { margin: 0; }

.skill-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.skill-row:last-child { border-bottom: 1px solid var(--line); }
.skill-row__label { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-sky); padding-top: 8px; }

/* 14. TIMELINE ------------------------------------------------------------- */
.timeline {
  position: relative;
  display: grid;
  gap: 28px;
  padding-left: 40px;
}
.timeline::before,
.timeline__progress {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line-strong);
}
/* Filled portion grows with scroll (set by animations.js) */
.timeline__progress {
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(61, 135, 203, 0.6);
  transform-origin: top;
  transform: scaleY(var(--line-progress, 0));
}
.timeline__item { position: relative; }
.timeline__dot {
  position: absolute;
  left: -40px;
  top: 28px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--c-sky);
  box-shadow: 0 0 0 6px var(--bg), var(--glow-sky);
}
.timeline__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-sky); }
.timeline__date {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-sky);
}
.timeline__org { font-family: var(--f-mono); font-size: 0.85rem; color: var(--ink-faint); margin: 6px 0 14px; }
.timeline .check-list { margin-top: 14px; }

/* 15. SERVICES & PROCESS --------------------------------------------------- */
.service-card { display: flex; flex-direction: column; gap: 4px; height: 100%; }
.service-card .check-list { margin-top: 20px; font-size: 0.95rem; }

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}
.process__step {
  position: relative;
  padding: 28px 24px 30px;
  border-top: 2px solid var(--line-strong);
  transition: border-color 0.4s;
}
.process__step:hover { border-color: var(--c-sky); }
.process__step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 18px;
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--c-sky);
}
.process__step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.process__step p { color: var(--ink-muted); font-size: 0.95rem; }

/* 16. CONTACT & FORM ------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.form { display: grid; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { position: relative; display: grid; gap: 8px; }
.field__label {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.req { color: var(--c-sky); }
.field__input {
  width: 100%;
  padding: 15px 18px;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(11, 17, 34, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field__input::placeholder { color: rgba(218, 228, 238, 0.35); }
.field__input:hover { border-color: rgba(218, 228, 238, 0.32); }
.field__input:focus {
  border-color: var(--c-sky);
  background: rgba(11, 17, 34, 0.85);
  box-shadow: 0 0 0 4px rgba(61, 135, 203, 0.18);
}
textarea.field__input { min-height: 170px; resize: vertical; line-height: 1.55; }

.field.is-invalid .field__input { border-color: #E5707A; box-shadow: 0 0 0 4px rgba(229, 112, 122, 0.14); }
.field__error {
  min-height: 1.2em;
  font-size: 0.82rem;
  color: #F09AA2;
}
.field__count { position: absolute; right: 4px; top: 0; font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-faint); }

/* Honeypot field (anti-spam) — hidden from humans */
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  display: none;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.form-status.is-visible { display: grid; }
.form-status--success { background: rgba(61, 135, 203, 0.12); border: 1px solid rgba(61, 135, 203, 0.5); }
.form-status--error { background: rgba(229, 112, 122, 0.1); border: 1px solid rgba(229, 112, 122, 0.45); }
.form-status--info { background: rgba(218, 228, 238, 0.06); border: 1px solid var(--line-strong); }
.form-status .btn-row { margin-top: 4px; }

.form__note { font-size: 0.85rem; color: var(--ink-faint); }

.btn.is-loading .btn__label { opacity: 0.6; }
.btn.is-loading .btn__icon { animation: spin 0.9s linear infinite; }

.contact-card { display: grid; gap: 26px; }
.contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(11, 17, 34, 0.6);
  border: 1px solid var(--line-strong);
  font-family: var(--f-mono);
  font-size: 0.9rem;
  word-break: break-all;
}
.copy-btn {
  flex-shrink: 0;
  padding: 7px 12px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-sky);
  border: 1px solid rgba(61, 135, 203, 0.4);
  border-radius: 8px;
  transition: background 0.25s;
}
.copy-btn:hover { background: rgba(61, 135, 203, 0.15); }

/* Social links */
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out), background 0.3s;
}
.social svg { width: 20px; height: 20px; }
.social:hover { color: #fff; border-color: var(--c-sky); background: rgba(61, 135, 203, 0.14); transform: translateY(-3px); }

/* 17. RESUME --------------------------------------------------------------- */
.resume-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
/* The resume: a white A4-style sheet that matches the PDF */
.cv {
  --cv-ink: #1A1A1A;
  --cv-muted: #555E6E;
  --cv-accent: #1F3A68;
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(28px, 6vw, 64px) clamp(22px, 6vw, 68px);
  background: #fff;
  color: var(--cv-ink);
  font-family: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.98rem;
  line-height: 1.5;
  border-radius: 6px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.7);
}
.cv p, .cv li { color: var(--cv-ink); }
.cv a { color: var(--cv-accent); }
.cv strong { font-weight: 700; }
.cv__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.cv__name {
  font-family: inherit;
  font-size: clamp(1.8rem, 4.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--cv-accent);
}
.cv .cv__title { margin-top: 6px; font-size: 1.1rem; color: var(--cv-muted); }
.cv__contact { margin-top: 6px; font-size: 0.88rem; line-height: 1.6; }
.cv__sep { margin: 0 6px; color: #9AA3B2; }
.cv__dot { margin: 0 4px; }
.cv__photo { flex: none; width: 110px; height: 132px; object-fit: cover; }
.cv__section { margin-top: 22px; }
.cv__heading {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cv-accent);
  padding-bottom: 4px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid var(--cv-accent);
}
.cv__skills { display: grid; gap: 2px; }
.cv__entry + .cv__entry { margin-top: 14px; }
.cv__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }
.cv__role { font-weight: 700; }
.cv .cv__meta { color: var(--cv-muted); text-decoration: none; }
.cv .cv__org { font-style: italic; color: var(--cv-muted); }
.cv__bullets { margin-top: 4px; padding-left: 28px; list-style: disc; display: grid; gap: 2px; }

/* 18. CTA BAND ------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 7vw, 90px) clamp(24px, 6vw, 80px);
  border-radius: 28px;
  border: 1px solid rgba(61, 135, 203, 0.35);
  background:
    radial-gradient(600px circle at 85% 0%, rgba(61, 135, 203, 0.35), transparent 60%),
    linear-gradient(135deg, #0A387D 0%, #1C2644 60%, #111A33 100%);
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(218, 228, 238, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(218, 228, 238, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000 70%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%);
}
.cta-band__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
}
.cta-band .h2 { max-width: 16ch; }
.cta-band p { color: rgba(218, 228, 238, 0.8); margin-top: 16px; }

/* 19. FOOTER --------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: var(--section-y);
  padding: clamp(56px, 8vw, 96px) 0 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(10, 56, 125, 0.12));
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
}
.footer__brand p { margin-top: 18px; color: var(--ink-muted); max-width: 36ch; font-size: 0.97rem; }
.footer__title {
  margin-bottom: 18px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.footer__links a { color: var(--ink-muted); transition: color 0.2s, padding 0.3s var(--ease-out); font-size: 0.97rem; }
.footer__links a:hover { color: var(--ink); padding-left: 4px; }
.footer__contact { display: grid; gap: 18px; }
.footer__contact a.footer__email { font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; justify-self: start; transition: border-color 0.3s; word-break: break-all; }
.footer__contact a.footer__email:hover { border-color: var(--c-sky); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.back-to-top { display: inline-flex; align-items: center; gap: 8px; transition: color 0.2s; }
.back-to-top:hover { color: var(--ink); }

/* 20. 404 ------------------------------------------------------------------ */
.error-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  text-align: center;
  overflow: hidden;
}
.error-page__inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 24px; }
.error-code {
  position: relative;
  font-family: var(--f-display);
  font-size: clamp(7rem, 26vw, 16rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.06em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-code::before,
.error-code::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
.terminal {
  width: min(100%, 520px);
  text-align: left;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: rgba(11, 17, 34, 0.85);
  font-family: var(--f-mono);
  font-size: 0.85rem;
}
.terminal__bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.terminal__body { padding: 18px; display: grid; gap: 6px; color: var(--ink-muted); }
.terminal__body .ok { color: var(--c-sky); }
.terminal__body .err { color: #F09AA2; }

/* 21. UTILITIES ------------------------------------------------------------ */
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: 40px; }
.noscript-msg {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-muted);
}

/* 22. CODE WITH SAQIB ADDITIONS --------------------------------------------- */
/* "</>" logo mark */
.logo__mark--code { font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: -0.06em; }

/* Skill status: plain chip = learned/using, dashed = learning, outlined square = coursework */
.chip--learning { border-style: dashed; border-color: var(--c-sky); background: transparent; }
.chip--learning::before { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px var(--c-sky); }
.chip--course { background: transparent; }
.chip--course::before { background: var(--c-mist); opacity: 0.6; }
.skill-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 28px;
  font-size: 0.85rem;
}
.skill-legend .chip { pointer-events: none; }

/* Status labels (Now / Next / Done) */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.status-pill--now { color: var(--ink); border-color: var(--c-sky); background: rgba(61, 135, 203, 0.16); }
.status-pill--done { color: var(--c-mist); background: rgba(218, 228, 238, 0.08); }

/* Empty project list spans the whole grid */
.project-card--empty { grid-column: 1 / -1; }
.project-card--empty .muted { max-width: 52ch; margin-inline: auto; }
