/* =======================================================
   Srikar Vardhan — portfolio styles (shared across pages)
   Palette: warm paper, ink black, single garnet accent.
   ======================================================= */
:root {
  --bg: #faf8f4;
  --bg-2: #f1ece4;
  --card: #ffffff;
  --ink: #1a1613;
  --ink-soft: #5b554d;
  --ink-faint: #938c82;
  --line: #e7e1d7;
  --accent: #8c2f39;
  --accent-soft: #a84551;
  --navy: #23425f;
  --shadow: 0 1px 2px rgba(26,22,19,.04), 0 6px 22px rgba(26,22,19,.05);
  --shadow-lg: 0 20px 48px rgba(26,22,19,.12);
  --radius: 12px;
  --maxw: 1000px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px; line-height: 1.62; -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: 'Newsreader', Georgia, serif; font-weight: 500; line-height: 1.18; letter-spacing: -.01em; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mono { font-family: 'JetBrains Mono', monospace; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }
.muted { color: var(--ink-soft); }
img { max-width: 100%; display: block; }

/* ---------- nav ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,244,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.nav-name { font-family: 'Newsreader', serif; font-size: 19px; font-weight: 600; color: var(--ink); }
.nav-name:hover { text-decoration: none; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.current { color: var(--ink); }
.nav-links a.current::after { content: ""; display: block; height: 2px; background: var(--accent); margin-top: 2px; border-radius: 2px; }
@media (max-width: 680px){ .nav-links { gap: 16px; } .nav-links a { font-size: 13.5px; } .nav-name { font-size: 17px; } }

/* ---------- generic page ---------- */
.page { padding: 56px 0 72px; }
.page-head { margin-bottom: 40px; }
.kicker { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 500; color: var(--accent); letter-spacing: .12em; text-transform: uppercase; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); margin: 10px 0 0; }
.page-head p { color: var(--ink-soft); font-size: 18px; max-width: 62ch; margin: 14px 0 0; }
section + section { margin-top: 56px; }
.sec-title { font-size: 14px; font-weight: 600; font-family: 'Inter',sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 22px; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 9px; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); border-color: #d8d0c2; }
.btn.solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); }
.btn.sm { padding: 8px 15px; font-size: 13.5px; }

/* ---------- home hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 58px); margin: 0 0 6px; letter-spacing: -.02em; }
.hero .sub { font-size: clamp(17px,2.2vw,20px); color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.hero p { font-size: 18.5px; color: var(--ink-soft); max-width: 56ch; }
.hero p b { color: var(--ink); font-weight: 600; }
.portrait { width: 220px; height: 268px; border-radius: 14px; background: var(--bg-2); object-fit: cover; box-shadow: var(--shadow-lg); }
.portrait-fallback {
  width: 220px; height: 268px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--navy), var(--accent)); color: #fff;
  font-family: 'Newsreader', serif; font-size: 68px; box-shadow: var(--shadow-lg);
}
@media (max-width: 760px){
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait, .portrait-fallback { width: 150px; height: 184px; font-size: 48px; order: -1; }
}

/* ---------- facts row ---------- */
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.fact { font-size: 14.5px; color: var(--ink-soft); }
.fact b { color: var(--ink); font-weight: 600; }

/* ---------- cards grid ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px){ .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: .18s ease;
  display: flex; flex-direction: column; gap: 10px; height: 100%;
}
a.card { color: var(--ink); }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d8d0c2; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 19px; }
.card .stars { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); white-space: nowrap; }
.card .desc { font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--bg-2); color: var(--ink-soft); }
.card .go { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ---------- services ---------- */
.svc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); height: 100%; }
.svc h3 { font-size: 20px; margin-bottom: 8px; }
.svc p { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 12px; }
.svc .proof { font-size: 12.5px; color: var(--ink-faint); font-family: 'JetBrains Mono', monospace; }
.svc .proof a { color: var(--ink-faint); }

/* ---------- publications ---------- */
.pub { padding: 26px 0; border-top: 1px solid var(--line); display: flex; gap: 22px; }
.pub:first-of-type { border-top: none; padding-top: 6px; }
.pub-year { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--ink-faint); min-width: 46px; padding-top: 6px; }
.pub-body { flex: 1; }
.pub-flag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.pub h3 { font-size: 21px; margin-bottom: 6px; }
.pub .authors { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 8px; }
.pub .authors b { color: var(--ink); font-weight: 600; }
.pub .venue { font-size: 13.5px; color: var(--navy); font-weight: 600; }
.pub .venue.review { color: var(--accent); }
.pub .summary { font-size: 15px; color: var(--ink-soft); margin: 12px 0 0; }
.pub .pub-links { margin-top: 12px; }
@media (max-width: 600px){ .pub { flex-direction: column; gap: 8px; } }

/* ---------- timeline ---------- */
.tl { display: flex; gap: 22px; padding: 22px 0; border-top: 1px solid var(--line); }
.tl:first-of-type { border-top: none; }
.tl .when { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--ink-faint); min-width: 150px; padding-top: 3px; }
.tl .role { font-weight: 600; font-size: 17px; }
.tl .org { color: var(--accent); font-weight: 600; }
.tl .what { font-size: 15px; color: var(--ink-soft); margin-top: 4px; }
@media (max-width: 600px){ .tl { flex-direction: column; gap: 6px; } .tl .when { min-width: auto; } }

/* ---------- skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
@media (max-width: 680px){ .skills { grid-template-columns: 1fr; } }
.skills h4 { font-family: 'Inter',sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13.5px; padding: 6px 13px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); }

/* ---------- contact block ---------- */
.contact { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 44px 36px; }
.contact h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 12px; }
.contact p { color: var(--ink-soft); font-size: 18px; max-width: 52ch; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 34px 0; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.foot-copy { color: var(--ink-faint); font-size: 13.5px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }
