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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Light mode (default) */
:root {
  --bg: #f4f4f0;
  --bg-subtle: #eaeae6;
  --bg-footer: #e8e8e4;
  --text: #0d0d0c;
  --text-muted: #555;
  --text-subtle: #777;
  --border: #ddd;
  --border-subtle: #e5e5e2;
  --shape: #e0e0dc;
  --btn-bg: #0d0d0c;
  --btn-text: #f4f4f0;
  --btn-hover: #1a1a18;
  --selection: rgba(13, 13, 12, 0.15);
}

/* Dark mode (system preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0c;
    --bg-subtle: #0a0a09;
    --bg-footer: #0a0a09;
    --text: #f4f4f0;
    --text-muted: #888;
    --text-subtle: #777;
    --border: #1a1a18;
    --border-subtle: #1a1a18;
    --shape: #1a1a18;
    --btn-bg: #f4f4f0;
    --btn-text: #0d0d0c;
    --btn-hover: #fff;
    --selection: rgba(244, 244, 240, 0.2);
  }
}

/* Manual override: light */
[data-theme="light"] {
  --bg: #f4f4f0;
  --bg-subtle: #eaeae6;
  --bg-footer: #e8e8e4;
  --text: #0d0d0c;
  --text-muted: #555;
  --text-subtle: #777;
  --border: #ddd;
  --border-subtle: #e5e5e2;
  --shape: #e0e0dc;
  --btn-bg: #0d0d0c;
  --btn-text: #f4f4f0;
  --btn-hover: #1a1a18;
  --selection: rgba(13, 13, 12, 0.15);
}

/* Manual override: dark */
[data-theme="dark"] {
  --bg: #0d0d0c;
  --bg-subtle: #0a0a09;
  --bg-footer: #0a0a09;
  --text: #f4f4f0;
  --text-muted: #888;
  --text-subtle: #777;
  --border: #1a1a18;
  --border-subtle: #1a1a18;
  --shape: #1a1a18;
  --btn-bg: #f4f4f0;
  --btn-text: #0d0d0c;
  --btn-hover: #fff;
  --selection: rgba(244, 244, 240, 0.2);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--selection);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 3rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text-subtle);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Logo */
.logo-mark {
  width: 32px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.9;
}

/* Navigation */
.nav {
  padding: 2.5rem 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
}

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

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-subtle);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  color: var(--text);
  background: var(--border);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-btn .icon-sun,
.theme-btn .icon-moon {
  display: none;
}

/* Show sun in dark mode (click to switch to light) */
[data-theme="dark"] .theme-btn .icon-sun,
.theme-btn .icon-sun {
  display: block;
}
[data-theme="dark"] .theme-btn .icon-moon {
  display: none;
}

/* Show moon in light mode (click to switch to dark) */
[data-theme="light"] .theme-btn .icon-sun {
  display: none;
}
[data-theme="light"] .theme-btn .icon-moon {
  display: block;
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-btn .icon-sun {
    display: none;
  }
  :root:not([data-theme]) .theme-btn .icon-moon {
    display: block;
  }
}

/* Hero */
.hero {
  padding: 5rem 0 7rem;
  position: relative;
  overflow: hidden;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  color: var(--shape);
}

.shape-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  right: -50px;
}

.shape-2 {
  width: 250px;
  height: 250px;
  bottom: -80px;
  right: 15%;
}

.shape-3 {
  width: 120px;
  height: 120px;
  top: 30%;
  right: 10%;
  transform: rotate(15deg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--text-subtle);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  max-width: 800px;
  margin-bottom: 1.75rem;
}

.hero h1 em {
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 6px;
}

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

/* About */
.about {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: baseline;
}

.about-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-subtle);
}

.about-content p {
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  max-width: 560px;
}

/* Contact */
.contact {
  padding: 10rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-subtle) 100%);
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact h2 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
}

.contact p {
  font-size: 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.4;
}

.contact-email {
  display: inline-flex;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
  padding: 1rem 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.contact-email:hover {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 3rem 0;
  background: var(--bg-footer);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  color: var(--text-subtle);
}

.footer-logo .logo-mark {
  width: 24px;
  height: 16px;
}

.footer-text {
  text-align: center;
}

.footer-text p {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.8;
}

.footer-text p:last-child {
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.footer-links a:hover {
  color: var(--text);
}

/* Legal Pages */
.legal {
  padding: 6rem 0;
}

.legal .container {
  max-width: 600px;
}

.legal h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.legal-date {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.legal h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.legal p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
  font-size: 0.9375rem;
}

.legal ul {
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
}

.legal li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.legal a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text-subtle);
  transition: border-color 0.2s ease;
}

.legal a:hover {
  border-color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
  .container {
    padding: 0 2rem;
  }

  .hero {
    padding: 5rem 0 6rem;
  }

  .hero-shapes {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-content p {
    font-size: 1.5rem;
  }

  .contact {
    padding: 6rem 0;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 1.5rem;
  }

  .nav {
    padding: 1.75rem 0;
  }

  .hero {
    padding: 4rem 0 5rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
    max-width: 100%;
  }

  .about {
    padding: 4rem 0;
  }

  .about-content p {
    font-size: 1.25rem;
  }

  .contact {
    padding: 5rem 0;
  }

  .contact p {
    font-size: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-logo {
    display: none;
  }

  .legal {
    padding: 4rem 0;
  }

  .legal h1 {
    font-size: 2rem;
  }
}
