/* ===== Variables ===== */
:root {
  --bg: #faf8f5;
  --bg-elevated: #fffefb;
  --surface: #ffffff;
  --text: #2d2a26;
  --text-muted: #6b6560;
  --accent: #c45c3e;
  --accent-soft: #e8a090;
  --accent-dim: #a84d35;
  --border: rgba(45, 42, 38, 0.08);
  --shadow: 0 2px 12px rgba(45, 42, 38, 0.06);
  --shadow-hover: 0 8px 28px rgba(45, 42, 38, 0.1);
  --font-sans: "DM Sans", system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --radius: 14px;
  --radius-lg: 20px;
  --transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}

[data-theme="dark"] {
  --bg: #0f1216;
  --bg-elevated: #181c22;
  --surface: #1e232b;
  --text: #e8e6e3;
  --text-muted: #9a9590;
  --accent: #e8a090;
  --accent-soft: #c45c3e;
  --accent-dim: #e8b8a8;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Soft gradient blob in corner for whimsy */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(232, 160, 144, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(196, 92, 62, 0.08) 0%, transparent 45%);
}

[data-theme="dark"] .noise {
  background: 
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(232, 160, 144, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(196, 92, 62, 0.06) 0%, transparent 45%);
}

/* ===== Typography ===== */
.mono {
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease-out);
}

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

/* ===== Layout ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--space-md) var(--space-lg);
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 18, 22, 0.9);
}

.nav {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--ease-out), border-color var(--ease-out), background var(--ease-out);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--bg-elevated);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-dark {
  display: none;
}

.theme-toggle .icon-light {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-dark {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-light {
  display: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

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

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

.nav-link:hover::after {
  width: 100%;
}

main {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
}

/* ===== Hero ===== */
.hero {
  margin-bottom: var(--space-2xl);
}

.hero-label {
  margin: 0 0 var(--space-sm);
  font-size: 0.875rem;
}

.hero-title {
  margin: 0 0 var(--space-sm);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-title .name {
  color: var(--accent);
}

.hero-tagline {
  margin: 0 0 var(--space-md);
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 42ch;
}

.hero-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0 0 var(--space-md);
}

.hero-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--ease-out), transform var(--transition);
}

.hero-link-icon:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-link-icon svg {
  width: 24px;
  height: 24px;
}

.hero-subtitle {
  margin: 0 0 var(--space-md);
  font-size: 1.125rem;
  color: var(--text);
}

.hero-body {
  margin: 0;
  color: var(--text-muted);
  max-width: 65ch;
}

/* ===== Sections ===== */
.section {
  margin-bottom: var(--space-2xl);
}

.section-title {
  margin: 0 0 var(--space-lg);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ===== Cards ===== */
.cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.card {
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--ease-out), border-color var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-soft);
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.card-logo {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: transparent;
}

.card-header-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
}

.card-header-fellowship {
  margin-bottom: var(--space-sm);
}

.card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.card-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}


.card-stretched-link {
  color: inherit;
  text-decoration: none;
}

.card-stretched-link:hover {
  color: var(--accent);
}

.card-inline-link {
  color: var(--accent);
  text-decoration: none;
}

.card-inline-link:hover {
  color: var(--accent-dim);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  main {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .nav {
    gap: var(--space-md);
  }

  .card {
    padding: var(--space-md);
  }

  .hero-tagline {
    font-size: 1rem;
  }
}
