:root {
  --ink: #0f1b2d;
  --ink-strong: #111827;
  --muted: #5b6675;
  --accent: #b55a3a;
  --accent-2: #1f6b67;
  --surface: #f8f3ec;
  --surface-2: #fff8f1;
  --surface-3: #efe6da;
  --border: rgba(15, 27, 45, 0.12);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background-color: var(--surface);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(181, 90, 58, 0.12), transparent 45%),
    radial-gradient(circle at 86% 16%, rgba(31, 107, 103, 0.12), transparent 40%),
    linear-gradient(180deg, #fdf8f2 0%, #f6efe6 42%, #f2e9de 100%);
  line-height: 1.6;
}

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

a:hover,
a:focus {
  color: var(--accent);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  z-index: 20;
}

.skip-link:focus {
  left: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(248, 243, 236, 0.8);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--accent), #c98a6b);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-name {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 700;
}

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

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.site-nav a {
  position: relative;
  padding-bottom: 4px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent-2);
  transition: width 0.3s ease;
}

.site-nav a:hover::after,
.site-nav a:focus::after {
  width: 100%;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.hero {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 12px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  border: 1px solid var(--ink);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

.button:hover,
.button:focus {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button.ghost:hover,
.button.ghost:focus {
  color: var(--accent);
  background: #fff;
  border-color: var(--accent);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(31, 107, 103, 0.12), transparent 50%);
  pointer-events: none;
}

.portrait {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.meta {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.meta-label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.meta-value {
  margin: 4px 0 0;
  font-weight: 600;
}

.section {
  padding: 56px 0 10px;
}

.section-header h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  margin-bottom: 10px;
}

.section-header p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

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

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

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

.panel,
.project-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.panel h3,
.project-card h3 {
  margin-top: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chips span {
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.pub-list {
  margin: 24px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 20px;
}

.pub-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.pub-authors,
.pub-venue {
  color: var(--muted);
}

.pub-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.9rem;
}

.pub-links a {
  color: var(--accent-2);
  font-weight: 600;
}

.project-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip.is-active {
  background: var(--accent-2);
  color: #fff;
  border-color: transparent;
}

.chip:focus-visible {
  outline: 2px solid rgba(31, 107, 103, 0.4);
  outline-offset: 2px;
}

.blog-search input {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 0.9rem;
  background: #fff;
  min-width: 220px;
}

.blog-list {
  display: grid;
  gap: 20px;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.blog-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.blog-card h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
}

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

.blog-tags span {
  background: #fff;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}

.text-link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--accent-2);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.text-link::after {
  content: "->";
}

.blog-empty {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
}

.blog-modal {
  border: none;
  border-radius: 24px;
  padding: 0;
  width: min(760px, 92vw);
  box-shadow: var(--shadow);
}

.blog-modal::backdrop {
  background: rgba(15, 27, 45, 0.45);
  backdrop-filter: blur(3px);
}

.blog-modal-shell {
  background: var(--surface);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.blog-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  display: grid;
  gap: 16px;
}

.modal-close {
  border: none;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid var(--border);
  font-weight: 600;
  justify-self: end;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--accent);
  border-color: var(--accent);
}

.blog-article h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
}

.blog-article-meta {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-article h4 {
  margin-bottom: 4px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.timeline-date {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  margin-right: 8px;
}

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.contact-card {
  background: linear-gradient(140deg, #1f6b67, #2c3e50);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 20px;
  box-shadow: var(--shadow);
}

.contact-card p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.contact-details {
  display: grid;
  gap: 10px;
}

.contact-card .button {
  background: #fff;
  color: #1f6b67;
}

.contact-card .button:hover,
.contact-card .button:focus {
  background: #ffe9d6;
  color: #b55a3a;
}

.muted {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 24px 60px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
  }

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

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    padding: 16px 18px;
  }

  main {
    padding: 16px 18px 60px;
  }

  .site-nav {
    gap: 12px;
  }

  .hero-card {
    padding: 18px;
  }

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

  .blog-search input {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
