:root {
  --paper: #f7f4ed;
  --ink: #202428;
  --muted: #66706f;
  --line: #d9d5c9;
  --teal: #1d7576;
  --teal-dark: #114f52;
  --gold: #b98939;
  --red: #9d453d;
  --white: #fffdf8;
  --shadow: 0 22px 60px rgba(36, 42, 44, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(247, 244, 237, 0.86);
  border-bottom: 1px solid rgba(32, 36, 40, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 760;
  text-decoration: none;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: clamp(12px, 2.4vw, 30px);
  font-size: 0.94rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: min(820px, 92vh);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 108px clamp(20px, 6vw, 86px) 56px;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(247, 244, 237, 0.98) 0%, rgba(247, 244, 237, 0.74) 36%, rgba(247, 244, 237, 0.08) 70%), url("assets/geometry-hero.png");
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  max-width: 700px;
  z-index: 1;
}

.profile-portrait {
  position: absolute;
  top: clamp(108px, 14vw, 150px);
  right: clamp(22px, 5vw, 76px);
  z-index: 1;
  width: clamp(150px, 16vw, 230px);
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 4px solid rgba(255, 253, 248, 0.88);
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(32, 36, 40, 0.18);
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 16%;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.5rem, 10vw, 8.8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.04rem;
}

.hero-copy {
  max-width: 680px;
  color: #30393a;
  font-size: clamp(1.08rem, 1.7vw, 1.38rem);
  border: 1px solid rgba(255, 253, 248, 0.72);
  border-radius: 8px;
  background: rgba(247, 244, 237, 0.82);
  padding: 14px 16px;
  box-shadow: 0 14px 38px rgba(32, 36, 40, 0.08);
  backdrop-filter: blur(8px);
}

.hero-actions,
.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button,
.filter {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(32, 36, 40, 0.18);
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  padding: 10px 15px;
  font: inherit;
  font-weight: 710;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.filter:hover,
.filter.is-active {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.trillo-button {
  flex-basis: min(100%, 620px);
  justify-content: flex-start;
  gap: 14px;
  border-color: rgba(29, 117, 118, 0.5);
  background: rgba(232, 238, 233, 0.92);
  box-shadow: 0 12px 32px rgba(29, 117, 118, 0.13);
}

.trillo-button span {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-weight: 820;
}

.trillo-button small {
  color: #465052;
  font-size: 0.83rem;
  font-weight: 650;
  line-height: 1.35;
}

.quick-facts {
  width: min(100%, 650px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
}

.quick-facts div {
  min-height: 84px;
  border: 1px solid rgba(32, 36, 40, 0.12);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 28px rgba(36, 42, 44, 0.08);
}

dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

dd {
  margin: 0;
  font-weight: 720;
}

.fact-link {
  color: inherit;
  text-decoration-color: rgba(29, 117, 118, 0.34);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.fact-link:hover {
  color: var(--teal-dark);
}

.fact-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 640;
  line-height: 1.25;
}

.section {
  padding: clamp(68px, 10vw, 120px) clamp(20px, 6vw, 86px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.research-grid article {
  min-height: 250px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.48);
}

.research-grid p,
.clean-list,
.cv-band p {
  color: var(--muted);
}

.papers-section {
  background: #fffdf8;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.paper-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.publication-list {
  display: grid;
  gap: 12px;
}

.paper {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.paper-year {
  color: var(--gold);
  font-weight: 780;
}

.paper-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.paper-title a {
  text-decoration-color: rgba(29, 117, 118, 0.32);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.paper-title a:hover {
  color: var(--teal-dark);
}

.paper-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.paper-tags {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.toolkit span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(32, 36, 40, 0.14);
  border-radius: 999px;
  background: rgba(247, 244, 237, 0.7);
  padding: 5px 10px;
  color: #465052;
  font-size: 0.82rem;
  font-weight: 700;
}

.source-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.split-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 8vw, 96px);
}

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

.clean-list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.cv-band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr) auto;
  gap: 34px;
  align-items: center;
  background: #e8eee9;
}

.toolkit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 28px clamp(20px, 6vw, 86px);
  color: var(--muted);
  background: var(--ink);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #f5efe0;
}

@media (max-width: 1120px) {
  .profile-portrait {
    top: 104px;
    right: 24px;
    width: 156px;
  }
}

@media (max-width: 980px) {
  .quick-facts,
  .research-grid,
  .split-section,
  .cv-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .paper-tags {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
    padding: 70px 20px 36px;
  }

  .hero-media {
    background-image: linear-gradient(180deg, rgba(247, 244, 237, 0.98) 0%, rgba(247, 244, 237, 0.88) 58%, rgba(247, 244, 237, 0.42) 100%), url("assets/geometry-hero.png");
    background-position: 62% center;
  }

  .profile-portrait {
    position: relative;
    top: auto;
    right: auto;
    width: 148px;
    margin: 28px 0 0;
  }

  .trillo-button {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  h1 {
    font-size: clamp(3.6rem, 18vw, 5.4rem);
  }

  .quick-facts,
  .research-grid,
  .split-section,
  .cv-band {
    grid-template-columns: 1fr;
  }

  .quick-facts div,
  .research-grid article {
    min-height: auto;
  }

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

  .paper-tags {
    grid-column: 1;
  }

  .site-footer {
    flex-direction: column;
  }
}
