/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", "Times New Roman", Times, serif;
  --color-primary: #000;
  --color-secondary: rgba(0, 0, 0, 0.8);
  --color-muted: rgba(0, 0, 0, 0.7);
  --color-subtle: rgba(0, 0, 0, 0.5);
  --color-faint: rgba(0, 0, 0, 0.4);
  --color-border: rgba(0, 0, 0, 0.1);
  --color-underline: rgba(0, 0, 0, 0.2);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-primary);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility - Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Navigation */
.nav {
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

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

.site-title {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--color-subtle);
  text-decoration: none;
  transition: color 0.2s;
}

.site-title:hover {
  color: var(--color-secondary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--color-subtle);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-link.active {
  color: var(--color-primary);
}

/* Page Container */
.page-container {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

/* Hero Section - Home */
.hero-section {
  margin-bottom: 4rem;
}

/* Mobile Hero */
.hero-mobile {
  display: block;
}

.hero-lead,
.hero-text {
  font-weight: normal;
}

.hero-lead {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-primary);
}

/* Desktop Hero */
.hero-desktop {
  display: none;
}

.hero-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-primary);
}

.grounding-text {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--color-subtle);
  margin-top: 1.5rem;
}

.focus-text {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--color-faint);
  margin-top: 1.5rem;
}

/* Links Section */
.links-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-subtle);
  text-decoration: underline;
  text-decoration-color: var(--color-underline);
  text-underline-offset: 2px;
  transition: all 0.2s;
}

.external-link:hover {
  color: var(--color-secondary);
  text-decoration-color: var(--color-subtle);
}

/* Shared focus styles */
.site-title:focus-visible,
.nav-link:focus-visible,
.external-link:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 4px;
}

.external-icon {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.5;
}

/* About Page Styles */
.page-title {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 3rem;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.bio-section,
.section-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--color-muted);
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.contact-note {
  font-size: 0.875rem;
  color: var(--color-subtle);
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  margin-top: 6rem;
}

.footer-container {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-subtle);
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
  .nav-container {
    padding: 2rem 2rem;
  }

  .site-title {
    font-size: 1rem;
  }

  .nav-links {
    gap: 2rem;
  }

  .nav-link {
    font-size: 1rem;
  }

  .page-container {
    padding: 5rem 2rem;
  }

  .hero-section {
    margin-bottom: 6rem;
  }

  /* Hide mobile hero on desktop */
  .hero-mobile {
    display: none;
  }

  /* Show desktop hero */
  .hero-desktop {
    display: block;
  }

  .hero-text {
    font-size: 1.5rem;
  }

  .grounding-text,
  .focus-text {
    font-size: 1rem;
    margin-top: 2rem;
  }

  .links-section {
    gap: 1.5rem;
    font-size: 1rem;
  }

  .page-title {
    font-size: 3rem;
    margin-bottom: 4rem;
  }

  .about-content {
    gap: 4rem;
  }

  .bio-section,
  .section-content {
    font-size: 1.125rem;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .contact-note {
    font-size: 1rem;
  }

  .footer {
    margin-top: 8rem;
  }

  .footer-container {
    padding: 3rem 2rem;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
