:root {
  --bg: #f6f8fc;
  --bg-soft: #eef2f8;
  --surface: #ffffff;
  --text: #111827;
  --text-soft: #4b5563;
  --muted: #6b7280;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --maxw: 1080px;
}

html[data-theme="dark"] {
  --bg: #0d1320;
  --bg-soft: #131b2c;
  --surface: #1a2336;
  --text: #e6ebf4;
  --text-soft: #a6b0c3;
  --muted: #7c879c;
  --line: #263149;
  --accent: #60a5fa;
  --accent-soft: #1e3a5f;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background 0.25s ease, color 0.25s ease;
}

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

a:hover {
  text-decoration: underline;
}

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

.site-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  flex-shrink: 0;
}

.nav-area {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--accent-soft);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}

.skip-link:focus {
  left: 8px;
}

/* Hero */
.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}

.lede {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  filter: brightness(1.08);
}

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.hero-photo {
  display: flex;
  justify-content: center;
}

.hero-photo img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
  padding: 48px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.section-heading h2 {
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.section-heading p {
  max-width: 46ch;
  margin: 0;
  color: var(--text-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-links {
  display: flex;
  gap: 14px;
  font-size: 0.9rem;
}

.timeline {
  max-width: 720px;
}

.timeline-item {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 2px solid var(--line);
  margin-left: 6px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item:last-child {
  border-left-color: transparent;
}

.timeline-item h3 {
  margin: 0 0 6px;
}

.timeline-item p {
  margin: 0;
  color: var(--text-soft);
}

.note-card {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.note-card h3 {
  margin: 0 0 8px;
}

.note-card p {
  margin: 0 0 10px;
  color: var(--text-soft);
}

.note-card p:last-child {
  margin-bottom: 0;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 48px 0 24px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  max-width: 60ch;
  color: var(--text-soft);
}

/* Connect page */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-list li + li {
  border-top: 1px solid var(--line);
}

.social-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  color: var(--text);
  font-weight: 500;
}

.social-list a span[aria-hidden] {
  color: var(--muted);
}

.social-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Footer */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer-inner strong {
  display: block;
}

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

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials img {
  width: 22px;
  height: 22px;
  opacity: 0.75;
  filter: grayscale(1);
  transition: opacity 0.15s ease;
}

.socials img:hover {
  opacity: 1;
}

html[data-theme="dark"] .socials img {
  filter: grayscale(1) invert(1);
}

/* 404 */
.error-box {
  text-align: center;
  padding: 96px 24px;
}

.error-box h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin: 0;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid,
  .connect-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-toggle {
    display: block;
  }

  .nav-area {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 20px;
  }

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

  .site-nav ul {
    flex-direction: column;
    gap: 2px;
  }

  .site-nav a {
    display: block;
    padding: 12px;
  }

  .header-tools {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
  }
}