@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300&family=Inter:wght@300;400;500&display=swap');

:root {
  --bg: #FAF8F3;
  --text: #2C2C2C;
  --primary: #3B5142;
  --accent: #C4714A;
  --divider: #E0DBD0;
  --muted: #635f5a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Focus styles ── */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Navigation ── */

nav {
  position: sticky;
  top: 0;
  background-color: var(--bg);
  border-bottom: 1px solid var(--divider);
  z-index: 100;
  padding: 0 2rem;
}

.nav-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* ── Page wrapper ── */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

/* ── Sections ── */

section {
  padding: 4rem 0;
  border-top: 1px solid var(--divider);
}

section:first-of-type {
  border-top: none;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ── Hero ── */

.hero {
  padding: 5rem 0 4rem;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.hero-text {
  flex: 1;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.hero .contact-icons {
  display: flex;
  gap: 0.75rem;
}

.hero-photo {
  width: 180px;
  height: 225px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: cover;
  object-position: center top;
}

/* ── About ── */

.about p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 640px;
}

.about p + p {
  margin-top: 1.25rem;
}

/* ── Timeline ── */

.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background-color: var(--primary);
  opacity: 0.25;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
  position: relative;
  margin-bottom: 3.5rem;
  align-items: start;
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0.4rem;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent);
  z-index: 1;
}

/* Odd entries: text right, photo left */
.timeline-entry:nth-child(odd) .tl-content {
  grid-column: 2;
  grid-row: 1;
}

.timeline-entry:nth-child(odd) .tl-photo,
.timeline-entry:nth-child(odd) .tl-photos-stack {
  grid-column: 1;
  grid-row: 1;
}

/* Even entries: text left, photo right */
.timeline-entry:nth-child(even) .tl-content {
  grid-column: 1;
  grid-row: 1;
}

.timeline-entry:nth-child(even) .tl-photo,
.timeline-entry:nth-child(even) .tl-photos-stack {
  grid-column: 2;
  grid-row: 1;
}

.tl-date {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.tl-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.3;
}

.tl-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
  margin-top: 0.6rem;
}

.tl-photo {
  display: block;
  background-color: var(--divider);
  border-radius: 4px;
  width: 100%;
  aspect-ratio: 3 / 2;
  align-self: start;
}

.tl-photos-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-self: start;
}

.tl-photos-stack .tl-photo {
  width: 100%;
}

/* ── Education ── */

.edu-entry {
  padding: 1.75rem 0;
  border-top: 1px solid var(--divider);
}

.edu-entry:first-of-type {
  border-top: none;
  padding-top: 0;
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.edu-qualification {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--text);
}

.edu-dates {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.edu-institution {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
}

/* ── Contact ── */

.contact p {
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.contact p:last-of-type {
  margin-bottom: 1.5rem;
}

.contact a:not(.icon-tile) {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.contact a:not(.icon-tile):hover {
  color: var(--accent);
}

.contact-icons {
  display: flex;
  gap: 0.75rem;
}

.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--divider);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.icon-tile svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-tile:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Download button ── */

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-download svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-download:hover {
  background-color: var(--primary);
  color: var(--bg);
}

/* ── Resume page ── */

.resume-top {
  padding: 3.5rem 0 2rem;
}

.resume-text {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 640px;
}

.resume-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 640px;
}

.skill-tag {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text);
  border: 1px solid var(--divider);
  border-radius: 3px;
  padding: 0.25rem 0.625rem;
}

.resume-role {
  padding: 1.75rem 0;
  border-top: 1px solid var(--divider);
  max-width: 640px;
}

.resume-role:first-of-type {
  border-top: none;
  padding-top: 0;
}

.resume-role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.resume-role-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--text);
}

.resume-role-dates {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.resume-role-org {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.resume-role-desc {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
}

/* ── Projects page ── */

.projects-page {
  padding-top: 4rem;
}

.projects-page p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .timeline::before {
    left: 0;
    transform: none;
  }

  .timeline-entry {
    display: block;
    padding-left: 1.75rem;
    margin-bottom: 2.5rem;
  }

  .timeline-entry::before {
    left: -3px;
    top: 0.4rem;
    transform: none;
  }

  .tl-photo {
    margin-top: 1rem;
    max-width: 280px;
  }

  .tl-photos-stack {
    margin-top: 1rem;
    max-width: 280px;
  }
}

@media (max-width: 540px) {
  .hero {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-photo {
    width: 100px;
    height: 125px;
  }

  .edu-header,
  .resume-role-header {
    flex-direction: column;
    gap: 0.15rem;
  }
}
