:root {
  --bg: #eef4ff;
  --paper: rgba(247, 249, 255, 0.88);
  --paper-strong: #fcfdff;
  --ink: #1c2340;
  --muted: #58607d;
  --accent: #7d7ff2;
  --accent-deep: #5b54c7;
  --accent-soft: #d9d6ff;
  --accent-alt: #8bb7ff;
  --line: rgba(28, 35, 64, 0.12);
  --shadow: 0 24px 60px rgba(88, 103, 177, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(139, 183, 255, 0.28), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(125, 127, 242, 0.2), transparent 26%),
    linear-gradient(180deg, #f3f7ff 0%, #edf2ff 42%, #eef0ff 100%);
  font-family: var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 90%);
  opacity: 0.4;
}

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

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

.shell {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(239, 244, 255, 0.76);
  border-bottom: 1px solid rgba(24, 33, 38, 0.08);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: grid;
  gap: 0.2rem;
}

.brand-mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 0.95;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.site-nav a {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(125, 127, 242, 0.12);
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.page {
  padding: 2rem 0 4rem;
}

.hero-panel,
.content-panel,
.page-panel {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero-panel::after,
.content-panel::after,
.page-panel::after {
  content: "";
  position: absolute;
  inset: auto -8% -28% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 127, 242, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-panel {
  margin-top: 1rem;
  padding: 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.portrait-wrap {
  position: relative;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: -14px 20px 24px -18px;
  border: 1px solid rgba(139, 183, 255, 0.3);
  border-radius: 28px;
  transform: rotate(-4deg);
}

.portrait-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(217, 214, 255, 0.5));
  padding: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(24, 33, 38, 0.08);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.pill,
.meta-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent-deep);
}

.hero-copy h1,
.page-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 8vw, 6rem);
  font-weight: 600;
  line-height: 0.92;
}

.hero-copy h1 span,
.page-title span {
  color: var(--accent-deep);
  font-style: italic;
}

.hero-lead,
.page-intro {
  max-width: 58ch;
  margin: 1.4rem 0 0;
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 1.6rem 0 0;
}

.proof-points {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.proof-point {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 38, 0.08);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}

.pill {
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 999px;
  color: var(--ink);
  letter-spacing: 0.08em;
}

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

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.button {
  background: var(--accent);
  color: #fff9f5;
  box-shadow: 0 10px 24px rgba(217, 95, 56, 0.28);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  border: 1px solid rgba(24, 33, 38, 0.1);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.content-panel {
  margin-top: 1.5rem;
  padding: 2rem;
}

.stats-grid,
.card-grid,
.project-grid,
.contact-grid,
.timeline-grid,
.list-grid {
  display: grid;
  gap: 1rem;
}

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

.stat-card,
.feature-card,
.contact-card,
.timeline-card,
.pub-card,
.teaching-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 24px;
  padding: 1.35rem;
}

.stat-value {
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1;
}

.stat-label,
.feature-card p,
.timeline-card p,
.pub-meta,
.pub-authors,
.contact-card p,
.teaching-card p {
  color: var(--muted);
}

.grid-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  margin-top: 1rem;
}

.section-heading {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.98;
}

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

.quote-block {
  padding: 1.5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(139, 183, 255, 0.18), rgba(125, 127, 242, 0.14));
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.25;
}

.feature-card h3,
.project-card h3,
.timeline-card h3,
.pub-card h3,
.contact-card h3,
.teaching-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.contact-card h3,
.contact-card a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

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

.project-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 24px;
  padding: 1.35rem;
}

.project-statement {
  margin: 0 0 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.project-list,
.case-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.project-links,
.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.text-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.case-study {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  margin-top: 1rem;
}

.case-panel,
.case-side {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 24px;
  padding: 1.4rem;
}

.case-panel h3,
.case-side h3 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
}

.case-metric {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.case-caption {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.55;
}

.timeline-grid,
.list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.meta-label {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--accent-deep);
}

.page-panel {
  margin-top: 1rem;
  padding: 2.2rem;
}

.page-header {
  display: grid;
  gap: 1rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.page-header.compact {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.page-note {
  max-width: 30ch;
  padding: 1rem 1.2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 38, 0.08);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-alt);
}

.stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.pub-card .pill,
.feature-card .pill,
.timeline-card .pill {
  margin-bottom: 0.85rem;
}

.pub-card .pill,
.feature-card .pill,
.timeline-card .pill,
.contact-card .pill {
  display: inline-flex;
  background: rgba(125, 127, 242, 0.12);
  color: var(--accent-deep);
  border: none;
  padding: 0.45rem 0.7rem;
  min-height: 0;
}

.pub-meta,
.pub-authors {
  margin: 0.35rem 0;
  line-height: 1.65;
}

.pub-authors strong {
  color: var(--ink);
}

.split-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

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

.contact-card {
  min-height: 100%;
}

.contact-card a {
  color: var(--accent-deep);
}

.site-footer {
  padding: 1rem 0 3rem;
}

.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 980px) {
  .hero-grid,
  .grid-split,
  .split-columns,
  .page-header.compact,
  .case-study {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .card-grid,
  .project-grid,
  .timeline-grid,
  .list-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 1rem, 1160px);
  }

  .site-header .shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-panel,
  .content-panel,
  .page-panel {
    padding: 1.25rem;
    border-radius: 24px;
  }

  .hero-grid {
    gap: 1.5rem;
  }

  .stats-grid,
  .card-grid,
  .project-grid,
  .timeline-grid,
  .list-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-title {
    font-size: clamp(2.8rem, 16vw, 4rem);
  }

  .quote-block {
    font-size: 1.3rem;
  }
}
