/* Srinath Gopinath, personal site */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --panel: #0f2233;      /* deep navy for hero/footer */
  --panel-2: #14304a;
  --ink: #16232e;
  --muted: #4a5866;
  --muted-light: #b7c4d0;
  --accent: #135a86;
  --accent-dark: #0d425f;
  --accent-soft: #e7eef4;
  --brand-blue: #1d4ed8;
  --brand-navy: #0b1f4d;
  --rule: #e3ddd1;
  --rule-dark: #24435f;
  --maxw: 76rem;
  --maxw-text: 46rem;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.22; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.05rem, 5vw, 3.2rem); margin: 0 0 1.1rem; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.7rem); margin: 2.75rem 0 0.85rem; }
h3 { font-size: 1.18rem; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1.02rem; margin: 1.4rem 0 0.4rem; font-family: var(--sans); font-weight: 700; color: var(--accent-dark); }
p { margin: 0 0 1.1rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
ul { padding-left: 1.15rem; margin: 0 0 1.1rem; }
li { margin-bottom: 0.65rem; }
li::marker { color: var(--accent); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.text { max-width: var(--maxw-text); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { left: 0.5rem; top: 0.5rem; border-radius: 4px; }

/* thin brand rule at very top */
body::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--accent) 0%, var(--panel-2) 70%, var(--panel) 100%); }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(246,244,239,0.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.site-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-name:hover { color: var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; padding: 0.35rem 0.7rem; border-radius: 4px; transition: color .15s, background .15s; }
.site-header nav a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.site-header nav a[aria-current="page"] { color: var(--panel); background: var(--accent-soft); font-weight: 600; }

main { padding: 0 0 4.5rem; }

/* hero (homepage) */
.hero {
  background:
    radial-gradient(60% 90% at 88% 12%, rgba(37,99,235,0.10) 0%, rgba(37,99,235,0) 60%),
    linear-gradient(160deg, #eef4fc 0%, #e7effb 45%, #dfe9fa 100%);
  border-bottom: 1px solid #d3e0f2;
  padding: clamp(3rem, 6vw, 4.75rem) 0 clamp(2.5rem, 5vw, 3.75rem);
  position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(37,99,235,0.10) 1px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 42%); mask-image: linear-gradient(90deg, #000 0%, transparent 42%); opacity: 0.6; pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; position: relative; z-index: 1; }
.hero .eyebrow { color: var(--brand-blue); }
.hero h1 { color: var(--brand-navy); max-width: 16ch; font-weight: 700; }
.hero h1 .hl { color: var(--brand-blue); }
.hero .lead { color: #33415a; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.hero .rule { width: 3.5rem; height: 3px; background: var(--brand-blue); border: 0; margin: 0 0 1.5rem; }

/* capability chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips span { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-navy); background: #ffffff; border: 1px solid #d3e0f2; border-radius: 999px; padding: 0.4rem 0.85rem; box-shadow: 0 6px 16px -12px rgba(11,31,77,0.4); }
.chips svg { width: 15px; height: 15px; flex: none; color: var(--brand-blue); }

/* headshot */
.headshot { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1 / 1; margin-left: auto; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--panel-2), var(--panel)); box-shadow: 0 18px 44px -20px rgba(11,31,77,0.55); border: 1px solid #cdd9ee; }
.headshot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.headshot .mono { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 3.5rem; color: #a9c4e6; letter-spacing: 0.04em; }
.headshot.about { max-width: 220px; float: right; margin: 0.25rem 0 1.25rem 1.75rem; }

/* generic page intro (inner pages) */
.page-intro { padding: clamp(2.5rem, 5vw, 3.75rem) 0 0.5rem; }

.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.72rem; font-weight: 500; color: var(--accent); margin: 0 0 1rem; }
.lead { font-size: 1.16rem; line-height: 1.6; color: var(--ink); }
.muted { color: var(--muted); }
.section { padding-top: 3rem; }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; margin-top: -2.5rem; position: relative; z-index: 2; }
.pillars-wrap { padding-top: 0; }
.card { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 8px; padding: 1.6rem 1.6rem 1.75rem; box-shadow: 0 1px 2px rgba(16,34,51,0.04), 0 12px 28px -18px rgba(16,34,51,0.25); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(16,34,51,0.05), 0 18px 36px -18px rgba(16,34,51,0.32); }
.card .num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); }
.card h2 { margin: 0.4rem 0 0.6rem; font-size: 1.28rem; }
.card p { font-size: 0.98rem; color: var(--muted); }
.card .go { display: inline-block; font-weight: 600; font-size: 0.92rem; text-decoration: none; margin-top: 0.25rem; }
.card .go:hover { text-decoration: underline; }
.card .go::after { content: " \2192"; }

/* note / callout */
.note { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; padding: 1.35rem 1.6rem; margin: 1.5rem 0; box-shadow: 0 10px 26px -20px rgba(16,34,51,0.28); }
.note p:last-child { margin-bottom: 0; }
.note h3:first-child { margin-top: 0; }

.strip { border-top: 1px solid var(--rule); margin-top: 3.25rem; padding-top: 1.75rem; }

/* compact framework grid, used inside long-form articles */
.framework-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; margin: 1.1rem 0 1.5rem; padding: 0; list-style: none; }
.framework-grid li { margin: 0; }
.framework-item { height: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 0.9rem 1.05rem; background: var(--surface); }
.framework-item .fnum { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.3rem; }
.framework-item h4 { margin: 0 0 0.3rem; font-size: 0.97rem; }
.framework-item p { margin: 0; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 620px) { .framework-grid { grid-template-columns: 1fr; } }

/* post cover image inside a writing article */
.post-cover { margin: 0 0 1.1rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 10px 26px -20px rgba(16,34,51,0.3); }
.post-cover img { display: block; width: 100%; height: auto; }
.post-cover.wide { max-width: 100%; }
.post-cover.card-shape { max-width: 22rem; }

/* carousel-style image gallery inside a writing article */
.post-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin: 0.25rem 0 1.5rem; padding: 0; list-style: none; }
.post-gallery li { margin: 0; }
.post-gallery figure { margin: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 8px 20px -16px rgba(16,34,51,0.35); }
.post-gallery img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .post-gallery { grid-template-columns: repeat(2, 1fr); } }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; padding: 0.2rem 0.7rem; margin: 0 0.35rem 0.5rem 0; }

/* footer */
.site-footer { background: var(--panel); color: var(--muted-light); padding: 3rem 0 2.5rem; margin-top: 3.5rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.75rem; }
.footer-brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: #eef3f7; margin-bottom: 0.4rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.site-footer a { color: var(--muted-light); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .fine { font-size: 0.82rem; color: #7d8fa0; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule-dark); }

@media (max-width: 800px) {
  .pillars { grid-template-columns: 1fr; margin-top: 1.75rem; }
  .site-header { position: static; }
  .footer-grid { flex-direction: column; gap: 1.25rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .headshot { order: -1; max-width: 220px; margin: 0 0 1.5rem; }
  .headshot.about { float: none; margin: 0 0 1.25rem; }
}
