@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg: #070d16;
  --bg-elev: #0f1a2a;
  --bg-soft: #132238;
  --surface: #0d1726;
  --surface-alt: #101e30;
  --text: #ecf3ff;
  --muted: #9fb2cc;
  --primary: #3ed6c4;
  --primary-strong: #29b9a8;
  --accent: #7cc8ff;
  --accent-soft: rgba(124, 200, 255, 0.18);
  --border: #25374d;
  --shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
  --radius-lg: 20px;
  --radius-md: 14px;
  --first-section-gap: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #04080f;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.62;
  background: #020409;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #020409;
  background-image:
    radial-gradient(1px 1px at 18px 31px, rgba(225, 242, 255, 0.88) 98%, transparent),
    radial-gradient(1px 1px at 74px 112px, rgba(190, 222, 255, 0.72) 98%, transparent),
    radial-gradient(1.5px 1.5px at 143px 58px, rgba(255, 255, 255, 0.82) 98%, transparent),
    radial-gradient(1px 1px at 211px 174px, rgba(175, 218, 255, 0.64) 98%, transparent),
    radial-gradient(1px 1px at 267px 26px, rgba(255, 255, 255, 0.72) 98%, transparent),
    radial-gradient(1px 1px at 318px 127px, rgba(202, 228, 255, 0.68) 98%, transparent),
    radial-gradient(ellipse at 50% 0%, rgba(24, 45, 72, 0.16), transparent 62%);
  background-size: 340px 230px, 340px 230px, 340px 230px, 340px 230px, 340px 230px, 340px 230px, 100% 100%;
  opacity: 0.72;
}

.cv-pdf-page {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.cv-pdf-main {
  min-height: 0;
  background: #e7e9ed;
}

.cv-pdf-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.cv-pdf-fallback {
  margin: 0;
  padding: 2rem;
  color: #162235;
  text-align: center;
}

a {
  color: inherit;
}

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

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

.section {
  padding: clamp(3.3rem, 7vw, 5.4rem) 0;
}

main > .section:first-child,
main > .hero:first-child,
main > .page-hero:first-child {
  padding-top: var(--first-section-gap);
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: clamp(1.55rem, 3.4vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-subtitle {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 68ch;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 13, 22, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 200, 255, 0.18);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  min-height: 76px;
}

.brand {
  text-decoration: none;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  letter-spacing: 0.25px;
  font-size: clamp(1.22rem, 1.3vw, 1.42rem);
  font-weight: 700;
  margin-left: 0;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.brand-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.52rem;
  flex-wrap: wrap;
  width: 100%;
  margin-left: 0;
}

.brand-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
}

.brand-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 0.55rem 0.64rem;
  border-radius: 9px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.hero {
  position: relative;
  padding: clamp(4rem, 8vw, 6.4rem) 0 clamp(3rem, 7vw, 4.9rem);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(124, 200, 255, 0.08), transparent 42%),
    radial-gradient(circle at 76% 26%, rgba(62, 214, 196, 0.15), transparent 36%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: clamp(1.2rem, 2.4vw, 2.2rem);
  align-items: stretch;
}

.hero-primary-card {
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  border: 1px solid rgba(124, 200, 255, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(19, 33, 52, 0.56), rgba(11, 19, 31, 0.52));
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.25px;
  font-weight: 600;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: clamp(2.15rem, 6.5vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero h1 + p {
  margin: 0.9rem 0 0;
  color: #d9e8ff;
  font-size: clamp(1.02rem, 2.2vw, 1.3rem);
  font-weight: 500;
}

.hero p,
.page-hero p {
  color: var(--muted);
  max-width: 64ch;
}

.hero p + p {
  margin-top: 0.95rem;
}

.hero-connect {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-connect a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-connect a:hover {
  text-decoration: underline;
}

.glance-list {
  margin-top: 0.65rem;
}

.hero-pillars {
  margin-top: 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.38rem 0.84rem;
  background: rgba(16, 30, 47, 0.72);
  font-size: 0.88rem;
  color: #bfd1e8;
}

.hero-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(17, 29, 45, 0.95), rgba(10, 18, 30, 0.95));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(1.15rem, 2.5vw, 1.7rem);
  position: relative;
  overflow: hidden;
  z-index: 2;
  background: linear-gradient(165deg, rgba(17, 29, 45, 0.56), rgba(10, 18, 30, 0.56));
}

.hero-card-compact {
  justify-self: end;
  width: min(100%, 430px);
}

.hero-card-compact .section-title {
  text-align: center;
  white-space: nowrap;
}

.profile-compact {
  display: grid;
  gap: 0.9rem;
}

.profile-compact-top {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 0.78rem;
  align-items: center;
}

.profile-compact-top img {
  width: 116px;
  height: 116px;
  border-radius: 14px;
  border: 1px solid rgba(124, 200, 255, 0.36);
  object-fit: cover;
}

.profile-compact-meta h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: 1.05rem;
  line-height: 1.22;
}

.profile-location {
  margin: 0.22rem 0 0.5rem;
  color: #c5d8f0;
  font-size: 0.9rem;
}

.profile-kicker {
  margin: 0 0 0.28rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-compact .hero-connect {
  margin-top: 0;
  gap: 0.7rem;
}

.profile-compact .hero-connect a {
  font-size: 0.86rem;
}

.profile-one-liner {
  margin: 0;
  color: #d4e3f6;
  font-size: 0.92rem;
  line-height: 1.45;
}

.profile-skills-block h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-skills-block .hero-pillars {
  margin-top: 0.45rem;
  gap: 0.42rem;
}

.profile-skills-block .pill {
  font-size: 0.79rem;
  padding: 0.28rem 0.62rem;
}

.home-hero {
  padding: 0;
}

.home-page main > .home-hero:first-child {
  padding: 0;
}

.home-hero-grid {
  position: relative;
  z-index: 1;
  display: block;
  min-height: clamp(520px, 62vh, 680px);
}

.home-page .hero-primary-card {
  position: absolute;
  inset: 0 auto 0 clamp(0.85rem, 1.6vw, 1.75rem);
  z-index: 3;
  align-self: center;
  height: auto;
  min-height: 0;
  width: min(25vw, 300px);
  margin: auto 0;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  padding: clamp(1.2rem, 2vw, 1.8rem);
  background: linear-gradient(160deg, rgba(19, 33, 52, 0.66), rgba(7, 13, 22, 0.72));
  backdrop-filter: blur(3px);
}

.home-page .profile-compact {
  width: 100%;
  gap: clamp(1rem, 1.5vw, 1.35rem);
}

.home-page .profile-compact-top {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.9rem, 1.4vw, 1.25rem);
  align-items: center;
}

.home-page .profile-compact-top img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 38%;
  box-shadow: 0 0 0 5px rgba(124, 200, 255, 0.08), 0 14px 28px rgba(0, 0, 0, 0.3);
}

.home-page .profile-one-liner {
  margin-top: 0.72rem;
  color: #d4e3f6;
  font-size: clamp(0.88rem, 0.95vw, 0.98rem);
  line-height: 1.48;
}

.hero-media-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
}

.home-page main {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.home-page main > *:not(.home-cosmos-bg) {
  position: relative;
  z-index: 1;
}

.home-cosmos-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

.cosmos-track {
  display: flex;
  gap: 0;
  will-change: transform;
  height: 100%;
  transition: transform 1.15s cubic-bezier(0.22, 0.68, 0, 1);
}

.cosmos-track.is-resetting {
  transition: none;
}

.cosmos-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 0;
}

.cosmos-slide picture,
.cosmos-slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.cosmos-slide img {
  object-fit: cover;
  object-position: center;
}

.cosmos-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 10, 18, 0.52), rgba(5, 10, 18, 0.14)),
    linear-gradient(to right, rgba(5, 10, 18, 0.26), transparent 30%, transparent 70%, rgba(5, 10, 18, 0.26));
}

.home-page .hero-card-compact {
  position: absolute;
  top: 10%;
  right: clamp(0.85rem, 2vw, 2rem);
  z-index: 2;
  width: min(230px, calc(100% - 1.7rem));
  height: 66%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, rgba(19, 33, 52, 0.66), rgba(7, 13, 22, 0.72));
  backdrop-filter: blur(3px);
}

.home-page .hero-card-compact .section-title {
  margin-bottom: 0.75rem;
  font-size: clamp(1.15rem, 1.55vw, 1.45rem);
}

.home-page .highlight-toggle {
  flex: 1;
  min-height: 0;
  max-height: none;
  gap: 0.5rem;
  overflow-y: auto;
}

.home-page .highlight-toggle-item {
  min-height: 0;
}

.home-page .highlight-toggle-trigger {
  padding: 0.55rem 0.62rem 0.34rem;
}

.home-page .highlight-toggle-trigger span:last-child {
  font-size: 0.86rem;
}

.home-page .highlight-toggle-panel {
  padding: 0 0.62rem 0.62rem;
}

.home-page .highlight-toggle-panel p {
  font-size: 0.78rem;
  line-height: 1.35;
}

#cursor-fluid-trail {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

@media (prefers-reduced-motion: reduce) {
  #cursor-fluid-trail {
    display: none;
  }
}

.highlight-toggle {
  display: grid;
  gap: 0.58rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.highlight-toggle-item {
  border: 1px solid rgba(124, 200, 255, 0.36);
  border-radius: 12px;
  background: rgba(17, 30, 47, 0.9);
  overflow: hidden;
  min-height: 140px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.highlight-toggle-item.is-open {
  border-color: rgba(124, 200, 255, 0.4);
  background: rgba(17, 30, 47, 0.9);
}

.highlight-toggle-trigger {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.75rem 0.82rem;
  display: grid;
  gap: 0.18rem;
  cursor: default;
}

.highlight-toggle-trigger span:first-child {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.highlight-toggle-trigger span:last-child {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

.highlight-toggle-panel {
  padding: 0 0.82rem 0.78rem;
}

.home-page .highlight-toggle-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.highlight-toggle-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -42px;
  right: -36px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 200, 255, 0.18), transparent 68%);
}

.page-hero {
  padding: clamp(3.5rem, 6vw, 5rem) 0 1.75rem;
}

.page-hero .panel {
  padding: clamp(1.25rem, 2.6vw, 1.9rem);
}

.grid {
  display: grid;
  gap: clamp(0.95rem, 2.1vw, 1.35rem);
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.span-full {
  grid-column: 1 / -1;
}

.about-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.about-page .section {
  padding: 1.9rem 0;
}

.about-page .section:first-of-type {
  padding-top: var(--first-section-gap);
}

.about-page .section:last-of-type {
  padding-bottom: 2.8rem;
}

.about-page .card {
  height: 100%;
}

.about-page .section-subtitle {
  margin-bottom: 1.1rem;
}

.about-story-section {
  border-top: 1px solid rgba(124, 200, 255, 0.1);
}

.about-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
}

.about-narrative {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.about-narrative p:last-child {
  margin-bottom: 0;
}

.about-focus-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
}

.about-focus-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: rgba(11, 21, 35, 0.97);
}

.about-focus-item > span {
  color: var(--primary);
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.about-focus-item h3 {
  margin: 0 0 0.22rem;
  font-size: 1rem;
}

.about-focus-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.list-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.2rem;
}

.pretty-list li {
  position: relative;
  padding-left: 1rem;
}

.pretty-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.56rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  box-shadow: 0 0 0 2px rgba(124, 200, 255, 0.14);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(18, 31, 49, 0.72), rgba(13, 23, 38, 0.92));
  padding: 1.18rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(124, 200, 255, 0.42);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.58rem;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  line-height: 1.25;
  font-size: clamp(1.04rem, 2vw, 1.2rem);
}

.card p {
  margin: 0.46rem 0;
  color: var(--muted);
}

.card p strong {
  color: #d4e3f6;
  font-weight: 600;
}

.meta {
  margin-top: 0.78rem;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

.cta-row {
  margin-top: 1.65rem;
  display: flex;
  gap: 0.78rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.72rem 1.05rem;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #042220;
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  border-color: var(--border);
  color: var(--text);
  background: rgba(16, 28, 45, 0.86);
}

.btn-secondary:hover {
  border-color: rgba(124, 200, 255, 0.42);
  background: rgba(18, 34, 55, 0.95);
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-clean li {
  margin-bottom: 0.72rem;
  color: var(--muted);
}

.career-timeline {
  display: grid;
  gap: 1rem;
  margin-top: 0.8rem;
}

.timeline-role {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.25fr);
  gap: 1rem;
  align-items: start;
  opacity: 0.7;
  transition: opacity 0.28s ease;
}

.timeline-role.is-focused {
  opacity: 1;
}

.timeline-left {
  border-left: 2px solid rgba(124, 200, 255, 0.35);
  padding: 0.2rem 0 0.2rem 0.8rem;
}

.timeline-left h3 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.12rem);
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  line-height: 1.3;
}

.timeline-company {
  margin: 0.34rem 0 0;
  color: #c9d8ec;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.country-flag {
  font-size: 0.96rem;
  line-height: 1;
  display: inline-block;
  transform: translateY(-1px);
}

.timeline-right {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.76), rgba(12, 21, 34, 0.95));
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  transform: scale(0.93);
  transform-origin: left center;
  opacity: 0.25;
  transition: transform 0.3s ease, opacity 0.25s ease, border-color 0.28s ease, background-color 0.28s ease;
}

.timeline-role.is-focused .timeline-right {
  border-color: rgba(124, 200, 255, 0.45);
  background: linear-gradient(180deg, rgba(20, 35, 55, 0.86), rgba(13, 24, 39, 0.98));
  transform: scale(1);
  opacity: 1;
}

.timeline-date {
  margin: 0 0 0.35rem;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.timeline-points {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
  max-height: 12px;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.timeline-role.is-focused .timeline-points {
  max-height: 240px;
  opacity: 1;
  margin-top: 0.2rem;
}

.timeline-points li {
  margin: 0.34rem 0;
}

.pub-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pub-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.78), rgba(12, 21, 34, 0.96));
  padding: 1.1rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.pub-tile-wide {
  grid-column: 1 / -1;
}

.pub-tile h3 {
  margin: 0 0 0.75rem;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.pub-tile h4 {
  margin: 0 0 0.45rem;
  color: #d4e3f6;
  font-size: 0.97rem;
}

.pub-tile ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--muted);
}

.pub-tile li {
  margin: 0.36rem 0;
}

.pub-tile a {
  color: #d6e6ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.pub-tile a:hover {
  color: var(--accent);
}

.pub-tile em {
  color: #c9d8ec;
  font-style: normal;
}

.pub-wide-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.project-stack {
  display: grid;
  gap: 1rem;
}

.project-card {
  width: 75%;
}

.project-card:nth-child(odd) {
  margin-right: auto;
}

.project-card:nth-child(even) {
  margin-left: auto;
}

.project-order {
  margin: 0 0 0.28rem;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.project-result {
  margin-top: 0.62rem;
}

.project-card a {
  color: #d6e6ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.project-card a:hover {
  color: var(--accent);
}

.pub-citation {
  color: #c9d8ec;
}

.research-card-media {
  width: 100%;
  height: clamp(180px, 24vw, 280px);
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(124, 200, 255, 0.3);
  margin: 0.4rem 0 0.75rem;
}

.topic-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.topic-card-link:hover,
.topic-card-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(62, 214, 196, 0.68);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.topic-overview-grid > .card {
  min-height: 520px;
}

.compact-section {
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.tinted-section {
  border-top: 1px solid rgba(124, 200, 255, 0.12);
  border-bottom: 1px solid rgba(124, 200, 255, 0.12);
  background:
    radial-gradient(circle at 82% 15%, rgba(62, 214, 196, 0.08), transparent 34%),
    rgba(6, 12, 21, 0.58);
}

.section-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: end;
  margin-bottom: 1.65rem;
}

.section-heading-row .eyebrow {
  margin-bottom: 0.55rem;
}

.section-heading-row p {
  margin: 0;
  color: var(--muted);
}

.programme-grid {
  align-items: stretch;
}

.programme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 275px;
  overflow: hidden;
}

.programme-card::after {
  content: '';
  position: absolute;
  right: -55px;
  bottom: -65px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 214, 196, 0.1), transparent 70%);
  pointer-events: none;
}

.card-index,
.software-type {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.text-link {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-intro-section {
  background: linear-gradient(180deg, rgba(7, 13, 22, 0.94), rgba(9, 19, 32, 0.96));
}

.home-methods-section {
  border-top: 1px solid rgba(124, 200, 255, 0.12);
  border-bottom: 1px solid rgba(124, 200, 255, 0.12);
  background:
    radial-gradient(circle at 14% 18%, rgba(62, 214, 196, 0.09), transparent 32%),
    #08111d;
}

.home-impact-section {
  background: #070d16;
}

.split-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(1.5rem, 5vw, 4.2rem);
  align-items: center;
}

.method-list {
  display: grid;
  gap: 0.72rem;
}

.method-list > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-left: 2px solid rgba(62, 214, 196, 0.55);
  background: rgba(15, 27, 44, 0.75);
}

.method-list strong {
  color: #dceaff;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
}

.method-list span {
  color: var(--muted);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.impact-item {
  min-height: 132px;
  padding: 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, rgba(18, 32, 51, 0.86), rgba(9, 17, 29, 0.94));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.impact-item strong {
  color: var(--primary);
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: clamp(1.75rem, 3.4vw, 2.65rem);
  line-height: 1;
}

.impact-item span {
  color: #c7d7eb;
  font-size: 0.9rem;
}

.impact-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.impact-grid-compact .impact-item {
  min-height: 118px;
}

.home-closing {
  margin-top: 1.4rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.home-closing p {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}

.home-closing .cta-row {
  margin-top: 0;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
}

.question-item {
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  background: rgba(11, 21, 35, 0.97);
}

.question-item span {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.question-item h3 {
  margin: 0.55rem 0 0;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: clamp(1rem, 2.1vw, 1.28rem);
  line-height: 1.35;
}

.about-profile {
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
}

.about-profile > img {
  width: 230px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 50%;
  border: 1px solid rgba(124, 200, 255, 0.4);
  box-shadow: 0 0 0 8px rgba(124, 200, 255, 0.06), 0 18px 34px rgba(0, 0, 0, 0.32);
}

.about-profile h1 {
  font-size: clamp(2rem, 5vw, 3.35rem);
}

.about-profile p {
  margin: 0.8rem 0 0;
}

.feature-list {
  padding: 1.25rem 1.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(12, 23, 38, 0.8);
}

.software-card {
  min-height: 300px;
}

.software-card .hero-pillars {
  margin-top: 1.1rem;
}

.repo-card,
.private-code-card {
  display: flex;
  flex-direction: column;
}

.repo-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.repo-card-top .software-type {
  margin-bottom: 0.9rem;
}

.access-badge {
  flex: 0 0 auto;
  padding: 0.24rem 0.5rem;
  border: 1px solid rgba(62, 214, 196, 0.38);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(62, 214, 196, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.access-badge-private {
  border-color: rgba(159, 178, 204, 0.34);
  color: var(--muted);
  background: rgba(159, 178, 204, 0.07);
}

.repo-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 1.15rem;
}

.repo-actions .text-link {
  margin-top: 0;
  padding-top: 0;
  font-size: 0.9rem;
}

.pipeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(11, 21, 35, 0.88);
}

.pipeline span {
  padding: 0.58rem 0.72rem;
  border: 1px solid rgba(124, 200, 255, 0.25);
  border-radius: 9px;
  color: #d5e3f5;
  background: rgba(17, 31, 50, 0.85);
  font-size: 0.88rem;
  font-weight: 600;
}

.pipeline i {
  color: var(--primary);
  font-style: normal;
}

.pipeline-wide {
  justify-content: center;
}

.publication-context {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.2rem, 3vw, 1.8rem);
}

.publication-context p {
  margin-bottom: 0;
}

.highlights-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.highlights-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.highlights-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 1.4rem) / 2.15);
  gap: 1rem;
  overflow-x: auto;
  padding: 0.1rem 2.6rem 0.45rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.highlights-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(124, 200, 255, 0.34);
  background: rgba(9, 17, 28, 0.96);
  color: var(--text);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.highlights-arrow-left {
  left: 0;
}

.highlights-arrow-right {
  right: 0;
}

.highlights-arrow:hover:not(:disabled) {
  border-color: rgba(124, 200, 255, 0.42);
}

.highlights-arrow:disabled {
  opacity: 1;
  color: #7f8ca0;
  border-color: #2a3648;
  background: rgba(10, 15, 24, 0.7);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.highlights-arrow.is-disabled {
  color: #7f8ca0;
  border-color: #2a3648;
  background: rgba(10, 15, 24, 0.7);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

.highlight-card {
  scroll-snap-align: start;
  padding: 0;
  overflow: hidden;
}

.highlight-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.highlight-content {
  padding: 0.95rem 1rem 1rem;
}

.highlight-year {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.highlight-content h3 {
  margin: 0 0 0.45rem;
}

.contact-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-links a {
  color: var(--accent);
  text-decoration: none;
}

.contact-links a:hover {
  text-decoration: underline;
}

form {
  display: grid;
  gap: 0.8rem;
}

label {
  font-weight: 600;
  font-size: 0.96rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.74rem;
  background: #0f1a2a;
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(62, 214, 196, 0.33);
  border-color: rgba(62, 214, 196, 0.5);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.35rem 0 1.9rem;
  color: var(--muted);
  font-size: 0.95rem;
  background: #04080f;
}

@media (min-width: 981px) {
  .home-page .site-footer {
    margin-top: 0;
    padding: 0.95rem 0 1.1rem;
  }
}


[data-animate] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.36s ease, transform 0.36s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .section-heading-row,
  .split-feature,
  .publication-context,
  .about-story-grid {
    grid-template-columns: 1fr;
  }

  .impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-closing {
    grid-template-columns: 1fr;
  }

  .home-closing .cta-row {
    margin-top: 0.25rem;
  }

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

  .home-page .hero-primary-card {
    position: relative;
    inset: auto;
    z-index: 2;
    height: auto;
    min-height: 0;
    width: min(760px, calc(100% - 2rem));
    margin: 1rem auto;
  }

  .hero-media-stage {
    position: relative;
    inset: auto;
    min-height: 540px;
  }

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

  .hero-card {
    max-width: 760px;
  }

  .hero-card-compact {
    justify-self: stretch;
    width: 100%;
  }

  .home-page .profile-compact-top {
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 0.72rem;
  }

  .home-page .profile-compact-top img {
    width: 138px;
    height: 138px;
  }

  .hero-card-compact .section-title {
    white-space: normal;
  }

}

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

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    padding: 0.72rem 4%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(7, 13, 22, 0.97);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .highlights-track {
    grid-auto-columns: minmax(300px, 74%);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1120px, 94%);
  }

  .hero-primary-card,
  .hero-card,
  .panel,
  .card {
    padding: 1rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    text-align: center;
  }

  .home-page .profile-compact-top {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .home-page .profile-compact-top img {
    width: 104px;
    height: 104px;
  }

  .hero-media-stage {
    min-height: 500px;
  }

  .home-page .hero-card-compact {
    right: 0.75rem;
    width: min(258px, calc(100% - 1.5rem));
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .about-two-col {
    grid-template-columns: 1fr;
  }

  .about-profile {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .about-profile > img {
    width: 150px;
  }

  .impact-grid,
  .impact-grid-compact,
  .question-grid {
    grid-template-columns: 1fr;
  }

  .impact-item {
    min-height: 108px;
  }

  .method-list > div {
    grid-template-columns: 1fr;
    gap: 0.22rem;
  }

  .pipeline {
    align-items: stretch;
    flex-direction: column;
  }

  .pipeline i {
    transform: rotate(90deg);
    align-self: center;
  }

  .topic-overview-grid > .card {
    min-height: 0;
  }

  .list-two-col {
    grid-template-columns: 1fr;
  }

  .pub-tiles,
  .pub-wide-columns {
    grid-template-columns: 1fr;
  }

  .highlights-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 0.75rem;
  }

  .highlights-arrow {
    width: 32px;
    height: 32px;
  }

  .highlights-arrow-left {
    left: -10px;
  }

  .highlights-arrow-right {
    right: -10px;
  }

  .highlights-track {
    grid-auto-columns: 86%;
    padding-left: 1.8rem;
    padding-right: 1.8rem;
  }

  .project-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .timeline-role {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .timeline-right {
    padding: 0.9rem 0.85rem 0.8rem;
    transform-origin: top center;
  }

  .timeline-left {
    border-left-width: 0;
    border-bottom: 1px solid rgba(124, 200, 255, 0.25);
    padding: 0 0 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cosmos-track {
    transition: none;
  }
}

/* The home page is a single, self-contained landing viewport. */
body.home-page {
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.home-page main,
.home-page .home-hero,
.home-page .home-hero-grid {
  height: 100%;
  min-height: 0;
}

.home-page .home-hero-grid {
  display: block;
}

.home-page .hero-media-stage {
  position: absolute;
  inset: 0;
  min-height: 100%;
}

.home-page .site-footer {
  margin-top: 0;
  padding: 0.58rem 0 0.68rem;
  font-size: 0.82rem;
}

.publication-title-link,
.mentorship-papers a {
  color: #dceaff;
  text-decoration: none;
}

.publication-title-link:hover,
.mentorship-papers a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .home-page .home-hero-grid {
    display: block;
  }

  .home-page .hero-primary-card {
    position: absolute;
    top: 7%;
    left: 1rem;
    right: auto;
    bottom: auto;
    width: min(220px, 25vw);
    margin: 0;
    padding: 1rem;
  }

  .home-page .profile-compact-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .home-page .profile-compact-top img {
    width: 90px;
    height: 90px;
  }

  .home-page .profile-compact {
    gap: 0.65rem;
  }

  .home-page .profile-skills-block {
    display: none;
  }

  .home-page .profile-compact-meta h2 {
    font-size: 0.94rem;
  }

  .home-page .profile-one-liner {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .home-page .hero-card-compact {
    top: 10%;
    right: 0.75rem;
    width: min(210px, 30%);
    height: 40%;
    padding: 0.75rem;
  }

  .home-page .hero-card-compact .section-title {
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
  }

  .home-page .highlight-toggle {
    grid-auto-rows: max-content;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .home-page .highlight-toggle-item {
    min-height: 118px;
  }
}

@media (max-width: 640px) {
  .home-page .hero-primary-card {
    top: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
    width: min(62vw, 220px);
    padding: 0.8rem;
  }

  .home-page .profile-compact {
    gap: 0.55rem;
  }

  .home-page .profile-compact-top img {
    width: 86px;
    height: 86px;
  }

  .home-page .profile-kicker,
  .home-page .profile-skills-block {
    display: none;
  }

  .home-page .profile-compact-meta h2 {
    font-size: 0.95rem;
  }

  .home-page .profile-location {
    margin-bottom: 0.22rem;
    font-size: 0.78rem;
  }

  .home-page .profile-one-liner {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .home-page .hero-card-compact {
    top: auto;
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
    width: auto;
    height: 126px;
    padding: 0.7rem;
  }

  .home-page .hero-card-compact .section-title {
    margin-bottom: 0.4rem;
    font-size: 1rem;
  }

  .home-page .highlight-toggle {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    overflow-y: auto;
    gap: 0.4rem;
  }

  .home-page .highlight-toggle-item {
    min-height: 88px;
  }

  .home-page .highlight-toggle-panel p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.7rem;
  }

  .home-page .site-footer {
    padding: 0.35rem 0 0.42rem;
    font-size: 0.72rem;
  }
}

/* Developer portfolio */
.codes-page .page-hero {
  padding-bottom: 0;
}

.developer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: center;
  overflow: hidden;
}

.developer-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.3rem, 5.7vw, 4.8rem);
  line-height: 0.98;
}

.developer-hero-copy > p {
  max-width: 68ch;
  color: #c7d7ea;
}

.developer-terminal {
  overflow: hidden;
  border: 1px solid rgba(124, 200, 255, 0.32);
  border-radius: 16px;
  background: rgba(2, 7, 14, 0.94);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.38), 0 0 60px rgba(62, 214, 196, 0.07);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid rgba(124, 200, 255, 0.16);
  background: rgba(16, 28, 45, 0.86);
}

.terminal-bar span {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  background: #ff6b6b;
}

.terminal-bar span:nth-child(2) { background: #ffd166; }
.terminal-bar span:nth-child(3) { background: #3ed6c4; }

.terminal-bar b {
  margin-left: auto;
  color: var(--muted);
  font: 500 0.72rem/1.2 'IBM Plex Sans', sans-serif;
  letter-spacing: 0.05em;
}

.developer-terminal pre {
  margin: 0;
  padding: clamp(1rem, 2.5vw, 1.45rem);
  overflow-x: auto;
  color: #c9d8ec;
  font: 500 clamp(0.72rem, 1.2vw, 0.88rem)/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

.terminal-prompt { color: var(--accent); }
.terminal-ok { color: var(--primary); }
.terminal-output { color: #ffd166; }

.developer-stack-section {
  padding: 1rem 0 0;
}

.developer-stack {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-block: 1px solid rgba(124, 200, 255, 0.16);
}

.developer-stack > span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.developer-stack > div {
  display: flex;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.developer-stack strong {
  padding: 0.28rem 0.62rem;
  border: 1px solid rgba(124, 200, 255, 0.2);
  border-radius: 6px;
  color: #dce9f8;
  background: rgba(10, 20, 33, 0.68);
  font: 500 0.76rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.codes-page .repo-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
}

.codes-page .repo-card::after {
  content: '';
  position: absolute;
  inset: auto -15% -45% 20%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 214, 196, 0.11), transparent 68%);
  pointer-events: none;
}

.repo-command {
  margin: 0 0 0.72rem;
  color: var(--accent);
  font: 500 0.72rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.codes-page .repo-actions {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 1.2rem;
}

.developer-process {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
}

.developer-process div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.12rem 0.72rem;
  padding: 1rem;
  background: rgba(8, 17, 29, 0.96);
}

.developer-process b {
  grid-row: 1 / 3;
  color: var(--primary);
  font: 700 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.developer-process span {
  color: var(--text);
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-weight: 700;
}

.developer-process small {
  color: var(--muted);
  line-height: 1.45;
}

/* Personal about page */
.journey-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
}

.journey-grid article {
  position: relative;
  min-height: 220px;
  padding: 1.25rem 1rem;
  background: linear-gradient(180deg, rgba(15, 28, 45, 0.98), rgba(8, 17, 29, 0.98));
}

.journey-grid article + article {
  border-left: 1px solid var(--border);
}

.journey-grid article::before {
  content: '';
  display: block;
  width: 0.58rem;
  height: 0.58rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(124, 200, 255, 0.09), 0 0 22px rgba(124, 200, 255, 0.35);
}

.journey-grid article::after {
  content: '';
  position: absolute;
  top: 1.52rem;
  left: 1.58rem;
  right: -1px;
  height: 1px;
  background: rgba(124, 200, 255, 0.26);
}

.journey-grid article:last-child::after { display: none; }

.journey-grid b,
.journey-grid span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.journey-grid b { color: var(--accent); }
.journey-grid span { margin-top: 0.15rem; color: var(--muted); }

.journey-grid h3 {
  margin: 0.9rem 0 0.45rem;
  font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
  font-size: 1.05rem;
}

.journey-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.journey-grid .journey-current {
  background: linear-gradient(180deg, rgba(18, 46, 58, 0.98), rgba(8, 25, 34, 0.98));
}

.journey-grid .journey-current::before {
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(62, 214, 196, 0.1), 0 0 24px rgba(62, 214, 196, 0.4);
}

.about-human-section {
  border-top: 1px solid rgba(124, 200, 255, 0.1);
}

.about-human-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-human-grid > article {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(10, 20, 33, 0.78);
}

.about-human-grid > article p {
  margin-bottom: 0;
  color: var(--muted);
}

.about-cv-callout {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(62, 214, 196, 0.3);
  border-radius: var(--radius-md);
  background: rgba(62, 214, 196, 0.06);
}

.about-cv-callout p {
  margin: 0;
  color: #d2e1f1;
}

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

  .developer-hero h1 {
    max-width: 16ch;
  }

  .journey-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-grid article + article {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .journey-grid article:nth-child(even) {
    border-left: 1px solid var(--border);
  }

  .journey-grid article::after {
    display: none;
  }

  .journey-grid .journey-current {
    grid-column: 1 / -1;
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .developer-stack {
    grid-template-columns: 1fr;
  }

  .developer-process,
  .journey-grid,
  .about-human-grid {
    grid-template-columns: 1fr;
  }

  .journey-grid article,
  .journey-grid .journey-current {
    grid-column: auto;
    min-height: 0;
  }

  .journey-grid article:nth-child(even) {
    border-left: 0;
  }

  .about-cv-callout {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Show a complete news item and a preview of the next one. */
.home-page .hero-card-compact {
  height: 220px;
  max-height: calc(100% - 2rem);
}
.home-page .highlight-toggle {
  display: flex;
  flex-direction: column;
  scroll-snap-type: y proximity;
  scrollbar-width: thin;
}
.home-page .highlight-toggle-item {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  scroll-snap-align: start;
}
.home-page .highlight-toggle-panel p {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
@media (max-width: 640px) {
  .home-page .hero-card-compact { height: 180px; }
  .home-page .highlight-toggle-item { min-height: 0; }
}

/* Publication record: two historical charts with source access alongside. */
.publication-metrics-hero { padding-bottom: 1rem; }
.publication-metrics-hero h1 { margin-bottom: 1.5rem; }
.publication-metrics-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 190px; gap: 1.4rem; align-items: start; }
.metric-chart-card { min-width: 0; border-block: 1px solid rgba(124,200,255,.24); padding: 1rem 0; }
.metric-chart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.metric-chart-heading h2 { font: 600 1.15rem 'Space Grotesk',sans-serif; margin: 0; }
.metric-chart-heading strong { font: 500 clamp(1.5rem,3vw,2.3rem) 'Space Grotesk',sans-serif; color: var(--accent); }
.metric-chart { height: 180px; display: grid; place-items: center; margin: 1rem 0; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top,transparent 0,transparent 44px,rgba(124,200,255,.07) 44px,rgba(124,200,255,.07) 45px); }
.metric-chart p { color: var(--muted); font-size: .8rem; max-width: 25ch; text-align: center; padding: .6rem; background: rgba(2,4,9,.85); }
.metric-chart-details { display: flex; gap: 1.3rem; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.metric-chart-details b { display: block; font-size: 1.3rem; color: var(--text); }
.metric-chart-details small { display: block; font-size: .68rem; }
.metrics-source-links { display: flex; flex-direction: column; align-items: flex-start; padding-top: 1rem; gap: .8rem; }
.metrics-source-links .btn { font-size: .8rem; padding: .7rem .85rem; }
.metrics-source-links .text-link { margin: 0; }
.metrics-source-links p { color: var(--muted); font-size: .72rem; margin: 0; }
@media(max-width:980px) { .publication-metrics-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .metrics-source-links { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; padding-top: 0; } }
@media(max-width:640px) { .publication-metrics-layout { grid-template-columns: 1fr; } .metrics-source-links { grid-column: auto; } }
.metric-chart { display: block; height: auto; min-height: 180px; border: 0; background: none; }
.metric-chart svg { display: block; width: 100%; overflow: visible; }
.metric-chart svg text { fill: var(--muted); font: 11px 'IBM Plex Sans',sans-serif; }
.metrics-grid { stroke: rgba(124,200,255,.13); stroke-width: 1; }
.metrics-line { stroke-dasharray: 1; animation: metrics-draw 1.1s ease both; }
@keyframes metrics-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.metric-chart circle { cursor: pointer; stroke: transparent; stroke-width: 12; paint-order: stroke; }
.metric-chart circle:hover, .metric-chart circle:focus { r: 6; outline: none; stroke: rgba(124,200,255,.28); }
.metric-chart-readout { display: block; color: var(--muted); font: 500 .78rem ui-monospace,monospace; margin: -.3rem 0 1.1rem; min-height: 1.5em; }
.metrics-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.metrics-controls button { border: 1px solid var(--border); border-radius: 7px; padding: .45rem .75rem; color: var(--muted); background: rgba(12,23,38,.8); font: inherit; font-size: .8rem; cursor: pointer; }
.metrics-controls button[aria-pressed="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.metrics-controls button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.metrics-controls span, .metrics-footnote { font-size: .72rem; color: var(--muted); }
.metrics-controls span { margin-left: .6rem; }
.metrics-footnote { margin-top: 1rem; max-width: 90ch; }
@media(prefers-reduced-motion:reduce) { .metrics-line { animation: none; } }

.metrics-chart-hint { color: var(--muted); font-size: .78rem; margin: 0 0 1.2rem; }
.metrics-segment { stroke-dasharray: 1; stroke-dashoffset: 1; animation: metrics-segment-draw .186667s linear forwards; }
.metrics-point { opacity: 0; animation: metrics-point-show .106667s ease forwards; }
@keyframes metrics-segment-draw { to { stroke-dashoffset: 0; } }
@keyframes metrics-point-show { to { opacity: 1; } }
@media(prefers-reduced-motion:reduce) {
 .metrics-segment { animation: none; stroke-dashoffset: 0; }
 .metrics-point { animation: none; opacity: 1; }
}

/* Full-width publication plots and supporting metrics. */
.publication-metrics-layout { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2rem; }
.publication-stat-boxes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1.4rem; }
.publication-stat-box { padding: 1.25rem 1.4rem; border: 1px solid rgba(124,200,255,.24); border-radius: 14px; background: linear-gradient(150deg,rgba(19,33,52,.65),rgba(7,13,22,.75)); }
.publication-stat-box .eyebrow { font-size: .68rem; margin-bottom: .7rem; }
.publication-stat-box strong { display: block; font: 500 clamp(2rem,4vw,2.8rem)/1.15 'Space Grotesk',sans-serif; color: var(--accent); }
.publication-stat-box h2 { margin: .5rem 0 0; font: 500 1rem/1.4 'IBM Plex Sans',sans-serif; }
.publication-stat-box p, .metrics-snapshot-note { color: var(--muted); font-size: .75rem; }
.publication-stat-box p { margin: .3rem 0 0; }
.metrics-snapshot-note { margin: 1rem 0 0; }
@media(max-width:640px) { .publication-metrics-layout, .publication-stat-boxes { grid-template-columns: 1fr; } }

.publication-stat-box h2.eyebrow { margin: 0 0 .7rem; color: var(--accent); font-size: .68rem; font-weight: 600; }

/* Compact paired charts with supporting figures on the right. */
.publication-dashboard { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 1.7rem; align-items: start; }
.publication-dashboard .publication-metrics-layout { gap: 1.3rem; }
.publication-dashboard .publication-stat-boxes { grid-template-columns: 1fr; gap: .7rem; margin-top: 0; }
.publication-dashboard .publication-stat-box { padding: .85rem 1rem; }
.publication-dashboard .publication-stat-box strong { font-size: 2rem; }
.publication-dashboard .metric-chart { min-height: 0; }
@media(max-width:980px) {
 .publication-dashboard { grid-template-columns: minmax(0,1fr) 185px; gap: 1rem; }
 .publication-dashboard .publication-metrics-layout { gap: .8rem; }
}
@media(max-width:760px) {
 .publication-dashboard { grid-template-columns: 1fr; }
 .publication-dashboard .publication-stat-boxes { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:640px) {
 .publication-dashboard .publication-stat-boxes { grid-template-columns: 1fr; }
}
.recent-publications-heading { margin-bottom: 1.5rem; }
.recent-publications-heading h2 { margin: 0; font: 600 clamp(1.7rem,3vw,2.5rem)/1.15 'Space Grotesk',sans-serif; }
.recent-publications-list { display: grid; gap: 1.1rem; }
.recent-publication { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); align-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(155deg,rgba(15,28,45,.96),rgba(7,14,24,.97)); }
.recent-publication-copy { padding: clamp(1.3rem,3vw,2.2rem); }
.recent-publication-meta { color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin: 0 0 .65rem; }
.recent-publication h3 { font: 600 clamp(1.2rem,2vw,1.55rem)/1.22 'Space Grotesk',sans-serif; margin: 0 0 .8rem; }
.recent-publication h3 a { color: var(--text); text-decoration: none; }
.recent-publication h3 a:hover { color: var(--accent); text-decoration: underline; }
.recent-publication-authors { color: #bcd1e9; font-size: .87rem; margin: 0 0 .8rem; }
.recent-publication-description { color: var(--muted); margin: 0; max-width: 70ch; }
.recent-publication-figure { margin: 0; padding: 1rem; background: rgba(3,8,15,.58); min-width: 0; }
.recent-publication-figure img { width: 100%; height: 245px; object-fit: contain; background: #f6f7f9; border-radius: 9px; }
.recent-publication-figure figcaption { margin-top: .4rem; text-align: right; color: var(--muted); font-size: .72rem; }
.recent-publication-figure a { color: inherit; }
.recent-publication.figure-left .recent-publication-figure { grid-column: 1; grid-row: 1; }
.recent-publication.figure-left .recent-publication-copy { grid-column: 2; grid-row: 1; }
@media (max-width: 700px) { .recent-publication { grid-template-columns: 1fr; } .recent-publication.figure-left .recent-publication-figure, .recent-publication.figure-left .recent-publication-copy { grid-column: auto; grid-row: auto; } .recent-publication-figure img { height: 200px; } }
@media (min-width: 701px) {
  .recent-publication.figure-left { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
}

.recent-publication-badge { display: inline-block; margin-bottom: .7rem; padding: .25rem .6rem; color: var(--primary); background: rgba(62,214,196,.08); border: 1px solid rgba(62,214,196,.28); border-radius: 999px; font-size: .68rem; line-height: 1.3; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Let the simulation continue behind the homepage navigation and footer. */
.home-page > .home-cosmos-bg {
  position: fixed;
  z-index: 0;
}

.home-page .site-header,
.home-page .site-footer {
  position: relative;
  z-index: 3;
  background: rgba(8, 13, 22, 0.68);
  backdrop-filter: blur(12px);
}

.home-page .site-header {
  position: sticky;
}

/* Open publication entries, with actions following each summary. */
.recent-publications-list { gap: 0; }
.recent-publication { border: 0; border-bottom: 1px solid rgba(160,198,225,.2); border-radius: 0; background: transparent; overflow: visible; padding: 1.5rem 0; }
.recent-publication-copy { padding: 1rem clamp(1.2rem,3vw,2.2rem) 1rem 0; }
.recent-publication.figure-left .recent-publication-copy { padding: 1rem 0 1rem clamp(1.2rem,3vw,2.2rem); }
.recent-publication-figure { background: transparent; padding: .5rem; }
.recent-publication-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.recent-publication-actions .recent-publication-badge { margin: 0; }
.recent-publication-paper { display: inline-block; padding: .25rem .65rem; color: var(--accent); border: 1px solid rgba(124,200,255,.4); border-radius: 999px; font-size: .68rem; line-height: 1.3; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.recent-publication-paper:hover { background: rgba(124,200,255,.12); }
@media(max-width:700px) { .recent-publication-copy, .recent-publication.figure-left .recent-publication-copy { padding: .7rem 0; } .recent-publication-figure { padding: .5rem 0; } }
/* Tone down the paper's white figure backgrounds for the dark page. */
.recent-publication-figure img { background: #d2d9e2; filter: brightness(.72); }

/* Show paper figures at their own proportions, without a surrounding frame. */
.recent-publication-figure { padding: 0; background: transparent; }
.recent-publication-figure img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; background: transparent; filter: none; border-radius: 0; }
.recent-publication-actions .recent-publication-badge, .recent-publication-paper { font-size: .78rem; padding: .38rem .75rem; }

/* Give wide plots room, and keep the tall second figure compact. */
@media (min-width: 701px) {
  .recent-publication:first-child { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .recent-publication:nth-child(2) .recent-publication-figure img { max-height: 290px; }
}
