/* Madan Portfolio.
   Colours, type, shadows and motion follow scaleify.ai: white page, near-black
   ink, blue-to-indigo accent, soft lifted cards and dark navy bands. Light only. */

:root {
  --bg: #ffffff;
  --fg: #0b1220;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #6366f1;
  --muted: #f6f8fc;
  --muted-fg: #566178;
  --subtle: #f7f9fc;
  --border: #e6ebf3;
  --border-strong: #d3dbe8;
  --ink: #070b18;
  --ink-soft: #0e1526;
  --ink-fg: #e7ecf8;
  --ink-muted: #96a2bd;
  --emerald: #00bb7f;

  --gradient: linear-gradient(90deg, var(--primary), var(--accent));
  --shadow-soft: 0 1px 2px #0f172a0a, 0 10px 30px -14px #0f172a24;
  --shadow-lift: 0 1px 2px #0f172a0d, 0 30px 60px -24px #2563eb52;
  --shadow-lift-hover: 0 1px 2px #0f172a14, 0 34px 64px -20px #2563eb75;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  color-scheme: light;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* A faint film grain over everything, as on scaleify. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
dd { margin: 0; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 24px; }

.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;
}

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 999px;
  background: var(--fg); color: #fff; font-size: 14px; font-weight: 600;
  transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; }

.noscript { padding-top: 140px; color: var(--muted-fg); }
.noscript a { color: var(--primary); text-decoration: underline; }

/* The italic serif word in each heading, filled with the blue-to-indigo gradient. */
.accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .08em; /* room for the italic overhang, or it gets clipped */
}

/* Small uppercase label with a pulsing dot. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.lead { margin-top: 18px; font-size: 18px; line-height: 1.7; color: var(--muted-fg); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: transform .3s ease-out, box-shadow .3s ease-out, background-color .3s ease-out,
    border-color .3s ease-out, color .3s ease-out;
}
.btn .i { width: 16px; height: 16px; flex: none; transition: transform .3s ease-out; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .1s; }

.btn:hover .i-arrow, .btn:hover .i-external { transform: translateX(3px); }
.btn:hover .i-arrowDown, .btn:hover .i-download { transform: translateY(2px); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-lift); }
.btn-primary:hover { background: var(--primary-strong); box-shadow: var(--shadow-lift-hover); }

.btn-secondary { background: var(--bg); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--muted); border-color: #bcc7d9; box-shadow: var(--shadow-soft); }

.btn-ghost-dark { background: transparent; color: var(--ink-fg); border-color: rgba(231, 236, 248, .22); }
.btn-ghost-dark:hover { background: rgba(231, 236, 248, .08); border-color: rgba(231, 236, 248, .42); color: #fff; }

.btn-sm { height: 38px; padding: 0 16px; font-size: 13.5px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: color .2s;
}
.text-link .i { width: 16px; height: 16px; transition: transform .3s ease-out; }
.text-link:hover { color: var(--primary); }
.text-link:hover .i-arrowUp { transform: translateY(-2px); }

/* ---------- Chips and pills ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: 0 1px 2px #0f172a08;
}
.chip .i { width: 14px; height: 14px; color: var(--primary); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-fg);
}
.pill b { font-weight: 600; color: var(--fg); }
.pill-live { background: #ecfdf5; border-color: #c6f0de; color: #047857; }

.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(0, 187, 127, .18);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--subtle);
  color: var(--primary);
}
.icon-tile .i { width: 20px; height: 20px; }

/* ---------- Nav: a floating pill ---------- */

.nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 16px;
  pointer-events: none;
}

.nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 58rem;
  height: 62px;
  margin: 0 auto;
  padding: 0 11px 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  pointer-events: auto;
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.nav.scrolled .nav-pill {
  background: rgba(255, 255, 255, .85);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .6);
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.06); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted-fg);
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--fg); background: var(--muted); }
.nav-links a.active { color: var(--fg); font-weight: 500; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.menu-btn {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.menu-btn:hover { background: var(--muted); border-color: var(--border-strong); }
.menu-btn .i { width: 20px; height: 20px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 150px 0 104px;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, .043) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .043) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(65% 55% at 50% 0, #000 40%, transparent 100%);
  mask-image: radial-gradient(65% 55% at 50% 0, #000 40%, transparent 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(64px); }
.blob-a { width: 32rem; height: 32rem; left: -9rem; top: -11rem; background: rgba(37, 99, 235, .2); }
.blob-b { width: 28rem; height: 28rem; right: -7rem; top: -5rem; background: rgba(99, 102, 241, .15); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.75rem, 1.5rem + 4.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.typer { margin-top: 22px; min-height: 1.6em; font-size: 20px; font-weight: 500; }
.typer-word { color: var(--primary); }
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -.16em;
  background: var(--primary);
  animation: caret 1s step-end infinite;
}

.pitch { max-width: 34rem; margin-top: 14px; font-size: 18px; line-height: 1.7; color: var(--muted-fg); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.tools { margin-top: 44px; }
.tools .chips { margin-top: 12px; }

/* The app window: the résumé at a glance. */
.hero-visual { position: relative; }
.window-float { animation: floaty 6s ease-in-out infinite; }

.window {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow-lift);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.address {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--muted);
  font-size: 12.5px;
  color: var(--muted-fg);
}
.address .i { width: 14px; height: 14px; flex: none; }
.address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.window-body { display: grid; gap: 12px; padding: 16px; background: var(--subtle); }

.w-card { padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.w-profile { display: flex; align-items: center; gap: 14px; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.w-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.w-sub { margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--muted-fg); }

.w-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 12px; }
.w-row.single { grid-template-columns: 1fr; }
.w-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-fg); }
.w-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.w-chip {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.w-ach-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.w-icon { color: var(--primary); }
.w-icon .i { width: 18px; height: 18px; }
.w-big { margin-top: 8px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }

.w-scores { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 16px; }
.score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.score-top strong { font-size: 15px; font-weight: 600; }
.bar { display: block; overflow: hidden; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--muted); }
.bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gradient);
  transition: width 1.4s var(--ease);
}
.score:nth-child(2) .bar > span { transition-delay: .12s; }
.score:nth-child(3) .bar > span { transition-delay: .24s; }
.bars-in .bar > span { width: var(--w); }

.float-badge {
  position: absolute;
  top: -18px;
  right: -14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #c6f0de;
  border-radius: 999px;
  background: var(--bg);
  color: #047857;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  animation: floaty 6s ease-in-out -3s infinite;
}

/* ---------- Stats strip ---------- */

.stats-sec { padding: 0 0 24px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--bg), var(--subtle));
  box-shadow: var(--shadow-soft);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  padding: 30px 16px;
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--border); }
.stat dd { font-size: clamp(30px, 1.4rem + 1.4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.stat dt { font-size: 11.5px; font-weight: 600; letter-spacing: .18em; line-height: 1.4; text-transform: uppercase; color: var(--muted-fg); }
.stat:last-child dd { color: var(--primary); }

/* ---------- Sections ---------- */

.section { position: relative; padding: 112px 0; }
.section-subtle { background: var(--subtle); }

.sec-head { max-width: 46rem; margin-bottom: 56px; }
.sec-head h2 { margin-top: 18px; font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.25rem); line-height: 1.06; letter-spacing: -.03em; }

/* White cards that lift on hover. */
.card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 56px;
  align-items: start;
}
.about-grid.has-photo { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.about-main { display: grid; gap: 40px; }
.about-photo {
  position: sticky;
  top: 112px; /* clear of the nav pill while the text beside it scrolls */
  overflow: hidden;
  margin: 0;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: var(--shadow-lift);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; }
.about-copy p { font-size: 17px; line-height: 1.75; color: var(--muted-fg); }
.about-copy p:first-child { font-size: 21px; line-height: 1.55; font-weight: 500; letter-spacing: -.01em; color: var(--fg); }
.about-copy p + p { margin-top: 18px; }
.interests { margin-top: 36px; }
.interests .chips { margin-top: 12px; }

.facts-card {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--subtle);
  box-shadow: var(--shadow-soft);
}
.facts-title { padding: 12px 14px 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { padding: 12px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.fact.wide { grid-column: 1 / -1; }
.fact dt { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-fg); }
.fact dd { margin-top: 3px; font-size: 15px; font-weight: 500; line-height: 1.4; }

/* Education: three steps, left to right */
.edu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.edu-card { position: relative; padding: 26px; }
.edu-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 34px;
  right: -27px;
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9c4d6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.edu-card.current { border-color: rgba(37, 99, 235, .3); }
.edu-year {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.edu-card h3 { margin-top: 28px; font-size: 18px; letter-spacing: -.015em; line-height: 1.3; }
.edu-place { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--muted-fg); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.skill-card { padding: 26px; }
.skill-card h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.015em; padding-top: 10px; }
.skill-card .chips { margin-top: 28px; }

/* The slow strip of tools under the skill cards */
.marquee {
  overflow: hidden;
  margin-top: 80px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mq-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: #8792a8;
}
.mq-item .i { width: 20px; height: 20px; color: var(--primary); opacity: .75; }

/* Projects */
.projects-list { display: grid; gap: 28px; }
.project { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border-radius: 28px; }
.project.flip .art { order: 2; border-right: 0; border-left: 1px solid var(--border); }
.art {
  display: grid;
  place-items: center;
  padding: 36px;
  border-right: 1px solid var(--border);
  background-color: var(--subtle);
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .035) 1px, transparent 1px);
  background-size: 24px 24px;
}
.art svg { width: 100%; max-width: 440px; height: auto; overflow: visible; }
.project-body { display: flex; flex-direction: column; justify-content: center; padding: 44px 40px; }
.project-body h3 { margin-top: 16px; font-size: clamp(22px, 1.1rem + .8vw, 28px); line-height: 1.22; }
.project-desc { margin-top: 14px; font-size: 16px; line-height: 1.7; color: var(--muted-fg); }
.project .chips { margin-top: 24px; }
.project .cta { margin-top: 24px; }

/* Line drawings inside the project cards */
.ln { fill: none; stroke: #8b97ad; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ln-ink { stroke: #334155; }
.ln-muted { stroke: #a9b4c7; }
.ln-faint { stroke: #d3dbe8; }
.ln-accent { stroke: var(--primary); stroke-width: 1.8; }
.ln-thick { stroke-width: 2.6; }
.dash { stroke-dasharray: 4 4; }
.fill-surface { fill: #fff; }
.fill-soft { fill: #eef2ff; }
.fill-accent { fill: var(--primary); }
.fill-muted { fill: #a9b4c7; }
.fill-ink { fill: #1e293b; }
.ann { font: 600 7.5px var(--sans); letter-spacing: .12em; fill: var(--muted-fg); }
.ann-accent { fill: var(--primary); }
.ann-light { fill: #fff; letter-spacing: .08em; }
.spin { animation: dash-run 1s linear infinite; }
.flow { animation: dash-run 1.4s linear infinite; }
.scan { opacity: .5; animation: scan 3.2s var(--ease) infinite; }
.box { animation: box-pulse 3.2s ease-in-out infinite; }

/* ---------- Dark navy band (achievements) and the contact card ---------- */

.section.dark { isolation: isolate; overflow: hidden; background: var(--ink); color: var(--ink-fg); }

.dark-bg, .ink-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(37, 99, 235, .26), transparent 70%),
    radial-gradient(35% 45% at 92% 100%, rgba(99, 102, 241, .16), transparent 70%);
}
.dark-bg::before, .ink-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(75% 75% at 50% 25%, #000 30%, transparent 100%);
  mask-image: radial-gradient(75% 75% at 50% 25%, #000 30%, transparent 100%);
}

.dark .eyebrow, .cta-card .eyebrow { color: #c9d1e6; }
.dark .eyebrow::before, .cta-card .eyebrow::before { background: #818cf8; }
.dark h2, .cta-card h2 { color: #fff; }
.dark .accent, .cta-card .accent { background-image: linear-gradient(90deg, #5b8bff, #8b8ff8); }

.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ach-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px;
  border: 1px solid rgba(231, 236, 248, .09);
  border-radius: 24px;
  background: rgba(14, 21, 38, .72);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease), background-color .3s;
}
.ach-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, .42);
  background: var(--ink-soft);
  box-shadow: 0 30px 60px -30px rgba(37, 99, 235, .55);
}
.ach-card .icon-tile { width: 52px; height: 52px; border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: #93b4ff; }
.ach-card .icon-tile .i { width: 24px; height: 24px; }
.ach-rank { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #a5b4fc; }
.ach-card h3 { margin-top: 8px; font-size: 22px; color: #fff; }
.ach-detail { margin-top: 6px; color: var(--ink-muted); }

.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 92px 40px;
  border-radius: 32px;
  background: var(--ink);
  color: var(--ink-fg);
  text-align: center;
  box-shadow: 0 40px 80px -32px rgba(7, 11, 24, .5);
}
.cta-inner { max-width: 54rem; margin: 0 auto; }
.cta-card h2 { margin-top: 18px; font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4rem); line-height: 1.04; letter-spacing: -.035em; }
.cta-card .lead { max-width: 36rem; margin: 20px auto 0; font-size: 17px; color: #b6c0d6; }
.cta-card .cta { justify-content: center; margin-top: 34px; }

.c-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 52px; text-align: left; }
.c-row { position: relative; }
.c-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
.c-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(231, 236, 248, .09);
  border-radius: 18px;
  background: rgba(255, 255, 255, .035);
  transition: transform .3s ease-out, background-color .25s, border-color .25s;
}
a.c-tile:hover { transform: translateY(-2px); border-color: rgba(129, 140, 248, .45); background: rgba(255, 255, 255, .07); }
.has-copy .c-tile { padding-right: 62px; }
.c-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(37, 99, 235, .18);
  color: #93b4ff;
}
.c-icon .i { width: 20px; height: 20px; }
.c-text { display: flex; flex-direction: column; min-width: 0; }
.c-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.c-value { font-size: 15px; font-weight: 500; line-height: 1.4; color: #fff; }

.copy-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(231, 236, 248, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--ink-fg);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .2s, border-color .2s, color .2s;
}
.copy-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(231, 236, 248, .32); color: #fff; }
.copy-btn.copied { color: #34d399; border-color: rgba(52, 211, 153, .5); }
.copy-btn .i { width: 18px; height: 18px; }

/* ---------- Footer ---------- */

.footer { padding: 32px 0 40px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-note { font-size: 14px; color: var(--muted-fg); }

/* ---------- Motion ---------- */

/* Hero items rise into place one after another (delays are set inline). */
.rise { animation: rise .8s var(--ease) both; }

/* Everything else fades up as it scrolls into view. The reveal uses `translate`,
   so it adds to the hover lift (`transform`) instead of fighting it. */
.js-reveal [data-reveal] {
  opacity: 0;
  translate: 0 24px;
  transition: opacity .8s var(--ease) var(--d, 0ms), translate .8s var(--ease) var(--d, 0ms),
    transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease), background-color .3s;
}
.js-reveal [data-reveal].is-in { opacity: 1; translate: 0 0; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes dash-run { to { stroke-dashoffset: -16; } }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .55; } 85% { opacity: .55; } 100% { transform: translateY(84px); opacity: 0; } }
@keyframes box-pulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .caret { display: none; }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 72px; }
  .hero-visual { width: 100%; max-width: 560px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg);
    box-shadow: var(--shadow-lift);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease); }
  .nav-links a { padding: 12px 16px; border-radius: 16px; font-size: 15px; }

  .section { padding: 88px 0; }
  .edu-grid, .skills-grid { grid-template-columns: 1fr; gap: 16px; }
  .edu-card:not(:last-child)::after { display: none; }
  .project { grid-template-columns: 1fr; }
  .art, .project.flip .art { order: 0; border: 0; border-bottom: 1px solid var(--border); padding: 28px; }
  .project-body { padding: 28px; }
  .ach-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid.has-photo { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 440px; }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--border); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .stat { padding: 24px 12px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav { top: 12px; padding: 0 12px; }
  .hero { padding: 124px 0 72px; }
  .typer { min-height: 3.2em; font-size: 18px; }
  .pitch { font-size: 17px; }
  .cta .btn { flex: 1 1 auto; }
  .hero-grid { gap: 64px; }
  .w-row { grid-template-columns: 1fr; }
  .w-scores { gap: 12px; }
  .score-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .score-top .w-label { white-space: nowrap; }
  .float-badge { top: -16px; right: 10px; font-size: 12px; }
  .sec-head { margin-bottom: 40px; }
  .about-copy p:first-child { font-size: 19px; }
  .marquee { margin-top: 56px; }
  .mq-item { padding: 0 20px; font-size: 17px; }
  .ach-card { padding: 22px; gap: 16px; }
  .cta-card { padding: 64px 18px; border-radius: 24px; }
  .c-grid { grid-template-columns: 1fr; margin-top: 40px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
  .facts { grid-template-columns: 1fr; }
}
