/* ============================================================
   SAMAUN FARDOSY ORTHI · academic portfolio
   Rose accent on a plum-black field, under a slow aurora.
   Type: Unbounded (display) · Schibsted Grotesk (body) · Martian Mono (labels)
   ============================================================ */

:root {
  --void: #0a0810;
  --void-soft: #110d1a;
  --ink: #e9ebf5;
  --muted: #9aa1b8;
  --faint: #5d6478;

  --accent: #ef94b4;
  --accent-rgb: 239, 148, 180;
  --accent-soft: rgba(239, 148, 180, 0.12);
  --accent-deep: #c9678c;
  --green: #6fcf97;
  --blue: #a99cf7;

  --line: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(20, 15, 30, 0.6);
  --glass-bg-strong: rgba(20, 15, 30, 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(3.25rem, 7vh, 5rem);
  --gutter: clamp(1rem, 5vw, 4rem);
  --radius: 18px;
}

/* ---------- 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 · aurora
   Three soft light fields drift slowly behind the page, over a
   faint field of points. No lines, no grid.
   ============================================================ */

.aura-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aura-blob {
  position: absolute;
  width: 62vmax;
  height: 62vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.38;
  will-change: transform;
}

.aura-blob.b1 {
  top: -28vmax;
  right: -18vmax;
  background: radial-gradient(circle at 40% 40%, rgba(var(--accent-rgb), 0.55), transparent 62%);
  animation: aura-a 38s ease-in-out infinite alternate;
}

.aura-blob.b2 {
  bottom: -32vmax;
  left: -22vmax;
  background: radial-gradient(circle at 60% 50%, rgba(169, 156, 247, 0.5), transparent 62%);
  animation: aura-b 46s ease-in-out infinite alternate;
}

.aura-blob.b3 {
  top: 30%;
  left: 35%;
  width: 40vmax;
  height: 40vmax;
  opacity: 0.18;
  background: radial-gradient(circle, rgba(111, 207, 191, 0.45), transparent 65%);
  animation: aura-c 54s ease-in-out infinite alternate;
}

@keyframes aura-a {
  to {
    transform: translate(-12vmax, 10vmax) scale(1.12);
  }
}

@keyframes aura-b {
  to {
    transform: translate(14vmax, -8vmax) scale(1.08);
  }
}

@keyframes aura-c {
  to {
    transform: translate(-16vmax, -10vmax) scale(1.2);
  }
}

/* faint points, slowly drifting, fading toward the edges */
.aura-dots {
  position: absolute;
  inset: -40px;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px),
    radial-gradient(rgba(var(--accent-rgb), 0.22) 1px, transparent 1.4px);
  background-size: 46px 46px, 92px 92px;
  background-position: 0 0, 23px 23px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 25%, transparent 100%);
  animation: aura-dots 90s linear infinite;
}

@keyframes aura-dots {
  to {
    transform: translate(46px, 46px);
  }
}

/* soft vignette so text panels stay readable */
.aura-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 40%, rgba(10, 8, 16, 0.55) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .aura-blob,
  .aura-dots {
    animation: none;
  }
}

/* ============================================================
   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;
  }
}

/* ============================================================
   BALANCED GRIDS
   The renderer sets --cols / --cols-md / --cols-sm from the item
   count so rows never end in an empty hole; an incomplete last row
   is centred instead of left-aligned.
   ============================================================ */

.bal {
  --gap: 1.25rem;
  --c: var(--cols, 3);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  columns: auto;
}

.bal > * {
  flex: 0 0 calc((100% - (var(--c) - 1) * var(--gap)) / var(--c));
  max-width: calc((100% - (var(--c) - 1) * var(--gap)) / var(--c));
  min-width: 0;
  margin: 0;
}

.cert-grid.bal,
.gallery-grid.bal {
  --gap: 1rem;
}

@media (max-width: 960px) {
  .bal {
    --c: var(--cols-md, 2);
  }
}

@media (max-width: 600px) {
  .bal {
    --c: var(--cols-sm, 1);
    --gap: 0.85rem;
  }
}

/* awards: individual cards instead of a joined table, so a centred
   last row has no visible seam background behind it */
.award-list.bal {
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.award-list.bal li {
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, 0.82);
  transition: border-color 0.2s ease;
}

.award-list.bal li:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
}

/* equal-height cards in a row */
.proj-grid.bal > .proj,
.lead-grid.bal > .lead,
.cert-courses.bal > .cert-course,
.award-list.bal > li {
  height: auto;
  align-self: stretch;
}

/* gallery: uniform tiles instead of ragged masonry columns */
.gallery-grid.bal .g-item {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: rgba(14, 18, 32, 0.7);
}

.gallery-grid.bal .g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-grid.bal .g-item:hover img {
  transform: scale(1.03);
}

/* hero stats: columns follow the number of stats */
.hero-stats {
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
}

@media (max-width: 760px) {
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* thesis metrics: an odd last metric spans the row */
.metrics > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* ============================================================
   HERO PORTRAIT: photo fills its frame edge to edge; the caption
   sits on the photo instead of below it.
   ============================================================ */

.hero-portrait {
  padding: 0;
  overflow: visible;
  isolation: isolate;
}

.hero-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius);
}

.hero-portrait figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 2.6rem 1rem 0.9rem;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(to top, rgba(6, 8, 15, 0.88), rgba(6, 8, 15, 0));
  color: rgba(233, 235, 243, 0.85);
  pointer-events: none;
}

/* Phone: name, role and description first, then the photo, then
   the buttons. .hero-copy dissolves so its children can be ordered
   around the photo. */
@media (max-width: 760px) {
  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .hero-copy {
    display: contents;
  }

  .hero-inner > .eyebrow,
  .hero-copy > .eyebrow,
  .hero-copy > .hero-name,
  .hero-copy > .hero-role,
  .hero-copy > .hero-lede {
    order: 1;
  }

  .hero-portrait {
    order: 2;
    width: 100%;
    max-width: 420px;
    align-self: center;
    margin-top: 1.8rem;
  }

  .hero-portrait img {
    aspect-ratio: 4 / 5;
  }

  .hero-copy > .hero-cta {
    order: 3;
  }

  .hero-copy > .hero-social {
    order: 4;
  }
}

/* ============================================================
   SAMAUN: additions to the shared layout
   ============================================================ */

/* portrait placeholder until a photo is uploaded */
.hero-portrait.is-monogram .monogram {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(var(--accent-rgb), 0.55), transparent 60%),
    radial-gradient(100% 70% at 0% 100%, rgba(169, 156, 247, 0.45), transparent 60%),
    linear-gradient(160deg, #2a1830, #120d1c);
}

.hero-portrait.is-monogram .monogram::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) - 8px);
}

.hero-portrait.is-monogram .monogram span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 4.6rem);
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* organisation line on role cards */
.lead-org {
  margin-top: -0.2rem;
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

.lead-org a {
  text-decoration: none;
}

.lead-org a:hover {
  text-decoration: underline;
}

.lead-org i {
  font-size: 0.68rem;
}

/* Dean's List and similar notes under a degree */
.edu-note {
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

/* stats: value under label, like the label-first layout of kiyas.me */
.hero-stats dd {
  word-break: keep-all;
}

/* long name: keep only the first name in the bar on small phones */
@media (max-width: 480px) {
  .nav-brand-dot,
  .nav-brand-rest {
    display: none;
  }
}

/* ============================================================
   SAMAUN · CARD STYLE
   Softer, rounder cards with a rose → lavender gradient edge,
   so the content reads differently from kiyas.me.
   ============================================================ */

:root {
  --card-radius: 22px;
  --card-fill: linear-gradient(160deg, rgba(36, 25, 48, 0.74), rgba(15, 11, 23, 0.78));
  --card-edge: linear-gradient(
    140deg,
    rgba(var(--accent-rgb), 0.5),
    rgba(169, 156, 247, 0.22) 38%,
    rgba(255, 255, 255, 0.05) 70%,
    rgba(var(--accent-rgb), 0.18)
  );
  --card-edge-hover: linear-gradient(
    140deg,
    rgba(var(--accent-rgb), 0.85),
    rgba(169, 156, 247, 0.45) 45%,
    rgba(255, 255, 255, 0.1) 80%
  );
}

/* the gradient edge: fill on the padding box, gradient on the border box */
.panel.glass,
.pub,
.award-list.bal li,
.hero-stats > div,
.cert-item,
.g-item {
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  background: var(--card-fill) padding-box, var(--card-edge) border-box;
  box-shadow: 0 20px 50px -28px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.35s var(--ease-out), background 0.35s ease, box-shadow 0.35s ease;
}

.lead.panel.glass:hover,
.pub:hover,
.award-list.bal li:hover,
.skill-card:hover,
.cert-item:hover,
.g-item:hover {
  transform: translateY(-3px);
  background: var(--card-fill) padding-box, var(--card-edge-hover) border-box;
  box-shadow: 0 26px 60px -26px rgba(var(--accent-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- stats: separate mini cards, gradient numbers ---------- */
.hero-stats {
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  gap: 0.9rem;
}

.hero-stats > div,
.hero-stats > div:first-child,
.hero-stats > div:nth-child(n) {
  border-left: 1px solid transparent;
  border-top: 1px solid transparent;
  padding: 1.15rem 1.25rem 1.25rem;
}

.hero-stats dd {
  background: linear-gradient(120deg, #fff 10%, var(--accent) 60%, #b8a9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
}

/* ---------- publications & conferences: one card per item ---------- */
.pub-list {
  gap: 1rem;
}

.pub,
.pub:first-child {
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid transparent;
}

.pub-idx {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 0.7rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}

.pub-venue {
  margin-bottom: 0;
}

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

.status {
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
}

/* ---------- role & leadership cards ---------- */
.lead.panel.glass {
  position: relative;
  overflow: hidden;
}

.lead.panel.glass::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18), transparent 70%);
  pointer-events: none;
}

.lead .tag-line {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  margin-bottom: 0.9rem;
}

/* ---------- awards: icon badge on top ---------- */
.award-list.bal li {
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.4rem 1.4rem 1.5rem;
}

.award-list.bal li > i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 14px;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #a99cf7);
  box-shadow: 0 10px 24px -10px rgba(var(--accent-rgb), 0.7);
}

.award-list.bal strong {
  font-size: 1rem;
}

.award-list.bal span {
  display: block;
  margin-top: 0.35rem;
}

/* ---------- education: timeline ---------- */
.edu-list li,
.edu-list li:first-child {
  position: relative;
  padding: 0 0 1.3rem 1.6rem;
  border-top: 0;
}

.edu-list li:last-child {
  padding-bottom: 0;
}

.edu-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18);
}

.edu-list li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.2rem;
  bottom: 0.1rem;
  width: 1px;
  background: linear-gradient(rgba(var(--accent-rgb), 0.5), rgba(169, 156, 247, 0.1));
}

.edu-list li:last-child::after {
  display: none;
}

.edu-score {
  display: inline-block;
  justify-self: start;
  margin-top: 0.35rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(111, 207, 151, 0.1);
  border: 1px solid rgba(111, 207, 151, 0.3);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- chips: rounded, tinted ---------- */
.chips li {
  border-radius: 999px;
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.07);
}

/* ---------- skills: one card per group with chips ---------- */
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--ink);
}

.skill-card .chips li {
  font-size: 0.78rem;
}

/* ---------- contact: glow behind the panel ---------- */
.contact-panel.panel.glass {
  position: relative;
  overflow: hidden;
}

.contact-panel.panel.glass::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 100%, rgba(var(--accent-rgb), 0.16), transparent 60%);
  pointer-events: none;
}

.contact-panel > * {
  position: relative;
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .hero-stats {
    gap: 0.7rem;
  }

  .pub,
  .pub:first-child {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1.1rem 1.15rem;
  }

  .pub-idx {
    width: 2.2rem;
    height: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead.panel.glass:hover,
  .pub:hover,
  .award-list.bal li:hover,
  .skill-card:hover,
  .cert-item:hover,
  .g-item:hover {
    transform: none;
  }
}
