:root {
  --bg-primary: oklch(0.42 0.28 267);
  --bg-secondary: oklch(0.48 0.24 267);
  --color-white: #ffffff;
  --color-cream: oklch(0.97 0.015 95);
  --color-ink: oklch(0.2 0.03 265);
  --color-ink-muted: oklch(0.2 0.03 265 / 70%);
  --color-ink-border: oklch(0.2 0.03 265 / 12%);
  --color-accent: oklch(0.72 0.17 55);
  --color-border: oklch(1 0 0 / 18%);
  --font-family: "Archivo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--color-white);
  font-family: var(--font-family);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header & Nav */
.header {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem 0;
  position: sticky;
  top: 1rem;
  z-index: 50;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: oklch(0.48 0.24 267 / 70%);
  border: 1px solid var(--color-border);
  padding: 0.5rem;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.nav-brand {
  display: flex;
  align-items: center;
  padding: 0 0.75rem 0 0.5rem;
  text-decoration: none;
}

.nav-logo {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 9999px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link:hover {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: var(--bg-secondary);
  color: var(--color-white);
}

.nav-btn {
  margin-left: 0.25rem;
  background-color: var(--color-white);
  color: var(--bg-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-block;
}

.nav-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Main Container */
main {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 5rem 1.5rem 1rem;
  text-align: center;
}

.hero-title {
  max-width: 56rem;
  margin: 0 auto;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 42rem;
  margin: 1.5rem auto 0;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.hero-image-wrapper {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 100%;
  max-width: 56rem;
  height: auto;
  display: block;
}

/* Rounded Content Sections (Portfolio, Thesis) */
.section-cream {
  background-color: var(--color-cream);
  color: var(--color-ink);
  border-top-left-radius: 3rem;
  border-top-right-radius: 3rem;
  padding: 5rem 1.5rem;
}

.section-container {
  max-width: 72rem;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.section-subtitle {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--color-ink-muted);
  max-width: 44rem;
  line-height: 1.6;
}

/* Portfolio Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
  list-style: none;
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid var(--color-ink-border);
  background-color: transparent;
  padding: 1.5rem;
  border-radius: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(21, 24, 40, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.card-tag {
  display: inline-block;
  background-color: rgba(21, 24, 40, 0.06);
  color: rgba(21, 24, 40, 0.65);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-name {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.card-name a {
  color: inherit;
  text-decoration: none;
}

.card-blurb {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
}

.card-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--color-ink);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-link span {
  display: inline-block;
  margin-left: 0.2rem;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-link:hover,
.card-name a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.card-link:hover {
  color: #2563eb;
  text-decoration: none;
}

.card-link:hover span {
  transform: translateX(0.7rem) scaleX(1.6);
}

.projects-empty {
  color: var(--color-ink-muted);
  list-style: none;
}

/* Individual project pages */
.project-page {
  background-color: var(--color-cream);
  background-image:
    radial-gradient(circle at 12% 9%, oklch(0.79 0.1 250 / 34%) 0, transparent 24rem),
    radial-gradient(circle at 88% 26%, oklch(0.84 0.13 200 / 24%) 0, transparent 22rem),
    radial-gradient(oklch(0.35 0.09 258 / 13%) 0.8px, transparent 0.8px);
  background-size: auto, auto, 18px 18px;
  background-attachment: fixed;
  color: var(--color-ink);
}

.project-page .header {
  position: static;
}

.project-page .nav-pill {
  background: var(--bg-primary);
}

.project-article {
  max-width: 60rem;
  margin: 3rem auto 6rem;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 7vw, 6rem) clamp(5rem, 10vw, 8rem);
  border: 1px solid oklch(1 0 0 / 58%);
  border-radius: 2rem;
  background: oklch(0.98 0.01 95 / 74%);
  box-shadow: 0 24px 70px oklch(0.25 0.08 260 / 12%);
  backdrop-filter: blur(8px);
}

.project-kicker {
  color: var(--color-ink-muted);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-title {
  margin-top: 0.75rem;
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.project-summary {
  margin-top: 1.5rem;
  color: var(--color-ink-muted);
  font-size: 1.25rem;
  line-height: 1.6;
}

.project-content {
  margin-top: 4rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.project-content > * + * { margin-top: 1.5rem; }
.project-content h2 { font-size: 1.8rem; line-height: 1.15; letter-spacing: -0.03em; }
.project-content h3 { font-size: 1.35rem; line-height: 1.2; }
.project-content ul, .project-content ol { padding-left: 1.25rem; }
.project-content a { color: inherit; text-underline-offset: 0.2em; }
.project-content img { display: block; width: 100%; height: auto; border-radius: 1rem; }

.portfolio-action {
  margin-top: 3rem;
}

.btn-ink {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-ink);
  color: var(--color-cream);
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-ink:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Quotes */
.quote-section {
  max-width: 48rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}

.quote-text {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.quote-author {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.quote-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--color-accent);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
}

.quote-meta {
  text-align: left;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

.quote-meta strong {
  display: block;
  color: var(--color-white);
  font-weight: 700;
}

/* Thesis / Method Grid */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 1024px) {
  .thesis-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.thesis-item {
  border-top: 2px solid rgba(21, 24, 40, 0.15);
  padding-top: 1.25rem;
}

.thesis-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.thesis-body {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-ink-muted);
}

/* Team & Referral Section */
.referral-section {
  padding: 4rem 1.5rem 7rem;
  text-align: center;
  max-width: 72rem;
  margin: 0 auto;
}

.referral-title {
  max-width: 46rem;
  margin: 0 auto;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.referral-body {
  max-width: 38rem;
  margin: 1rem auto 0;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
  text-align: left;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: oklch(0.48 0.24 267 / 50%);
  border: 1px solid var(--color-border);
  padding: 1.25rem;
  border-radius: 1.25rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
}

.team-avatar {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  border-radius: 9999px;
  background-color: var(--color-accent);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.team-info {
  overflow: hidden;
}

.team-name {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--color-white);
}

.team-grade {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.125rem;
}

.team-email {
  display: inline-block;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 0.25rem;
  transition: color 0.15s ease;
}

.team-email:hover {
  color: var(--color-white);
}

.btn-primary {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  background-color: var(--color-white);
  color: var(--bg-primary);
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-logo {
  height: 30px;
  width: auto;
  margin: 0 auto 0.75rem;
  display: block;
}

.footer-text {
  margin-top: 0.25rem;
}
