/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #001a35;
  --color-surface: #ffffff;
  --color-text: #1a2a3a;
  --color-text-light: #4a6070;
  --color-accent: #9aa8b5;
  --color-accent-hover: #7d8d9c;
  --color-border: #c8d4de;
  --color-navy: #001a35;
  --color-navy-light: #0d2e50;
  --font-heading: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --max-width: 960px;
  --header-height: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

/* ===== Header & Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #faf6f0;
  border-bottom: 1px solid #e0d8cc;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}

.site-logo:hover {
  color: #444;
}

.site-nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  color: #555;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

.nav-link.active {
  background: var(--color-navy);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ===== Main Content ===== */
.content {
  flex: 1;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Hero (Home) ===== */
.hero {
  max-width: 100%;
  margin: 0;
  padding: 80px 24px 40px;
  text-align: center;
  background: var(--color-navy);
  color: #ffffff;
  position: relative;
  overflow: visible;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero h1.handwriting {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4.2rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.04em;
}

.hw-word {
  display: inline-block;
  margin-right: 0.3em;
}

.hw-word span {
  display: inline-block;
  opacity: 0;
  animation: writeLetter 0.3s ease forwards;
}

@keyframes writeLetter {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--color-accent);
  margin-bottom: 28px;
}

.hero p:not(.tagline) {
  max-width: 580px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Typewriter Image ===== */
.typewriter-img {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  line-height: 0;
  z-index: 0;
  margin-top: -60px;
}

.typewriter-img img {
  width: 70%;
  max-width: 700px;
  height: auto;
  display: block;
  opacity: 0.15;
  filter: invert(1) brightness(2.5);
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 1;
}

/* ===== Marketing Box ===== */
.marketing-box {
  max-width: 620px;
  margin: -20px auto 60px;
  padding: 36px 40px;
  background: #faf6f0;
  border-radius: 12px;
  text-align: center;
}

.marketing-box h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.marketing-box p {
  font-size: 1rem;
  color: #4a4a4a;
  margin-bottom: 20px;
  line-height: 1.7;
}

/* ===== Button ===== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 32px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-small {
  font-size: 0.85rem;
  padding: 8px 20px;
  margin-top: 8px;
}

/* ===== Page Content ===== */
.page-content {
  max-width: var(--max-width);
  margin: 40px auto 60px;
  padding: 48px 40px;
  background: #faf6f0;
  border-radius: 12px;
}

.page-content h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  margin-bottom: 28px;
  color: var(--color-navy);
}

.page-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--color-navy);
}

.page-content p {
  margin-bottom: 18px;
  color: var(--color-text-light);
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== About - Two Column ===== */
.two-col {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.author-photo {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* ===== Resume List ===== */
.resume-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 8px;
}

.resume-item {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid #e0d8cc;
  border-radius: 10px;
}

.resume-date {
  flex-shrink: 0;
  width: 160px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
}

.resume-detail h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 2px;
  color: var(--color-text);
}

.resume-detail p {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--color-text-light);
}

.resume-detail p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .resume-item {
    flex-direction: column;
    gap: 4px;
  }

  .resume-date {
    width: auto;
  }
}

/* ===== Publications ===== */
.publication-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.publication-card {
  display: flex;
  gap: 28px;
  align-items: start;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e0d8cc;
  border-radius: 12px;
}

.book-cover-placeholder {
  flex-shrink: 0;
  width: 120px;
  height: 170px;
  background: var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.book-cover {
  flex-shrink: 0;
  width: 120px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.publication-info h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.pub-meta {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin-bottom: 10px !important;
}

/* ===== Presentations / Events ===== */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.event-card {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  background: #ffffff;
  border: 1px solid #e0d8cc;
  border-radius: 10px;
}

.event-card.past {
  opacity: 1;
}

.event-date {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
}

.event-date .month {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.event-date .day {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
}

.event-info h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.event-info p {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0;
}

.event-info a {
  color: var(--color-text);
  text-decoration: underline;
}

.event-info a:hover {
  color: var(--color-text);
}

.cta-text {
  margin-top: 16px;
}

/* ===== Contact Form ===== */
.contact-form {
  max-width: 560px;
  margin-top: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid #e0d8cc;
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-text);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: #555;
  background: #faf6f0;
  border-top: 1px solid #e0d8cc;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #faf6f0;
    flex-direction: column;
    padding: 12px 24px 20px;
    border-bottom: 1px solid #e0d8cc;
    gap: 4px;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 10px 14px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

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

  .author-photo-placeholder {
    max-width: 220px;
  }

  .publication-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .page-content h1 {
    font-size: 1.9rem;
  }
}
