:root {
  --bg: #f5f4f2;
  --bg-elevated: #ffffff;
  --bg-soft: #f0eeea;
  --text: #111111;
  --text-soft: #4c4b48;
  --border-subtle: #dfddd8;
  --accent: #c29a52;
  --accent-soft: rgba(194, 154, 82, 0.15);
  --accent-strong: #a58138;
  --shadow-soft: 0 18px 45px rgba(15, 16, 20, 0.06);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease-out;
}

body[data-theme="dark"] {
  --bg: #050509;
  --bg-elevated: #101018;
  --bg-soft: #151521;
  --text: #f7f7f9;
  --text-soft: #a3a4b4;
  --border-subtle: #272838;
  --shadow-soft: 0 22px 55px rgba(0, 0, 0, 0.8);
}

/* Base */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0, #f4f3f0 32%, var(--bg) 70%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body[data-theme="dark"] {
  background: radial-gradient(circle at top left, #161623 0, #050509 55%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(22px);
  background: linear-gradient(to bottom, rgba(245, 244, 242, 0.97), rgba(245, 244, 242, 0.9), transparent);
  border-bottom: 1px solid rgba(223, 221, 216, 0.7);
}

body[data-theme="dark"] .site-header {
  background: linear-gradient(to bottom, rgba(5, 5, 9, 0.98), rgba(5, 5, 9, 0.95), transparent);
  border-bottom-color: rgba(50, 50, 80, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;          /* NEW: space between items */
  padding: 12px 0;
}


.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.logo-mark {
  width: 30px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 0 50%, var(--accent) 0, transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.nav-link {
  position: relative;
  padding: 6px 0;
  color: var(--text-soft);
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transition: width var(--transition-med);
}

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

.nav-link-active::after {
  width: 60%;
}

/* Nav toggle (mobile) */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

body[data-theme="dark"] .nav-toggle {
  background: rgba(16, 16, 24, 0.95);
}

.nav-toggle span {
  width: 14px;
  height: 1.6px;
  border-radius: 999px;
  background: var(--text);
}

/* Nav overlay */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-med), visibility var(--transition-med);
  z-index: 35;
}

.nav-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Theme toggle */

.theme-toggle {
  margin-left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

body[data-theme="dark"] .theme-toggle {
  background: rgba(16, 16, 24, 0.95);
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

/* Header resume pill */
.header-resume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.05);
  transition: background var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast);
  white-space: nowrap;
}

body[data-theme="dark"] .header-resume {
  background: rgba(16, 16, 24, 0.95);
}

.header-resume:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}


/* Scroll progress */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 50;
  pointer-events: none;
}

.scroll-progress-bar {
  width: 100%;
  height: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

/* Hero */

.hero {
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 48px;
  align-items: flex-start;
}

.hero-text h1 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 44px);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.hero-subtitle {
  max-width: 36rem;
  font-size: 15px;
  color: var(--text-soft);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.highlight {
  font-weight: 600;
  color: var(--accent-strong);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-med), color var(--transition-med), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .btn.ghost {
  background: rgba(16, 16, 24, 0.95);
}

.btn.ghost:hover {
  background: var(--bg-soft);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 12px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.meta-value {
  font-weight: 500;
}

/* Hero card */

.hero-card {
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  transform-origin: center;
  transition: transform 260ms ease-out, box-shadow 260ms ease-out;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(15, 16, 20, 0.15);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hero-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid transparent;
}

.badge-available {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
}

.badge-outline {
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

body[data-theme="dark"] .badge-outline {
  background: rgba(16, 16, 24, 0.95);
}

.hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.stat-label {
  color: var(--text-soft);
}

.stat-value {
  font-weight: 500;
  text-align: right;
}

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

/* Sections */

.section {
  padding: 40px 0;
}

.section-header {
  margin-bottom: 24px;
}

.section-header-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin: 0 0 4px;
}

.section h2 {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 26px;
  margin: 0;
}

/* Now section */

.section-now {
  padding-top: 12px;
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.now-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.now-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.now-list li + li {
  margin-top: 4px;
}

/* Snapshot grid */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.card {
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
  transition: transform 220ms ease-out, box-shadow 220ms ease-out, border-color 220ms ease-out;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(15, 16, 20, 0.12);
}

.snapshot-card h3 {
  margin: 4px 0 8px;
  font-size: 18px;
}

.card-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.stat-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
  font-size: 13px;
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
}

.stat-list li span:first-child {
  color: var(--text-soft);
}

.pill-cta {
  border-radius: 999px;
  border: none;
  padding: 7px 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.pill-cta::after {
  content: "→";
  font-size: 11px;
}

.pill-cta:hover {
  background: rgba(194, 154, 82, 0.15);
  transform: translateY(-1px);
}

/* Skills */

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.skill-chip {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  background: var(--bg-soft);
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.skill-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Timeline */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.pill {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  border: 1px solid transparent;
}

.pill.muted {
  background: var(--bg-soft);
  color: var(--text-soft);
}

.pill.subtle {
  border-color: var(--border-subtle);
}

.timeline-item h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.timeline-location {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.timeline-points {
  margin: 0 0 10px 0;
  padding-left: 18px;
  font-size: 13px;
}

.timeline-points li + li {
  margin-top: 4px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  font-size: 11px;
  background: var(--bg-soft);
}

/* Projects */

.project-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.project-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

body[data-theme="dark"] .chip {
  background: rgba(16, 16, 24, 0.95);
}

.chip-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.chip:hover {
  transform: translateY(-1px);
}

.project-search-wrapper {
  position: relative;
}

.project-search {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  font-size: 12px;
  background: var(--bg-elevated);
  min-width: 180px;
}

.project-card .project-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.project-summary {
  font-size: 13px;
  color: var(--text-soft);
  margin: 6px 0 10px;
}

.project-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  font-size: 12px;
}

.project-meta li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 0;
}

.project-meta li span:first-child {
  color: var(--text-soft);
}

.project-links a {
  font-size: 12px;
  font-weight: 500;
}

/* Education & extracurriculars */

.section-split {
  padding-top: 20px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 32px;
}

.edu-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.edu-degree {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.edu-meta {
  margin: 4px 0 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.edu-points {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.edu-points li + li {
  margin-top: 4px;
}

/* Contact */

.section-contact {
  padding-bottom: 64px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
}

.contact-text {
  margin: 8px 0 18px;
  font-size: 14px;
  color: var(--text-soft);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: var(--bg-soft);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.contact-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  color: var(--text-soft);
}

.contact-value {
  font-weight: 500;
}

.contact-form {
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.field span {
  font-weight: 500;
}

input,
textarea {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-soft);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(194, 154, 82, 0.4);
  background: #fff;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 14px 0 18px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--text-soft);
}

.footer-note {
  opacity: 0.9;
}

/* Back to top */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

body[data-theme="dark"] .back-to-top {
  background: rgba(16, 16, 24, 0.98);
}

.back-to-top.show {
  display: flex;
}

/* Reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 450ms ease-out, transform 450ms ease-out;
}

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

/* Responsive */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .split-grid,
  .contact-grid,
  .now-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .section-header-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    inset: 52px 16px auto;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 8px 10px;
    gap: 6px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition-med), transform var(--transition-med), visibility var(--transition-med);
  }

  .site-nav.nav-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .theme-toggle {
    margin-left: 8px;
  }

  .header-inner {
    padding: 10px 0;
  }

  .hero {
    padding-top: 56px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .project-search {
    width: 100%;
  }

  .timeline-item::before {
    display: none;
  }
    .header-resume {
    display: none;
  }
}

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

  .hero-text h1 {
    font-size: 30px;
  }

  .hero-meta {
    flex-direction: column;
    gap: 10px;
  }
}
/* Extra spacing between stacked extracurricular cards */
.split-column .edu-card + .edu-card {
  margin-top: 18px;   /* bump this up/down to taste */
}
