:root {
  --bg: #0b0e0d;
  --bg-strong: #171c1a;
  --panel: #141918;
  --panel-alt: #101413;
  --soft: #1b211f;
  --primary: #48b99d;
  --primary-strong: #e8f1ee;
  --text: #e8eeeb;
  --muted: #a0ada8;
  --border: rgba(218, 234, 227, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 14, 13, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--primary-strong);
  font-size: 1.15rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 500;
}

.nav a:hover,
.nav a:focus-visible,
.social-links a:hover,
.social-links a:focus-visible {
  color: var(--primary);
}

.nav a[aria-current="page"] {
  color: var(--primary-strong);
  font-weight: 700;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--primary-strong);
}

.section-soft {
  padding: 88px 0 58px;
  background:
    radial-gradient(ellipse at 82% 28%, rgba(72, 185, 157, 0.1), transparent 34%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: center;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  color: var(--primary-strong);
}

.title-row {
  margin-top: 10px;
  display: inline-block;
  padding: 0.5rem 0.9rem;
  background: rgba(72, 185, 157, 0.1);
  border: 1px solid rgba(72, 185, 157, 0.22);
  border-radius: 999px;
  font-weight: 700;
  color: var(--primary);
}

.intro {
  margin: 22px 0 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 1.05rem;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.profile-badges span {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mini-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.mini-list a,
.references-list a {
  color: var(--primary);
  font-weight: 700;
}

.portrait-frame {
  background: var(--panel);
  border: 1px solid rgba(72, 185, 157, 0.22);
  border-radius: 30px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  background: var(--bg-strong);
}

.stats-strip {
  padding: 18px 0 32px;
}

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

.stats-grid > div {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  text-align: center;
}

.stats-grid strong {
  font-size: 1.7rem;
  color: var(--primary-strong);
  line-height: 1.2;
}

.stats-grid span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.directory-section,
.content-section {
  padding: 76px 0 88px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading p {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.section-heading h2,
.content-section h2 {
  margin: 0;
  color: var(--primary-strong);
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.section-heading span {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.directory-card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  min-height: 236px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.directory-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.directory-card:hover,
.directory-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(72, 185, 157, 0.38);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.directory-card:hover::before,
.directory-card:focus-visible::before {
  opacity: 1;
}

.emoji {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.index {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.directory-card h3 {
  margin: 10px 0 8px;
  font-size: 1.25rem;
  color: var(--primary-strong);
}

.directory-card p {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--primary);
}

.directory-card small {
  margin-top: 10px;
  display: block;
  color: var(--muted);
  line-height: 1.6;
}

.arrow {
  margin-top: auto;
  font-size: 1.6rem;
  color: var(--primary-strong);
  font-weight: 700;
}

.split-layout,
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 35px;
  align-items: start;
}

.split-layout p,
.content-section p,
.reference-box p,
.references-list p,
.info-card p,
.project-item p,
.timeline-item p {
  color: var(--muted);
}

.alt-bg {
  background: var(--panel-alt);
}

.card-grid {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

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

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

.info-card,
.reference-box,
.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover,
.reference-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(72, 185, 157, 0.12);
}

.info-card h3,
.project-item h3,
.reference-box h3,
.timeline-item h3 {
  margin: 0 0 8px;
  color: var(--primary-strong);
  line-height: 1.35;
}

.project-list {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.project-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 18px;
}

.timeline {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.time {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}

.bullet-list {
  margin: 24px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.reference-grid,
.references-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.references-list {
  margin-top: 28px;
}

.references-list h4 {
  margin: 0 0 8px;
  color: var(--primary-strong);
}

.contact-card p {
  margin: 0 0 8px;
  color: var(--muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.social-prompt {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--primary);
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.social-link svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: currentColor;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 0 30px;
  color: var(--muted);
}

.subpage .page-hero {
  padding: 68px 0 54px;
  background:
    radial-gradient(ellipse at 85% 30%, rgba(72, 185, 157, 0.1), transparent 36%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0;
  color: var(--primary-strong);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.page-lead {
  max-width: 720px;
  margin: 16px 0 0;
  font-size: 1.08rem;
  color: var(--muted);
}

.publication-list {
  margin: 24px 0 0;
  padding-left: 1.5rem;
  display: grid;
  gap: 18px;
  color: var(--muted);
}

.publication-list li {
  padding-left: 0.4rem;
}

.publication-list strong {
  color: var(--primary-strong);
}

.note {
  margin-top: 20px;
  font-size: 0.88rem;
}

.project-item > a {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 700;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(72, 185, 157, 0.65);
  outline-offset: 3px;
}

::selection {
  background: rgba(72, 185, 157, 0.3);
  color: var(--primary-strong);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .directory-grid,
  .card-grid.three-col,
  .card-grid.four-col,
  .reference-grid,
  .references-list,
  .split-layout,
  .contact-grid,
  .stats-grid,
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .topbar-inner {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 10px;
  }

  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .topbar-inner > .button {
    width: auto;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .directory-grid,
  .card-grid.three-col,
  .card-grid.four-col,
  .reference-grid,
  .references-list,
  .split-layout,
  .contact-grid,
  .stats-grid,
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .profile-badges {
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar-inner {
    min-height: 64px;
  }
}
