:root {
  --bg: #eef3f8;
  --bg-deep: #dce7f3;
  --panel: rgba(248, 251, 255, 0.82);
  --panel-strong: #fcfdff;
  --text: #13202d;
  --muted: #536577;
  --line: rgba(19, 32, 45, 0.1);
  --accent: #0d766e;
  --accent-strong: #0a5b56;
  --accent-soft: #dff4f0;
  --highlight: #2f5fa7;
  --shadow: 0 24px 64px rgba(28, 52, 84, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(104, 151, 210, 0.24), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(30, 153, 145, 0.14), transparent 24%),
    linear-gradient(180deg, #f3f7fb 0%, #eaf1f8 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 78%);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.hero {
  padding: 1rem 0 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0 1.5rem;
}

.wordmark,
.topbar-links a,
.button,
.email-link,
.text-link,
.footer-links a,
.legal-content a {
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.wordmark {
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.topbar-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.96rem;
}

.topbar-links a:hover,
.wordmark:hover,
.button:hover,
.email-link:hover,
.text-link:hover,
.footer-links a:hover,
.legal-content a:hover {
  transform: translateY(-1px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 1.4rem;
  align-items: stretch;
}

.hero-copy,
.hero-portrait-card,
.content-block {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-portrait-card {
  min-height: 34rem;
}

.hero-copy {
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-portrait-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1.25fr) auto;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(22, 44, 72, 0.04), rgba(22, 44, 72, 0.16)),
    linear-gradient(135deg, #dde9f8, #f8fbff 58%);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 55%, rgba(19, 32, 45, 0.22) 100%);
}

.portrait-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.portrait-content {
  padding: 1.35rem 1.4rem 1.45rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7)),
    var(--panel-strong);
}

.eyebrow,
.card-kicker,
.timeline-years,
.project-tag {
  margin: 0 0 0.8rem;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.15rem);
  line-height: 0.93;
  max-width: 8ch;
}

h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  line-height: 1;
}

h3 {
  font-size: clamp(1.16rem, 2vw, 1.45rem);
  line-height: 1.1;
}

.lede,
.about-layout p,
.contact-layout p,
.timeline-role,
.timeline-meta,
.research-list,
.project-copy,
.project-subtitle {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.lede {
  max-width: 39rem;
  margin: 1.35rem 0 0;
  font-size: 1.15rem;
}

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

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.button-primary {
  background: var(--accent);
  color: #f8fffe;
}

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

.button-secondary {
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--line);
  color: var(--text);
}

.research-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.research-list li {
  position: relative;
  padding-left: 1.25rem;
}

.research-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--highlight), var(--accent));
  transform: translateY(-50%);
}

main {
  display: grid;
  gap: 1.25rem;
}

.content-block {
  border-radius: var(--radius-lg);
  padding: clamp(1.45rem, 3vw, 2.2rem);
}

.section-heading {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
}

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

.projects-block,
.contact-block {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(216, 236, 255, 0.5)),
    var(--panel);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1rem;
}

.project-card,
.cv-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.project-card {
  padding: 1.35rem;
}

.project-card-featured {
  grid-column: span 1;
}

.project-card-dfg {
  display: flex;
  flex-direction: column;
}

.project-card-top {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.project-mark {
  display: grid;
  place-items: center;
  width: 4.15rem;
  height: 4.15rem;
  border-radius: 1.2rem;
  background: linear-gradient(135deg, var(--highlight), var(--accent));
  color: #f7fffe;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.project-mark-image {
  display: block;
  object-fit: contain;
  background: transparent;
  padding: 0;
  width: 4.6rem;
  height: 4.6rem;
}

.project-title {
  margin: 0;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 1.16rem;
  line-height: 1.3;
  font-weight: 700;
}

.project-subtitle {
  margin: 0.22rem 0 0;
}

.project-copy {
  margin: 1rem 0 0;
}

.text-link {
  display: inline-flex;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.cv-column {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.column-heading {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.05rem;
}

.card-stack {
  display: grid;
  gap: 0.8rem;
}

.cv-card {
  padding: 1rem 1.05rem;
}

.cv-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}

.timeline-role,
.email-slot {
  margin: 0;
}

.timeline-role {
  color: var(--text);
  font-weight: 700;
  line-height: 1.42;
}

.timeline-meta {
  margin: 0.35rem 0 0;
}

.timeline-detail {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.institution-logo {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
}

.institution-logo-wide {
  width: clamp(4.2rem, 10vw, 9.2rem);
  height: auto;
  max-height: 2.8rem;
  object-fit: contain;
  object-position: left center;
  filter: saturate(0.95);
}

.institution-logo-appointment {
  width: clamp(5.4rem, 11vw, 11rem);
  max-height: 3.1rem;
}

.institution-logo-itu {
  width: 7.2rem;
  max-height: 1.9rem;
}

.institution-logo-brown {
  width: 7rem;
  max-height: 2.2rem;
}

.institution-logo-rit {
  width: 5.8rem;
  max-height: 1.95rem;
}

.email-slot {
  margin-top: 1rem;
  font-size: 1rem;
  min-height: 1.5rem;
  color: var(--text);
}

.email-link {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.noscript-note {
  margin-top: 0.8rem;
  color: var(--muted);
}

.book-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 1.2rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(252, 253, 255, 0.58);
  padding: 1rem 1.1rem;
}

.book-promo h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.1;
}

.book-promo p {
  margin: 0.55rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.book-promo .eyebrow {
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
}

.book-promo-actions {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
}

.book-promo-actions .text-link {
  padding-top: 0;
  font-size: 0.92rem;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 1.45rem 0 0;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: rgba(83, 101, 119, 0.78);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current="page"],
.legal-content a {
  color: var(--accent-strong);
}

.legal-page {
  max-width: 900px;
}

.legal-header {
  padding: 1rem 0 0.5rem;
}

.legal-content {
  display: grid;
  gap: 1.6rem;
}

.legal-content h1 {
  max-width: none;
  font-size: clamp(2.35rem, 6vw, 4.3rem);
}

.legal-section {
  display: grid;
  gap: 0.65rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.15;
}

.legal-section p {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-content a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1020px) {
  .hero-grid,
  .projects-grid,
  .cv-grid,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-portrait-card {
    min-height: auto;
  }

  .project-card-featured {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .book-promo {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--content-width));
    padding-top: 0.45rem;
  }

  .hero-copy,
  .hero-portrait-card,
  .content-block {
    border-radius: 24px;
  }

  h1 {
    max-width: none;
  }

  .project-card-top,
  .cv-card-header {
    align-items: flex-start;
  }

  .button {
    width: 100%;
  }

  .book-promo-actions .text-link {
    white-space: normal;
  }
}
