/* ============================================================
   KIYAS MAHMUD · academic portfolio
   Amber accent on a blue-black field, over an engineered grid.
   Type: Unbounded (display) · Schibsted Grotesk (body) · Martian Mono (labels)
   ============================================================ */

:root {
  --void: #06080f;
  --void-soft: #0a0e1c;
  --ink: #e9ebf5;
  --muted: #9aa1b8;
  --faint: #5d6478;

  --accent: #f0a64b;
  --accent-rgb: 240, 166, 75;
  --accent-soft: rgba(240, 166, 75, 0.12);
  --accent-deep: #c97f2e;
  --green: #6fcf97;
  --blue: #7aa2f7;

  --line: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(14, 18, 32, 0.62);
  --glass-bg-strong: rgba(14, 18, 32, 0.82);
  --glass-brd: rgba(255, 255, 255, 0.1);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --glass-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);

  --grid-cell: 56px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", system-ui, sans-serif;
  --font-mono: "Martian Mono", ui-monospace, monospace;

  --section-pad: clamp(4.5rem, 11vh, 8rem);
  --gutter: clamp(1rem, 5vw, 4rem);
  --radius: 18px;
}

@supports (color: oklch(50% 0.1 200)) {
  :root {
    --void: oklch(13% 0.014 262);
    --void-soft: oklch(16.5% 0.02 262);
    --ink: oklch(93.5% 0.009 270);
    --muted: oklch(70% 0.02 268);
    --accent: oklch(78.5% 0.132 71);
    --accent-deep: oklch(65% 0.124 66);
  }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0325rem;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

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

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--void);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   BACKGROUND · grid
   ============================================================ */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* fade the grid out toward the edges so it frames, not fills */
  -webkit-mask-image: radial-gradient(
    ellipse 90% 80% at 50% 35%,
    #000 30%,
    rgba(0, 0, 0, 0.35) 75%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 90% 80% at 50% 35%,
    #000 30%,
    rgba(0, 0, 0, 0.35) 75%,
    transparent 100%
  );
}

.grid-lines,
#gridCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grid-lines {
  --gy: 0px;
  background-image:
    /* major lines every 4 cells */
    linear-gradient(rgba(255, 255, 255, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.085) 1px, transparent 1px),
    /* minor lines */
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size:
    calc(var(--grid-cell) * 4) calc(var(--grid-cell) * 4),
    calc(var(--grid-cell) * 4) calc(var(--grid-cell) * 4),
    var(--grid-cell) var(--grid-cell),
    var(--grid-cell) var(--grid-cell);
  background-position: 0 var(--gy);
}

/* soft amber light from the top so the field isn't flat */
.grid-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      60% 45% at 78% 0%,
      rgba(var(--accent-rgb), 0.09),
      transparent 70%
    ),
    radial-gradient(
      50% 40% at 0% 60%,
      rgba(122, 162, 247, 0.05),
      transparent 70%
    );
}

/* ============================================================
   GLASS / PANELS
   ============================================================ */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(12, 16, 30, 0.94);
  }
}

.panel {
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3.2vw, 2.2rem);
}

/* ============================================================
   NAV
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 0;
  transform: scaleX(0);
  z-index: 60;
}

.nav-wrap {
  position: fixed;
  top: clamp(0.6rem, 2vh, 1.1rem);
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: 0.5rem 0.55rem 0.5rem 1.1rem;
  border-radius: 14px;
  max-width: 1080px;
  width: 100%;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.is-scrolled {
  background: var(--glass-bg-strong);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  white-space: nowrap;
}

.nav-brand-mark {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: clamp(0.5rem, 1.4vw, 1.2rem);
}

.nav-links a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
  padding: 0.35rem 0.15rem;
  position: relative;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-cv {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.75rem 0.6rem;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out);
}

.nav-burger[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 8, 15, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.mobile-menu nav {
  display: grid;
  gap: 1.1rem;
  text-align: center;
}

.mobile-menu nav > a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
}

.mobile-menu .btn {
  margin-top: 0.8rem;
  justify-content: center;
}

/* ============================================================
   BUTTONS / LINKS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.93rem;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-solid {
  background: var(--accent);
  color: var(--void);
}

.btn-solid:hover {
  background: #f5b768;
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-brd);
  color: var(--ink);
}

.btn-glass:hover {
  border-color: rgba(var(--accent-rgb), 0.6);
  transform: translateY(-1px);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.42rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.link-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.link-btn i {
  font-size: 0.85em;
}

.link-live {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
}

.private-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  color: var(--faint);
}

/* ============================================================
   LAYOUT / SECTIONS
   ============================================================ */

main {
  position: relative;
  z-index: 2;
}

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--section-pad) var(--gutter);
}

.section-head {
  margin-bottom: clamp(2rem, 5vh, 3rem);
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.section-idx {
  color: var(--accent);
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 0.6rem;
  text-wrap: balance;
}

.sub-head {
  color: var(--accent);
  margin-bottom: 1rem;
}

.tag-line {
  color: var(--accent);
  font-size: 0.64rem;
}

.points {
  display: grid;
  gap: 0.65rem;
}

.points li {
  color: var(--muted);
  font-size: 0.95rem;
  padding-left: 1.15rem;
  position: relative;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 1.5px;
  background: var(--accent);
}

.tech {
  margin-top: 1.1rem;
  font-size: 0.62rem;
  line-height: 1.9;
  color: var(--faint);
}

/* Scroll reveals: a short, quiet fade (JS-gated) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(7rem, 16vh, 9.5rem) var(--gutter) clamp(3rem, 8vh, 5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 330px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(111, 207, 151, 0.18);
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 1.1rem 0 1rem;
}

.hero-role {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--accent);
}

.hero-lede {
  margin-top: 1.3rem;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--muted);
  max-width: 40rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.6rem;
}

.hero-social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-portrait {
  border-radius: var(--radius);
  padding: 0.7rem;
  position: relative;
}

/* corner registration marks: ties the photo to the grid */
.hero-portrait::before,
.hero-portrait::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  pointer-events: none;
}

.hero-portrait::before {
  top: -7px;
  left: -7px;
  border-width: 1.5px 0 0 1.5px;
}

.hero-portrait::after {
  bottom: -7px;
  right: -7px;
  border-width: 0 1.5px 1.5px 0;
}

.hero-portrait img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-portrait figcaption {
  margin-top: 0.7rem;
  text-align: center;
  font-size: 0.6rem;
}

.hero-stats {
  margin-top: clamp(2.5rem, 7vh, 4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-stats > div {
  padding: 1.2rem 1.3rem;
  border-left: 1px solid var(--line);
}

.hero-stats > div:first-child {
  border-left: 0;
}

.hero-stats dt {
  font-size: 0.6rem;
}

.hero-stats dd {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin: 0.35rem 0 0.15rem;
  line-height: 1.2;
}

.hero-stats dd span {
  font-size: 0.55em;
  color: var(--muted);
}

.hero-stats p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 440px);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.about-lead {
  font-size: clamp(1.1rem, 1.8vw, 1.28rem);
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 1.1rem;
  text-wrap: pretty;
}

.about-copy > p {
  color: var(--muted);
}

.interests {
  margin-top: 2.2rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chips li {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.36rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}

.edu-list {
  display: grid;
}

.edu-list li {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.edu-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.edu-top strong {
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.4;
}

.edu-year {
  color: var(--accent);
  white-space: nowrap;
  font-size: 0.62rem;
}

.edu-list span:not(.edu-year) {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.edu-list .edu-score {
  color: var(--ink);
  font-weight: 500;
}

.edu-langs {
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.6rem;
}

/* ============================================================
   RESEARCH
   ============================================================ */

.thesis-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.4;
  margin: 0.7rem 0 0.6rem;
  max-width: 52rem;
  text-wrap: balance;
}

.thesis-sup {
  color: var(--muted);
  font-size: 0.92rem;
}

.thesis-body {
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.2rem clamp(1.5rem, 4vw, 3rem);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
}

.metrics > div {
  background: rgba(8, 11, 22, 0.85);
  padding: 0.95rem 1rem;
}

.metrics dt {
  font-size: 0.56rem;
}

.metrics dd {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

.metrics dd span {
  font-size: 0.6em;
  margin-left: 0.15em;
  color: var(--muted);
}

.metrics-note {
  grid-column: 2;
  font-size: 0.78rem;
  color: var(--faint);
  margin-top: -0.4rem;
}

.ra-row {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 0.6rem 2rem;
  padding: 1.3rem clamp(1.4rem, 3.2vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, 0.55);
}

.ra-row h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.3rem;
  line-height: 1.45;
}

.ra-row > p {
  color: var(--muted);
  font-size: 0.93rem;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */

.pub-list {
  display: grid;
}

.pub {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.pub:first-child {
  padding-top: 0;
}

.pub-idx {
  color: var(--accent);
  padding-top: 0.25rem;
}

.pub h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  max-width: 48rem;
  text-wrap: pretty;
}

.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-style: italic;
  color: var(--ink);
  font-size: 0.9rem;
  margin: 0.5rem 0 0.55rem;
}

.status {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 5px;
  border: 1px solid;
}

.status-accepted {
  color: var(--green);
  border-color: rgba(111, 207, 151, 0.4);
  background: rgba(111, 207, 151, 0.08);
}

.status-published {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
  background: var(--accent-soft);
}

.status-presented {
  color: var(--blue);
  border-color: rgba(122, 162, 247, 0.4);
  background: rgba(122, 162, 247, 0.08);
}

.pub-note {
  color: var(--muted);
  font-size: 0.93rem;
  max-width: 48rem;
}

.pub .link-row {
  margin-top: 0.8rem;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */

.xp-list {
  display: grid;
  gap: 1.25rem;
}

.xp {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1.2rem clamp(1.5rem, 4vw, 3rem);
}

.xp h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0.5rem 0 0.3rem;
}

.xp-org {
  font-weight: 500;
  font-size: 0.95rem;
}

.xp-kind {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.2rem 0 0.8rem;
}

/* ============================================================
   PROJECTS
   ============================================================ */

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

.proj {
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.proj:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
}

.proj-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.56rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  margin-bottom: 1rem;
}

.proj-badge-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-brd);
}

.proj h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.22rem;
}

.proj-tag {
  color: var(--accent);
  font-size: 0.9rem;
  margin: 0.25rem 0 1rem;
}

.proj .points li {
  font-size: 0.9rem;
}

.proj .tech {
  margin-top: auto;
  padding-top: 1.1rem;
}

.proj .link-row {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

/* ============================================================
   SKILLS
   ============================================================ */

.skill-table {
  display: grid;
  padding-block: 0.4rem;
}

.skill-table > div {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 0.4rem 1.5rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}

.skill-table > div:first-child {
  border-top: 0;
}

.skill-table dt {
  color: var(--accent);
  font-size: 0.62rem;
  padding-top: 0.3rem;
}

.skill-table dd {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ============================================================
   HONORS / CERTIFICATES
   ============================================================ */

.award-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.award-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  background: rgba(10, 14, 26, 0.88);
}

.award-list i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 0.3rem;
  width: 1.3rem;
  text-align: center;
  flex: none;
}

.award-list strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.45;
}

.award-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.cert-courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.cert-course {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.4rem;
}

.cert-course i {
  color: var(--accent);
  font-size: 1.15rem;
}

.cert-course h3 {
  font-size: 1rem;
  font-weight: 700;
}

.cert-course p {
  color: var(--muted);
  font-size: 0.88rem;
}

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

.cert-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-brd);
  background: rgba(14, 18, 32, 0.7);
  padding: 0;
  transition: border-color 0.2s ease;
}

.cert-item:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
}

.cert-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 0.5rem;
}

/* ============================================================
   GALLERY
   ============================================================ */

.gallery-grid {
  columns: 3 240px;
  column-gap: 1rem;
}

.g-item {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 0;
  break-inside: avoid;
  transition: border-color 0.2s ease;
}

.g-item:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
}

.g-item img {
  width: 100%;
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */

.more-link {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.92rem;
}

.more-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.more-link a:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.5);
}

.more-link i {
  font-size: 0.75rem;
}

/* ============================================================
   LEADERSHIP
   ============================================================ */

.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.25rem;
}

.lead h3 {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0.35rem 0 0.6rem;
}

.lead > p:last-child {
  color: var(--muted);
  font-size: 0.93rem;
}

/* ============================================================
   CONTACT · references
   ============================================================ */

.refs {
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.refs-title {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.refs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem 2rem;
  max-width: 44rem;
  margin: 0 auto;
}

.refs-grid strong {
  display: block;
  font-size: 0.96rem;
}

.refs-grid span {
  color: var(--muted);
  font-size: 0.86rem;
}

.refs-note {
  margin-top: 1rem;
  color: var(--faint);
  font-size: 0.8rem;
}

.section-contact {
  padding-bottom: clamp(3.5rem, 9vh, 6rem);
}

.contact-panel {
  text-align: center;
}

.contact-lede {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
  max-width: 38rem;
  margin: 0 auto 1.8rem;
  text-wrap: pretty;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.8rem;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.contact-meta li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-meta i {
  color: var(--accent);
  font-size: 0.85rem;
}

.contact-meta a:hover {
  color: var(--accent);
}

.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2.2rem var(--gutter) 2.6rem;
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.7);
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
}

.footer-role {
  color: var(--muted);
  font-size: 0.86rem;
}

.footer .mono {
  font-size: 0.58rem;
  color: var(--faint);
  margin-top: 0.4rem;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 6, 12, 0.92);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--glass-brd);
  color: var(--ink);
  font-size: 1.05rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .about-grid,
  .xp,
  .thesis-body,
  .ra-row {
    grid-template-columns: 1fr;
  }

  .metrics-note {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  :root {
    --grid-cell: 44px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    order: -1;
    max-width: 220px;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats > div:nth-child(3) {
    border-left: 0;
  }

  .hero-stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .skill-table > div {
    grid-template-columns: 1fr;
  }

  .pub {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 420px) {
  .nav-brand {
    font-size: 0.72rem;
  }

  .hero-stats > div {
    padding: 1rem;
  }

  .edu-top {
    flex-direction: column;
    gap: 0.1rem;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
