/* ============================================
   DESIGN SYSTEM — CSS Custom Properties
   Change these to reskin the entire site
   ============================================ */
:root {
  /* Colors — Warm Editorial */
  --bg-primary: #faf8f5;
  --bg-card: #ffffff;
  --border: #e5e2dc;
  --border-hover: #d0cdc7;

  --text-primary: #1a1a2e;
  --text-secondary: #5a5a72;
  --text-muted: #8a8a9a;

  --accent-1: #4f46e5;

  --success: #10b981;
  --error: #ef4444;

  /* Typography */
  --font-family: "Outfit", sans-serif;
  --fs-hero: clamp(2.6rem, 6vw, 4.5rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.2rem);
  --fs-h3: clamp(1.05rem, 1.8vw, 1.25rem);
  --fs-body: clamp(0.95rem, 1.4vw, 1.05rem);
  --fs-small: 0.85rem;
  --fs-label: 0.75rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.1;
  --lh-normal: 1.65;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --section-padding: clamp(5rem, 12vw, 9rem) clamp(1.5rem, 5vw, 2.5rem);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

::selection {
  background: rgba(79, 70, 229, 0.15);
  color: var(--text-primary);
}

.stanford {
  color: #e84a50;
  font-weight: var(--fw-semibold);
}

/* ============================================
   LAYOUT
   ============================================ */
.section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  max-width: 1100px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.025em;
}

.hero__title em {
  font-style: normal;
  color: var(--accent-1);
}

.hero__title em.underline {
  text-decoration: underline;
  text-decoration-color: var(--accent-1);
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--accent-1);
  color: #fff;
  font-family: var(--font-family);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.hero__cta:hover {
  transform: translateY(-1px);
  opacity: 0.9;
  color: #fff;
}

.hero__cta:active {
  transform: translateY(0);
}

.hero__cta .arrow {
  transition: transform var(--transition-fast);
  display: flex;
}

.hero__cta:hover .arrow {
  transform: translateX(3px);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section__label {
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-1);
  margin-bottom: var(--space-lg);
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.section__description {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.75;
}

/* ============================================
   OPPORTUNITY SECTION — 2×2 Grid
   ============================================ */
.opportunity__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.opportunity__card {
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.opportunity__card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.opportunity__card h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
}

.opportunity__card p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.75;
}

/* ============================================
   FORM SECTION
   ============================================ */
.form-section {
  position: relative;
  z-index: 1;
}

.form-wrapper {
  margin-top: var(--space-2xl);
  padding: var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

/* Progress bar */
.form-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 2;
}

.form-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent-1);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* Animated focus indicator on form groups */
.form-group {
  position: relative;
  border-left: 2px solid transparent;
  padding-left: var(--space-sm);
  transition: border-color var(--transition-fast);
}

.form-group:focus-within {
  border-left-color: var(--accent-1);
}

/* Form section dividers */
.form-section-label {
  grid-column: 1 / -1;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  margin-top: var(--space-sm);
}

.form-section-label:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

.form-group label .required {
  color: var(--accent-1);
  margin-left: 2px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--fs-body);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: #fff;
  color: var(--text-primary);
}

.form-hint {
  font-size: var(--fs-label);
  color: var(--text-muted);
}

.field-error {
  font-size: var(--fs-label);
  color: var(--error);
  margin-top: 2px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent-1);
}

.form-submit {
  grid-column: 1 / -1;
  margin-top: var(--space-md);
}

.form-submit button {
  width: 100%;
  padding: 14px var(--space-xl);
  background: var(--accent-1);
  color: #fff;
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
  letter-spacing: 0.01em;
}

.form-submit button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.form-submit button:active {
  transform: translateY(0);
}

.form-submit button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Form messages */
.form-message {
  grid-column: 1 / -1;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  display: none;
  text-align: center;
}

.form-message.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #047857;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.form-message.error a {
  color: inherit;
  font-weight: var(--fw-semibold);
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* ============================================
   ABOUT PAGE — Editorial Profile
   ============================================ */
.about-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 800px;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.about__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-3xl);
  transition: color var(--transition-fast);
}

.about__back:hover {
  color: var(--text-primary);
}

/* Photo floated left, text wraps around and under */
.about__layout {
  overflow: hidden;
}

.about__photo {
  float: left;
  margin-right: var(--space-2xl);
  margin-bottom: var(--space-lg);
  position: relative;
}

.about__photo img {
  width: 200px;
  height: 240px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 16px 16px 16px 4px;
  display: block;
}

/* Subtle accent line under the photo */
.about__photo::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 4px;
  width: 48px;
  height: 3px;
  background: var(--accent-1);
  border-radius: 2px;
}

.about__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-xl);
}

/* Prose body */
.about__prose p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.85;
  margin-bottom: var(--space-lg);
}

.about__prose strong {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

.about__closing {
  color: var(--text-primary) !important;
  font-weight: var(--fw-medium);
  font-style: italic;
}

.about__contact {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.about__contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--fs-body);
  transition: color var(--transition-fast);
}

.about__contact-link:hover {
  color: var(--accent-1);
}

/* About page mobile */
@media (max-width: 640px) {
  .about__photo {
    float: none;
    margin-right: 0;
    margin-bottom: var(--space-xl);
  }

  .about__photo img {
    width: 160px;
    height: 200px;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  position: relative;
  z-index: 1;
}

.footer__brand {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__about-link {
  display: inline-block;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: var(--space-md);
  transition: color var(--transition-fast);
}

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

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

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

/* Stagger delay classes */
.reveal-d1 {
  transition-delay: 0.1s;
}
.reveal-d2 {
  transition-delay: 0.2s;
}
.reveal-d3 {
  transition-delay: 0.3s;
}
.reveal-d4 {
  transition-delay: 0.4s;
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  max-width: 860px;
  margin: 0 auto;
}

.divider--fade {
  background: linear-gradient(
    90deg,
    transparent,
    var(--border) 30%,
    var(--border) 70%,
    transparent
  );
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--accent-1);
  color: #fff;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-wrapper {
    padding: var(--space-lg);
  }

  .opportunity__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    min-height: auto;
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-2xl);
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}
