/* ---------- Tokens ---------- */
:root {
  --paper: #f6f3ee;
  --paper-dim: #efeae1;
  --ink: #1c1a17;
  --ink-soft: #55504a;
  --ink-faint: #8a847a;
  --accent: #b5502f;
  --accent-soft: #d97b52;
  --line: rgba(28, 26, 23, 0.12);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --gutter: clamp(24px, 5vw, 72px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

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

/* subtle paper grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  background: rgba(246, 243, 238, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::after { width: 100%; }

.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { width: 100%; }

/* ---------- Layout helpers ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) var(--gutter);
}

.section + .section {
  padding-top: 0;
}

/* ---------- Interior page header ---------- */
.page-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(150px, 20vw, 200px) var(--gutter) 40px;
}

.page-header h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  max-width: 16ch;
}

.page-header .hero-tagline {
  margin-top: 20px;
}

.page-header + .section {
  padding-top: 20px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 14ch;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 var(--gutter);
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(181, 80, 47, 0.10), transparent),
    var(--paper);
}

.hero-inner { max-width: 780px; }

.hero h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  margin-bottom: 22px;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
}

.hero-scroll span {
  width: 1px;
  height: 34px;
  background: var(--ink-faint);
  position: relative;
  overflow: hidden;
}
.hero-scroll span::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}
.hero-scroll small {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  margin: 48px 0 64px;
}

.about-copy p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.fact-value {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.fact-value a:hover { color: var(--accent); }

.expertise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.expertise-group h3 {
  font-size: 1rem;
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 10px;
}

.expertise-group p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Experience / Timeline ---------- */
.timeline {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}

.timeline-marker {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.timeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.timeline-content h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0 0 16px;
}

.timeline-content ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-content li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
}

.timeline-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}

.education {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.education-heading {
  font-size: 1rem;
  font-family: var(--sans);
  font-weight: 600;
  margin-bottom: 28px;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.education-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.education-degree {
  font-family: var(--serif);
  font-size: 1.1rem;
}

.education-detail {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.education-date {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.research-link {
  margin-top: 40px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

.research-link a {
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Home links ---------- */
.home-links-section { padding-top: 0; }

.home-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.home-link-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  padding: 36px 28px;
  transition: background 0.3s ease;
}

.home-link-card:hover { background: var(--paper-dim); }

.home-link-index {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 22px;
}

.home-link-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.home-link-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
  flex-grow: 1;
}

.home-link-arrow {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

.home-link-card:hover .home-link-arrow { color: var(--accent); }

@media (max-width: 900px) {
  .home-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .home-links { grid-template-columns: 1fr; }
}

/* ---------- Interests ---------- */
.interests {
  background: var(--paper-dim);
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  background: var(--line);
  border: 1px solid var(--line);
}

.interest-card {
  background: var(--paper-dim);
  padding: 40px 32px;
  transition: background 0.3s ease;
}

.interest-card:hover { background: var(--paper); }

.interest-index {
  display: block;
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.interest-card h3 {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.interest-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Gallery ---------- */
.gallery-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 8px;
}

.gallery-note a {
  color: var(--accent);
  font-weight: 500;
}

.gallery-grid {
  margin-top: 48px;
  columns: 3;
  column-gap: 16px;
}

.gallery-tile {
  display: block;
  margin: 0 0 16px;
  break-inside: avoid;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-tile img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-tile:hover img { transform: scale(1.04); }

.tile-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(20, 18, 16, 0.68), transparent);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-tile:hover .tile-caption { opacity: 1; }

@media (max-width: 900px) {
  .gallery-grid { columns: 2; }
}

@media (max-width: 560px) {
  .gallery-grid { columns: 1; }
}

/* ---------- Contact ---------- */
.contact {
  text-align: left;
}

.contact-inner h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  max-width: 16ch;
  margin: 0 0 40px;
}

.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 32px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-links {
  display: flex;
  gap: 28px;
}

.contact-links a {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.contact-links a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px var(--gutter) 40px;
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-facts { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .expertise { grid-template-columns: 1fr; gap: 24px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .education-grid { grid-template-columns: 1fr; gap: 32px; }
  .interests-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 0 10px;
  }
  .logo { padding: 0 16px; }
  .site-nav { width: 100%; }
  .nav-links {
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 16px 4px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links li { flex-shrink: 0; }
  .nav-links a { display: block; white-space: nowrap; padding-bottom: 6px; font-size: 0.8rem; }
}
