/* ============================================================
   yerragondu.com — Nikhil Reddy Yerragondu
   Minimal / typographic. Light + dark, system-aware with toggle.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg:        #faf9f7;
  --bg-alt:    #f3f1ed;
  --surface:   #ffffff;
  --ink:       #16150f;
  --ink-2:     #45433c;
  --ink-3:     #76736a;
  --rule:      #e2dfd8;
  --rule-2:    #d3cfc5;
  --accent:    #9c4a16;
  --accent-2:  #c2611f;
  --accent-wash: #f4e9df;
  --shadow:    0 1px 2px rgba(22,21,15,.04), 0 8px 24px -12px rgba(22,21,15,.10);
  --shadow-lg: 0 2px 4px rgba(22,21,15,.05), 0 20px 48px -20px rgba(22,21,15,.18);

  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1140px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0e0e10;
    --bg-alt:    #141417;
    --surface:   #18181b;
    --ink:       #ecebe7;
    --ink-2:     #b6b4ad;
    --ink-3:     #87857e;
    --rule:      #26262a;
    --rule-2:    #35353a;
    --accent:    #e39a63;
    --accent-2:  #f0b183;
    --accent-wash: #241a12;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 20px 48px -20px rgba(0,0,0,.75);
  }
}

:root[data-theme="dark"] {
  --bg:        #0e0e10;
  --bg-alt:    #141417;
  --surface:   #18181b;
  --ink:       #ecebe7;
  --ink-2:     #b6b4ad;
  --ink-3:     #87857e;
  --rule:      #26262a;
  --rule-2:    #35353a;
  --accent:    #e39a63;
  --accent-2:  #f0b183;
  --accent-wash: #241a12;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.45), 0 20px 48px -20px rgba(0,0,0,.75);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.12; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

::selection { background: var(--accent); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: .7rem 1.1rem; font-size: .85rem;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-head { background: var(--bg); }
}

.head-inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 62px;
}

.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; min-width: 0; }
.brand-mark {
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .02em;
  border: 1px solid var(--rule-2); border-radius: 50%;
  color: var(--ink-2);
  transition: border-color .25s, color .25s;
}
.brand:hover .brand-mark { border-color: var(--accent); color: var(--accent); }
.brand-name {
  font-family: var(--serif); font-size: 1.02rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav { display: flex; gap: 1.5rem; }
.nav a {
  position: relative;
  font-size: .845rem; color: var(--ink-3);
  letter-spacing: .005em;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 1px; background: var(--accent);
  transition: right .3s cubic-bezier(.2,.8,.2,1);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { right: 0; }

.theme-btn {
  flex: none;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  transition: border-color .2s, color .2s, transform .2s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(-12deg); }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.ico-moon { display: none; }
:root[data-theme="dark"] .ico-sun { display: none; }
:root[data-theme="dark"] .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico-sun { display: none; }
  :root:not([data-theme="light"]) .ico-moon { display: block; }
  :root[data-theme="dark"] .ico-sun { display: none; }
}

.menu-btn { display: none; flex: none; width: 34px; height: 34px; }
.menu-btn span {
  display: block; height: 1.5px; width: 19px; margin: 4px auto;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.site-head.is-open .menu-btn span:first-child { transform: translateY(3px) rotate(45deg); }
.site-head.is-open .menu-btn span:last-child { transform: translateY(-2.5px) rotate(-45deg); }

.progress {
  height: 1.5px; width: 0%;
  background: var(--accent);
  transition: width .08s linear;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .715rem;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.6rem;
}

.pulse {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: #2e9e5b;
  box-shadow: 0 0 0 0 rgba(46,158,91,.55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,158,91,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(46,158,91,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,158,91,0); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 8.5vw, 5.6rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.headline {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.3vw, 1.44rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
  font-weight: 300;
}
.headline strong { color: var(--ink); font-weight: 500; }

.meta-line {
  margin-top: 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  font-size: .86rem; color: var(--ink-3);
}
.meta-line .sep { color: var(--rule-2); }

.cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.5rem;
  font-size: .875rem; font-weight: 450; letter-spacing: .005em;
  border-radius: 100px; border: 1px solid transparent;
  transition: background .22s, color .22s, border-color .22s, transform .22s;
}
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); transform: translateY(-1px); }
.btn-ghost { border-color: var(--rule-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.socials {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
.socials a {
  font-family: var(--mono); font-size: .76rem;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }

/* portrait — full colour, always */
.hero-portrait { position: sticky; top: 94px; }
.portrait-frame {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-alt);
}
.portrait-frame::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  pointer-events: none;
}
.portrait-frame img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.portrait-frame:hover img { transform: scale(1.03); }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(3rem, 7vw, 5rem);
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.stats > div { background: var(--bg); padding: 1.5rem 1.4rem; }
.stats dt {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 400; letter-spacing: -0.03em;
  color: var(--accent);
  margin-bottom: .4rem;
}
.stats dd {
  margin: 0;
  font-size: .815rem; line-height: 1.5; color: var(--ink-2);
}
.stats dd span { color: var(--ink-3); }

/* ---------- sections ---------- */
.sec { padding: clamp(4rem, 9vw, 7rem) 0; }
.sec-alt { background: var(--bg-alt); }

.sec-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.4rem);
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.sec-num {
  font-family: var(--mono); font-size: .72rem;
  color: var(--accent); letter-spacing: .08em;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 300; letter-spacing: -0.028em;
}
.sec-sub {
  grid-column: 2;
  font-size: .9rem; color: var(--ink-3); margin-top: .5rem;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

.prose p { margin-bottom: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose .lede {
  font-family: var(--serif);
  font-size: clamp(1.18rem, 2.4vw, 1.5rem);
  line-height: 1.5; font-weight: 300;
  color: var(--ink);
  margin-bottom: 1.6rem;
}

.about-side { display: grid; gap: 1rem; position: sticky; top: 94px; }
.side-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}
.side-card h3 {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .95rem;
}

.pill-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill-list li {
  font-size: .78rem;
  padding: .3rem .72rem;
  border: 1px solid var(--rule-2);
  border-radius: 100px;
  color: var(--ink-2);
}

.tick-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: .865rem; color: var(--ink-2);
  margin-bottom: .5rem;
}
.tick-list li:last-child { margin-bottom: 0; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

.side-note { font-size: .865rem; color: var(--ink-2); }

/* ---------- timeline ---------- */
.timeline { display: grid; gap: 0; }

.tl-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) 0;
  border-top: 1px solid var(--rule);
}
.tl-item:first-child { border-top: 0; padding-top: 0; }

.tl-side { position: relative; }
.tl-dates {
  font-family: var(--mono); font-size: .735rem;
  letter-spacing: .02em; color: var(--ink-2);
  white-space: nowrap;
}
.tl-dur {
  font-family: var(--mono); font-size: .7rem;
  color: var(--ink-3); margin-top: .25rem;
}

.tl-top { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.tl-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.3vw, 1.42rem);
  font-weight: 400; letter-spacing: -0.02em;
}

.tag {
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .22rem .6rem;
  border: 1px solid var(--rule-2); border-radius: 100px;
  color: var(--ink-3);
}
.tag-now {
  background: var(--accent-wash);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .tag-now { border-color: var(--accent); }
}

.tl-org {
  margin-top: .5rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  font-size: .85rem; color: var(--ink-2);
}
.dot {
  display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: var(--rule-2);
}

.tl-points { margin-top: 1.1rem; }
.tl-points li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .905rem; line-height: 1.62;
  color: var(--ink-2);
  margin-bottom: .62rem;
}
.tl-points li:last-child { margin-bottom: 0; }
.tl-points li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 7px; height: 1px;
  background: var(--rule-2);
}

.tl-skills {
  margin-top: 1.1rem;
  font-family: var(--mono); font-size: .715rem;
  line-height: 1.75; color: var(--ink-3);
}
.tl-skills span {
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent);
  margin-right: .55rem;
}

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 2.2rem; }
.chip {
  font-size: .79rem;
  padding: .42rem 1rem;
  border: 1px solid var(--rule-2); border-radius: 100px;
  color: var(--ink-3);
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1rem;
}

.proj {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.6rem 1.6rem;
  display: flex; flex-direction: column;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.proj:hover {
  border-color: var(--rule-2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.proj.is-hidden { display: none; }

.proj-feat { grid-column: span 2; }
@media (max-width: 760px) { .proj-feat { grid-column: span 1; } }

.proj-when {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .7rem;
}
.proj h3 {
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  font-weight: 400; letter-spacing: -0.018em;
  margin-bottom: 1rem;
}

.proj-points { margin-bottom: 1.1rem; }
.proj-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .875rem; line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: .55rem;
}
.proj-points li:last-child { margin-bottom: 0; }
.proj-points li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 6px; height: 1px; background: var(--rule-2);
}

.proj-stack {
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .705rem;
  line-height: 1.7; color: var(--ink-3);
}
.proj-links { margin-top: .85rem; }
.proj-links a {
  font-family: var(--mono); font-size: .735rem;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.proj-links a:hover { border-color: var(--accent); }

.proj-empty {
  padding: 2.5rem 0;
  text-align: center;
  font-size: .9rem; color: var(--ink-3);
}

.proj-more {
  margin-top: 2rem;
  font-size: .89rem; color: var(--ink-3);
}
.proj-more a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.proj-more a:hover { border-color: var(--accent); }

/* ---------- research ---------- */
.paper {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  padding: clamp(1.75rem, 4vw, 2.6rem);
  max-width: 820px;
  box-shadow: var(--shadow);
}
.paper-badge {
  font-family: var(--mono); font-size: .69rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.paper h3 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 300; letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}
.paper-abs {
  font-size: .95rem; line-height: 1.68;
  color: var(--ink-2);
  margin-bottom: 1.7rem;
  max-width: 62ch;
}
.paper-abs strong { color: var(--ink); font-weight: 500; }

/* ---------- skills ---------- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.skill-col { background: var(--bg); padding: 1.5rem 1.5rem 1.6rem; }
.skill-col h3 {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--rule);
}
.skill-col ul { display: grid; gap: .42rem; }
.skill-col li { font-size: .855rem; color: var(--ink-2); line-height: 1.45; }

/* ---------- education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.edu {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow);
}
.edu-when {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.edu h3 {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: .5rem;
}
.edu-deg { font-size: .915rem; color: var(--ink-2); }
.edu-gpa, .edu-act {
  margin-top: .65rem;
  font-size: .845rem; color: var(--ink-2);
}
.edu-gpa span, .edu-act span {
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  margin-right: .5rem;
}

.edu details { margin-top: 1.2rem; border-top: 1px solid var(--rule); padding-top: .9rem; }
.edu summary {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: .5rem;
  transition: color .2s;
}
.edu summary::-webkit-details-marker { display: none; }
.edu summary::after {
  content: "+"; margin-left: auto;
  font-family: var(--mono); font-size: .95rem;
  color: var(--accent);
  transition: transform .25s;
}
.edu details[open] summary::after { content: "–"; }
.edu summary:hover { color: var(--ink); }
.edu details p {
  margin-top: .85rem;
  font-size: .835rem; line-height: 1.75; color: var(--ink-2);
}

/* certifications */
.certs-h {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.cert-list {
  border-top: 1px solid var(--rule);
}
.cert-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 90px;
  gap: 1rem;
  align-items: baseline;
  padding: .85rem .25rem;
  border-bottom: 1px solid var(--rule);
  transition: background .2s;
}
.cert-list li:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .cert-list li:hover { background: var(--accent-wash); }
}
.cert-n { font-size: .9rem; color: var(--ink); }
.cert-i { font-size: .83rem; color: var(--ink-2); }
.cert-d {
  font-family: var(--mono); font-size: .72rem;
  color: var(--ink-3); text-align: right;
}

/* ---------- contact ---------- */
.sec-contact { border-top: 1px solid var(--rule); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}
.contact-lede {
  font-family: var(--serif);
  font-size: clamp(1.18rem, 2.6vw, 1.55rem);
  line-height: 1.5; font-weight: 300;
  color: var(--ink);
  max-width: 34ch;
}
.contact-avail {
  margin-top: 1.5rem;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .715rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}

.contact-links { border-top: 1px solid var(--rule); }
.contact-links a {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.05rem .25rem;
  border-bottom: 1px solid var(--rule);
  transition: padding-left .25s, background .25s;
}
.contact-links a:hover { padding-left: .9rem; }
.contact-links span {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3);
}
.contact-links strong {
  font-weight: 400; font-size: .945rem; color: var(--ink);
  word-break: break-word;
  transition: color .25s;
}
.contact-links a:hover strong { color: var(--accent); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  background: var(--bg-alt);
}
.foot-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: .715rem;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.foot-dom { color: var(--accent); }
.foot-inner a { border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.foot-inner a:hover { color: var(--ink); border-color: var(--rule-2); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 220px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 62px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: .5rem var(--pad) 1.5rem;
    transform: translateY(-120%);
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
    box-shadow: var(--shadow-lg);
  }
  .site-head.is-open .nav { transform: none; }
  .nav a {
    padding: .85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .menu-btn { display: block; }
  .brand-name { font-size: .95rem; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { position: static; max-width: 220px; order: -1; }
  .tl-item { grid-template-columns: 1fr; gap: .9rem; }
  .tl-side { display: flex; align-items: baseline; gap: .8rem; }
  .tl-dur::before { content: "·"; margin-right: .6rem; color: var(--rule-2); }
  .tl-dur { margin-top: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .cert-list li { grid-template-columns: 1fr; gap: .2rem; padding: .95rem .25rem; }
  .cert-d { text-align: left; }
  .sec-head { grid-template-columns: 1fr; gap: .35rem; }
  .sec-sub { grid-column: 1; }
}

@media (max-width: 560px) {
  .skill-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .contact-links a { grid-template-columns: 1fr; gap: .2rem; }
}

/* ---------- print ---------- */
@media print {
  .site-head, .site-foot, .filters, .cta, .theme-btn, .menu-btn, .proj-more { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .sec, .hero { padding: 1.2rem 0; page-break-inside: avoid; }
  .sec-alt { background: #fff; }
  .proj, .edu, .paper, .side-card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  .hero-portrait { max-width: 120px; }
  .edu details { display: none; }
  a { color: #000; }
}
