/* Suprith KG portfolio. Palette: daylight paper / night-shift indigo, with a sodium-lamp amber for the support shift and a resolved teal. */

@font-face { font-family: "Bricolage Grotesque"; src: url("assets/fonts/bricolage-var.woff2") format("woff2"); font-weight: 600 800; font-stretch: 75% 92%; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("assets/fonts/plex-sans-var.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --ink: #151A30;
  --muted: #555D7C;
  --line: #D4D9E6;
  --track: #E2E7F1;
  --night: rgba(21, 26, 48, 0.10);
  --amber: #F2B451;
  --amber-ink: #8A5208;
  --teal: #17766B;
  --solid-ink: #FFFFFF;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121733;
    --surface: #1A2045;
    --ink: #E8EBF4;
    --muted: #A2AAC8;
    --line: #2C3462;
    --track: #1F2654;
    --night: rgba(0, 0, 0, 0.32);
    --amber: #F0B04A;
    --amber-ink: #F0B04A;
    --teal: #55C9B8;
    --solid-ink: #121733;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121733;
  --surface: #1A2045;
  --ink: #E8EBF4;
  --muted: #A2AAC8;
  --line: #2C3462;
  --track: #1F2654;
  --night: rgba(0, 0, 0, 0.32);
  --amber: #F0B04A;
  --amber-ink: #F0B04A;
  --teal: #55C9B8;
  --solid-ink: #121733;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--amber); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-variation-settings: "wdth" 88, "opsz" 72;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
h3 { font-size: 1.3rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--surface); padding: .5rem 1rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.mark { font-family: var(--display); font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.top nav { display: flex; gap: 1.25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { text-decoration: none; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current="true"] { color: var(--ink); }
.theme {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.theme svg { width: 18px; height: 18px; fill: currentColor; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  font: 500 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--ink); color: var(--solid-ink); }
.btn-solid { background: var(--ink); color: var(--solid-ink); }
.btn-solid:hover { background: transparent; color: var(--ink); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: end;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem);
}
.avail { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .98rem; margin-bottom: 1.5rem; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.hero h1 {
  font-size: clamp(3.6rem, 11.5vw, 8.75rem);
  font-weight: 800;
  font-variation-settings: "wdth" 76, "opsz" 96;
  line-height: .86;
  letter-spacing: -0.035em;
  margin-bottom: 1.6rem;
}
.role { font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 600; line-height: 1.25; max-width: 26ch; font-variation-settings: "wdth" 92; }
.lede { margin-top: 1.1rem; color: var(--muted); max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { border-radius: 28px 28px 28px 6px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; width: 100%; }

/* Coverage board: the one bold moment */
.shift { overflow-x: clip; background: var(--surface); border-block: 1px solid var(--line); padding-block: clamp(3rem, 7vw, 5rem); }
.shift-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 4rem; align-items: end; margin-bottom: 2.5rem; }
.shift-head p { color: var(--muted); max-width: 52ch; }
.board { margin-top: 3.5rem; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.25rem; }
.labels { display: grid; grid-auto-rows: 56px; }
.labels span { display: flex; align-items: center; font-weight: 500; white-space: nowrap; }
.tracks { position: relative; display: grid; grid-auto-rows: 56px; }
.track { position: relative; border-top: 1px solid var(--line); background: var(--track); }
.track:last-of-type { border-bottom: 1px solid var(--line); }
.ticks span {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font-size: .78rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ticks span:first-child { transform: translate(0, -50%); padding-left: .4rem; }
.band {
  position: absolute; top: -28px; bottom: 0; left: calc(100% * 20 / 24); right: 0;
  background: color-mix(in srgb, var(--amber) 34%, transparent);
  border-left: 2px solid var(--amber);
  pointer-events: none;
}
.band span {
  position: absolute; top: 4px; right: .5rem; font-size: .82rem; font-weight: 600;
  color: var(--amber-ink); white-space: nowrap;
}
.now {
  position: absolute; top: -28px; bottom: -6px; width: 2px; left: 0;
  background: var(--teal); transition: left .9s cubic-bezier(.2, .7, .2, 1);
}
.now span {
  position: absolute; bottom: -1.6rem; left: 50%; transform: translateX(-50%);
  font-size: .8rem; font-weight: 600; color: var(--teal);
}
.readout { margin-top: 2.5rem; color: var(--muted); max-width: 70ch; }
.readout strong { color: var(--ink); font-weight: 600; }

/* Support process */
.support { padding-block: clamp(4rem, 9vw, 7rem); }
.steps {
  list-style: none; padding: 0; margin: 2.75rem 0 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.75rem;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  font-variation-settings: "wdth" 76; color: var(--teal); margin-bottom: .75rem;
}
.steps h3 { margin-bottom: .45rem; }
.steps p { color: var(--muted); font-size: .98rem; }
.questions { margin-top: clamp(3rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; }
.questions ul { list-style: none; margin: 0; padding: 0; }
.questions li { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1.08rem; }
.questions li:first-child { border-top: 1px solid var(--line); }

/* Incident write-up */
.incident { padding-bottom: clamp(4rem, 9vw, 7rem); }
.report {
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--amber);
  border-radius: 6px 18px 18px 6px; padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 900px;
}
.report-kind { color: var(--amber-ink); font-weight: 600; margin-bottom: .5rem; }
.report h2 { margin-bottom: 1.5rem; max-width: 22ch; }
.report > p { max-width: 64ch; }
.report-meta { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0 0 1.5rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--line); }
.report-meta dt { color: var(--muted); font-size: .88rem; }
.report-meta dd { margin: 0; font-weight: 600; }
.log { list-style: none; margin: 1.75rem 0; padding: 0; border-left: 2px solid var(--line); }
.log li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: .6rem 0 .6rem 1.25rem; position: relative; }
.log li::before { content: ""; position: absolute; left: -6px; top: 1.05rem; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--teal); }
.log li:last-child::before { background: var(--teal); }
.log-when { font-family: var(--mono); font-size: .9rem; color: var(--teal); padding-top: .1rem; }
.takeaway { font-family: var(--display); font-size: 1.25rem; font-weight: 600; line-height: 1.35; font-variation-settings: "wdth" 92; }

/* Work timeline */
.work { padding-bottom: clamp(4rem, 9vw, 7rem); }
.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; padding: 1.75rem 0; border-top: 1px solid var(--line); }
.when { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .2rem; }
.what h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-bottom: .6rem; font-size: 1.5rem; }
.what h3 span { font-family: var(--body); font-weight: 400; font-size: 1rem; color: var(--muted); }
.what p, .what ul { max-width: 64ch; }
.what ul { margin: 0; padding-left: 1.1rem; }
.what li + li { margin-top: .45rem; }
.logo { width: 34px; height: 34px; border-radius: 8px; }

/* Builds */
.builds { padding-bottom: clamp(4rem, 9vw, 7rem); }
.builds figure { margin: 0; position: relative; }
.builds figcaption {
  position: absolute; right: .75rem; bottom: .75rem; font-size: .75rem;
  background: rgba(10, 12, 24, .72); color: #E8EBF4; padding: .2rem .55rem; border-radius: 999px;
}
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: 2.5rem; }
.feature img { border-radius: 22px; }
.feature h3 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; font-variation-settings: "wdth" 80; }
.feature .sub { color: var(--muted); margin: .25rem 0 1rem; }
.feature-text > p { max-width: 50ch; }
.stack { margin-top: 1rem; font-size: .92rem; color: var(--teal); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; margin-top: clamp(2.5rem, 6vw, 4rem); }
.trio img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.trio h3 { margin: 1rem 0 .35rem; }
.trio p { color: var(--muted); font-size: .98rem; }

/* Open source */
.oss { padding-bottom: clamp(4rem, 9vw, 7rem); }
.oss-banner { margin: 2.5rem 0 2rem; }
.oss-banner img { border-radius: 18px; width: 100%; aspect-ratio: 2.3 / 1; object-fit: cover; object-position: 50% 48%; }
.oss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.oss-grid h3 { margin-bottom: .6rem; }
.oss-grid p { max-width: 56ch; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; }
.links a { color: var(--teal); font-weight: 500; }

/* Toolkit */
.toolkit { padding-bottom: clamp(4rem, 9vw, 7rem); }
.kit { margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.kit > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.kit dt { color: var(--muted); font-size: .92rem; margin-bottom: .2rem; }
.kit dd { margin: 0; font-size: 1.12rem; font-weight: 500; }

/* Beyond */
.beyond { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-bottom: clamp(4rem, 9vw, 7rem); }
.beyond figure { margin: 0; }
.beyond img { border-radius: 6px 28px 28px 28px; aspect-ratio: 1; object-fit: cover; }
.beyond h2 { margin-bottom: 1.5rem; }
.beyond p { max-width: 52ch; }
.beyond p + p { margin-top: 1rem; }

/* Contact */
.contact { background: var(--ink); color: var(--bg); padding-block: clamp(4rem, 9vw, 6.5rem); }
.contact h2 { max-width: 16ch; }
.contact > .wrap > p { margin-top: 1rem; color: color-mix(in srgb, var(--bg) 75%, transparent); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.email {
  font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 84;
  font-size: clamp(1.5rem, 4.6vw, 3rem); letter-spacing: -0.02em; text-decoration: none; overflow-wrap: anywhere;
  border-bottom: 3px solid var(--amber);
}
.contact .btn { border-color: var(--bg); color: var(--bg); }
.contact .btn:hover { background: var(--bg); color: var(--ink); }
.elsewhere { list-style: none; padding: 0; margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.elsewhere a { font-weight: 500; }

.foot { padding: 1.75rem 0 2.25rem; color: var(--muted); font-size: .9rem; }

/* Responsive */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .questions { grid-template-columns: 1fr; }
  .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shift-head { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top nav { display: none; }
  .theme { margin-left: auto; }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-photo { order: -1; max-width: 260px; }
  .hero-photo img { aspect-ratio: 1; border-radius: 22px 22px 22px 6px; }
  .feature, .oss-grid, .kit, .beyond { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; }
  .timeline > li { grid-template-columns: 1fr; gap: .4rem; }
  .log li { grid-template-columns: 1fr; gap: .1rem; }
  .labels span { font-size: .85rem; }
  .ticks span.minor, .ticks span.mid { display: none; }
  .band span { right: calc(100% + .4rem); }
  .beyond figure { max-width: 320px; }
}
@media (max-width: 460px) {
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .now, .btn { transition: none; }
}
