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

:root {
  --bg: #F5F2EC;
  --text: #1A1A1A;
  --accent: #2C4A2E;
  --muted: #8A8478;
  --border: #D6D0C6;
  --white: #FFFFFF;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.2;
}

/* ===== Layout ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 7rem 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1.25rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo-svg {
  width: 28px;
  height: auto;
  flex-shrink: 0;
}

.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

/* ===== Hero (Home page) ===== */
.hero {
  padding: 12rem 0 10rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 1s ease forwards;
}

.fade-in-delay {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 1s ease 0.3s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  padding: 5rem 0 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--text);
}

/* ===== About ===== */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}

.headshot-wrap {
  width: 100%;
}

.headshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text);
}

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

.about-text p:last-child {
  margin-bottom: 0;
}

/* ===== Analyst Program ===== */
.analyst-content {
  max-width: 680px;
}

.analyst-lead {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.analyst-content p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1rem;
}

.analyst-content p:last-child {
  margin-bottom: 0;
}

.analyst-contact-note {
  color: var(--muted) !important;
  font-size: 0.95rem !important;
}

.analyst-contact-note a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.analyst-contact-note a:hover {
  border-color: var(--accent);
}

.attribution {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* ===== Portfolio ===== */
.portfolio-chart-wrap {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.portfolio-chart-wrap canvas {
  max-width: 100%;
}

.portfolio-disclaimer {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ===== Scholarship ===== */
.scholarship-intro {
  max-width: 680px;
  margin-bottom: 3rem;
}

.scholarship-intro p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1rem;
}

.scholarship-form {
  max-width: 560px;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8478' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field input[type="file"] {
  padding: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}

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

.form-field textarea {
  resize: vertical;
  min-height: 160px;
}

.form-field .field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
  font-style: italic;
}

.submit-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.875rem 2.5rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.85;
}

/* ===== Contact ===== */
.contact-body p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1rem;
}

.contact-email {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
  margin-bottom: 2rem;
}

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

.location {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

.disclaimer {
  font-style: italic;
  max-width: 640px;
  margin: 0.75rem auto 0;
}

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

  .nav-links {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 1.25rem;
    width: 100%;
    order: 3;
  }

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

  section {
    padding: 5rem 0;
  }

  .hero {
    padding: 8rem 0 6rem;
  }

  .page-header {
    padding: 3rem 0 2rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .headshot-wrap {
    max-width: 260px;
    margin: 0 auto;
    order: -1;
  }

  .about-text {
    text-align: center;
  }

  .analyst-content {
    text-align: center;
    margin: 0 auto;
  }

  .scholarship-intro {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .header-inner {
    padding: 1rem 1.25rem;
  }

  .wordmark {
    font-size: 1.05rem;
  }

  .hero {
    padding: 6rem 0 4rem;
  }

  .contact-email {
    font-size: 1.3rem;
  }
}
