/* ── Reset & Base ───────────────────────────────────── */

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

/* ── Theme Variables ───────────────────────────────── */

:root {
  --bg: #FAFAFA;
  --text: #1A1A1A;
  --text-secondary: #555;
  --accent: #2D5A27;
  --border: #E0E0E0;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg: #1A1A1A;
  --text: #FAFAFA;
  --text-secondary: #AAA;
  --accent: #6BBF59;
  --border: #333;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1A1A;
    --text: #FAFAFA;
    --text-secondary: #AAA;
    --accent: #6BBF59;
    --border: #333;
  }
}

/* ── Typography ────────────────────────────────────── */

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero ──────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-content {
  text-align: center;
  max-width: 700px;
}

.hero-headshot {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 3px solid var(--border);
  transition: border-color var(--transition);
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
}

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

.hero-link:hover {
  color: var(--accent);
  transform: scale(1.15);
}

/* ── About ─────────────────────────────────────────── */

.about {
  padding: 4rem 2rem 6rem;
  display: flex;
  justify-content: center;
}

.about-content {
  max-width: 650px;
}

.about-content p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Footer ────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  transition: border-color var(--transition);
}

.footer-content {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.footer-link {
  display: inline-flex;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Theme Toggle ──────────────────────────────────── */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

/* Show/hide sun and moon icons based on theme */
.icon-moon { display: none; }
.icon-sun  { display: block; }

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: block; }
  :root:not([data-theme="light"]) .icon-sun  { display: none; }
}

/* ── Animations ────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reduced Motion ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .scroll-reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .hero-link,
  .theme-toggle {
    transition: none;
  }
}
