/* ---------- Design tokens ---------- */
:root {
  --bg: #faf7fc;
  --surface: #ffffff;
  --text: #2a2233;
  --muted: #6b6477;
  --accent: #7c4dbd;
  --accent-soft: #eadcf7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a:focus-visible,
.button:focus-visible,
.contact-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Header + navigation ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 6vw;
  border-bottom: 1px solid var(--accent-soft);
}

.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.navbar ul {
  display: flex;
  gap: 28px;
  list-style: none;
}

.navbar a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.navbar a:hover,
.navbar a.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Home: asymmetric two columns ---------- */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10vh 5vw 6vh;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  column-gap: 72px;
  row-gap: 48px;
  align-items: start;
}

.hero-text {
  text-align: left;
}

#title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.6rem, 4.2vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 12px;
  white-space: nowrap;
}

.subtitle {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 40px;
}

/* Arch-shaped portrait, nudged down so it doesn't line up with the text */
.portrait {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 200px 200px 24px 24px;
  border: 6px solid var(--accent-soft);
  box-shadow: 0 12px 32px rgba(124, 77, 189, 0.2);
  justify-self: end;
  margin-top: 28px;
}

/* ---------- Quotes ---------- */
.quotes {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 36px;
}

.quote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  max-width: 46ch;
}

.quote blockquote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text);
}

.quote figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.quote figcaption::before {
  content: "— ";
}

/* ---------- Banner (spans both columns) ---------- */
.banner {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 16px;
}

/* ---------- Buttons ---------- */
.button-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 24px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 77, 189, 0.3);
}

.button-outline {
  background: transparent;
  color: var(--accent);
}

/* ---------- About section ---------- */
.about {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4vh 5vw 12vh;
}

.about h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.about p {
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.75;
}

/* ---------- Contact page ---------- */
.contact-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 12vh 6vw;
  text-align: center;
}

.contact-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  margin-bottom: 16px;
}

.contact-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(124, 77, 189, 0.15);
}

.contact-label {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

/* ---------- Resume page ---------- */
.resume-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 8vh 6vw 12vh;
  text-align: center;
}

.resume-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.resume-page .button-row {
  margin-bottom: 32px;
}

.resume-viewer {
  width: 100%;
  height: 1100px;
  max-height: 85vh;
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(124, 77, 189, 0.12);
}

.resume-fallback {
  padding: 40px 20px;
  color: var(--muted);
}

.resume-fallback a {
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Research page ---------- */
.research-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 8vh 6vw 12vh;
}

.research-page h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  text-align: center;
  margin-bottom: 40px;
}

.research-page .quote {
  margin: 0 auto 48px;
}

.research-subheading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.6rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-soft);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: 16px;
  padding: 28px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(124, 77, 189, 0.15);
}

.project-meta {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 12px;
}

.project-card p:not(.project-meta) {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.project-tags li {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Mobile: stack the home page ---------- */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 6vh;
  }

  .portrait {
    order: -1;
    justify-self: center;
    max-width: 260px;
    margin-top: 0;
  }

  #title {
    font-size: clamp(1.4rem, 7vw, 2.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}