/* ============================================================
   Nahush Gowda, Portfolio
   Design concept: a blueprint. Deep navy ground, a faint
   drafting grid, and a single red-pen accent. AI produces a
   draft, the blueprint before anything's final; the red pen
   marks are where editorial judgment makes it real. Same
   tracked-changes motif (del/ins) as before, on a new ground.
   Sections are separated by space and tone, not ruled lines.
   ============================================================ */

:root {
  --paper: #142C4D;
  --paper-soft: #0F2240;
  --paper-card: #1B3A63;
  --ink: #F2ECDC;
  --ink-soft: #AEB9CC;
  --taupe: #8795AC;
  --red: #E8B14C;
  --red-dark: #D49A2E;
  --highlight: #E8B14C;
  --line: #2C4870;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --maxw: 1080px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-card: 0 2px 12px -4px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-card-hover: 0 10px 26px -8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint blueprint drafting grid instead of paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  mix-blend-mode: screen;
}

a { color: inherit; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

::selection { background: var(--highlight); color: var(--paper); }

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

/* ---------- tracked-changes motif ---------- */
del {
  text-decoration: line-through;
  text-decoration-color: var(--taupe);
  text-decoration-thickness: 2px;
  color: var(--taupe);
}
ins {
  text-decoration: none;
  color: var(--red);
  border-bottom: 2px solid var(--red);
}

/* signature animated edit mark, used once, in the home hero */
del.editmark {
  position: relative;
  text-decoration: none;
}
del.editmark::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 52%;
  height: 2px;
  background: var(--taupe);
  transform: scaleX(0);
  transform-origin: left;
  animation: strikeIn 0.5s cubic-bezier(.4, 0, .2, 1) forwards;
  animation-delay: 0.7s;
}
ins.editmark {
  opacity: 0;
  transform: translateY(5px);
  display: inline-block;
  margin-left: 0.28em;
  animation: insIn 0.45s ease forwards;
  animation-delay: 1.25s;
}
@keyframes strikeIn { to { transform: scaleX(1); } }
@keyframes insIn { to { opacity: 1; transform: none; } }

/* ---------- eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: dotPulse 2.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 44, 77, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(33, 29, 23, 0.07);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark span { color: var(--red); font-style: normal; }

nav.main-nav {
  display: flex;
  gap: 28px;
}
nav.main-nav a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
nav.main-nav a:hover { color: var(--ink); }
nav.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 4px;
  width: 38px;
  height: 34px;
  font-family: var(--mono);
  cursor: pointer;
}

@media (max-width: 720px) {
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    box-shadow: var(--shadow-card);
    flex-direction: column;
    gap: 2px;
    padding: 10px 28px 22px;
    display: none;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 11px 0; border-bottom: none; }
  .nav-toggle { display: block; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 84px 0 64px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 18px 0 26px;
  max-width: 18ch;
}
.hero .lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 34px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-primary { background: var(--red); color: var(--paper-card); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ============================================================
   Section scaffolding, separation comes from padding and
   gentle background tint, not ruled lines.
   ============================================================ */
section { padding: 64px 0; }
section.tint { background: var(--paper-soft); }
.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 12px 0 0;
  max-width: 22ch;
}

/* ---------- what-I-do cards ---------- */
.cards3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 820px) { .cards3 { grid-template-columns: 1fr; } }

.note-card {
  background: var(--paper-card);
  border-top: 3px solid var(--red);
  box-shadow: var(--shadow-card);
  padding: 26px 24px;
  border-radius: 3px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.note-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.note-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 10px;
}
.note-card p { color: var(--ink-soft); margin: 0; font-size: 15px; }

/* ---------- work / article cards ---------- */
.work-list { display: flex; flex-direction: column; gap: 14px; }
.work-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 24px 26px;
  background: var(--paper-card);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.work-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.work-card .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--taupe);
  padding-top: 4px;
}
.work-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0 0 8px;
  line-height: 1.3;
}
.work-card p { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 56ch; }
.work-card .go {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--red);
  white-space: nowrap;
  padding-top: 6px;
  transition: transform 0.15s;
}
.work-card:hover .go { transform: translateX(3px); }
.work-card:hover h3 { color: var(--red-dark); }

@media (max-width: 720px) {
  .work-card { grid-template-columns: 1fr; gap: 8px; padding: 20px 22px; }
  .work-card .go { padding-top: 0; }
}

/* ---------- scope card: real work, no public link ---------- */
.scope-card {
  background: var(--paper-card);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
  margin-bottom: 14px;
}
.scope-card .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.scope-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  margin: 0;
}
.scope-card .nolink-tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--taupe);
  background: var(--paper-soft);
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.scope-card p { color: var(--ink-soft); margin: 0 0 10px; max-width: 64ch; font-size: 15px; }
.scope-card p:last-child { margin-bottom: 0; }
.scope-card p strong { color: var(--ink); font-weight: 600; }

/* ---------- inline stat (e.g. ranking performance) ---------- */
.stat-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.stat-line .num {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  color: var(--red);
  line-height: 1;
}
.stat-line .desc { color: var(--ink-soft); font-size: 14.5px; max-width: 38ch; }
.stat-disclaimer {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--taupe);
  margin-top: 4px;
}

/* ---------- live embed (cluster map, etc.) ---------- */
.embed-frame {
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-card);
  box-shadow: var(--shadow-card);
  margin: 22px 0 10px;
}
.embed-frame iframe {
  width: 100%;
  height: 540px;
  border: 0;
  display: block;
  background: #0c0c0d;
}
.embed-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper-soft);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--taupe);
}
.embed-caption a { color: var(--red); text-decoration: none; border-bottom: 1px solid var(--red); }

/* ---------- mini agent spec ---------- */
.agent-spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 760px) { .agent-spec { grid-template-columns: 1fr; } }
.agent-spec .a-card {
  border-radius: 3px;
  padding: 16px 16px 18px;
  background: var(--paper-soft);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.agent-spec .a-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.agent-spec .a-card h4 {
  font-family: var(--serif);
  font-size: 16px;
  margin: 0 0 10px;
}
.agent-spec .row {
  font-size: 13px;
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.agent-spec .row .k {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--taupe);
  min-width: 52px;
  padding-top: 2px;
}

/* ---------- scoring tier visual (paraphrased rubric, not the raw prompt) ---------- */
.score-scale {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 20px;
}
.score-scale .tier {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 3px;
  background: var(--paper-soft);
  border-left: 3px solid var(--line);
}
.score-scale .tier.t-high { border-left-color: var(--red); }
.score-scale .tier.t-mid { border-left-color: var(--taupe); }
.score-scale .tier.t-human { border-left-color: var(--ink-soft); background: rgba(174, 185, 204, 0.1); }
.score-scale .range {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  min-width: 64px;
  padding-top: 1px;
}
.score-scale .desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- placeholder / coming-soon note ---------- */
.todo-note {
  border-radius: 4px;
  padding: 26px 28px;
  margin-top: 8px;
  background: var(--paper-card);
  box-shadow: var(--shadow-card);
}
.todo-note .eyebrow { margin-bottom: 10px; }
.todo-note p { color: var(--ink-soft); margin: 0 0 8px; font-size: 15px; max-width: 60ch; }
.todo-note p:last-child { margin-bottom: 0; }

/* ---------- AI systems pipeline ---------- */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 22px 0 36px;
}
.pipeline .step {
  background: var(--paper-soft);
  padding: 9px 14px;
  border-radius: 3px;
  color: var(--ink-soft);
}
.pipeline .step.human { color: var(--ink); background: rgba(232, 177, 76, 0.20); }
.pipeline .arrow { padding: 0 10px; color: var(--taupe); }

.system-card {
  background: var(--paper-card);
  border-radius: 5px;
  box-shadow: var(--shadow-card);
  padding: 32px 34px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 34px;
  transition: box-shadow 0.2s ease;
}
.system-card:hover { box-shadow: var(--shadow-card-hover); }
.system-card .meta { font-family: var(--mono); font-size: 12.5px; color: var(--taupe); }
.system-card h3 {
  font-family: var(--serif);
  font-size: 23px;
  margin: 10px 0 0;
}
.system-card .body p { color: var(--ink-soft); margin: 0 0 14px; }
.system-card .body p:last-child { margin-bottom: 0; }
.system-card a.artifact-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
}

@media (max-width: 760px) {
  .system-card { grid-template-columns: 1fr; gap: 12px; padding: 26px 24px; }
}

/* ---------- about / experience ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

.portrait-frame {
  border: 1px solid var(--line);
  background: var(--paper-card);
  padding: 10px;
  border-radius: 3px;
}
.portrait-frame .ph {
  aspect-ratio: 4/5;
  background: var(--paper-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--taupe);
  text-align: center;
  padding: 16px;
  border-radius: 2px;
}
.portrait-frame img { border-radius: 2px; aspect-ratio: 4/5; object-fit: cover; }

.skill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--paper-card);
  box-shadow: var(--shadow-sm);
  padding: 6px 11px;
  border-radius: 20px;
  color: var(--ink-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--paper-card);
  color: var(--ink);
  border-radius: 6px;
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow-card);
  padding: 40px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  margin: 0;
  max-width: 34ch;
  line-height: 1.25;
}
.cta-band .btn-primary { background: var(--red); color: var(--paper); }
.cta-band .btn-ghost { border-color: var(--ink); color: var(--ink); }
.cta-band .btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ============================================================
   Footer
   ============================================================ */
footer.site-footer {
  background: var(--paper-soft);
  padding: 40px 0 50px;
  margin-top: 40px;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--taupe);
}
footer.site-footer a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); transition: color 0.15s, border-color 0.15s; }
footer.site-footer a:hover { color: var(--red); border-color: var(--red); }

/* ---------- page header (non-home pages) ---------- */
.page-head { padding: 60px 0 28px; }
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 46px);
  margin: 14px 0 16px;
  max-width: 20ch;
}
.page-head .lede { color: var(--ink-soft); max-width: 56ch; font-size: 17px; }

.group-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 56px 0 18px;
}
.group-label:first-of-type { margin-top: 8px; }
.group-label .count { color: var(--taupe); font-weight: normal; text-transform: none; letter-spacing: 0; }

/* ---------- reveal on scroll, with a gentle stagger ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(.2, .7, .3, 1), transform 0.55s cubic-bezier(.2, .7, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }

.cards3 .reveal:nth-child(1), .agent-spec .reveal:nth-child(1) { transition-delay: 0s; }
.cards3 .reveal:nth-child(2), .agent-spec .reveal:nth-child(2) { transition-delay: 0.08s; }
.cards3 .reveal:nth-child(3), .agent-spec .reveal:nth-child(3) { transition-delay: 0.16s; }

.work-list .reveal:nth-child(1) { transition-delay: 0s; }
.work-list .reveal:nth-child(2) { transition-delay: 0.06s; }
.work-list .reveal:nth-child(3) { transition-delay: 0.12s; }
.work-list .reveal:nth-child(4) { transition-delay: 0.18s; }
.work-list .reveal:nth-child(5) { transition-delay: 0.24s; }
