/* ============================================
   heuwels.dev - Site Styles
   ============================================ */

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

:root {
  /* Light mode */
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e5e5;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --accent: #2d6a4f;
  --accent-hover: #1b4332;
  --link: #2d6a4f;
  --tag-bg: #e8e8e8;
  --tag-text: #555555;
  --bg-alt: #f1f1f1;
}

.dark {
  --bg: #111111;
  --text: #e4e4e4;
  --muted: #9ca3af;
  --border: #2a2a2a;
  --card-bg: #1a1a1a;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --accent: #52b788;
  --accent-hover: #74c69d;
  --link: #52b788;
  --tag-bg: #2a2a2a;
  --tag-text: #aaaaaa;
  --bg-alt: #1a1a1a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

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

/* --- Utility --- */
.muted {
  color: var(--muted);
}

/* --- Layout --- */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Theme Toggle --- */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  z-index: 100;
  transition: background 0.2s;
  color: var(--text);
}

.theme-toggle:hover {
  background: var(--bg-alt);
}

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

.dark .theme-toggle .icon-sun { display: inline-flex; }
:root:not(.dark) .theme-toggle .icon-moon { display: inline-flex; }

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 6rem 0 4rem;
}

.hero-logo {
  margin: 0 auto 1.5rem;
  display: block;
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-kicker .pronunciation {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-subline {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-nav__sep {
  color: var(--muted);
  user-select: none;
}

.hero-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.25rem;
}

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

.github-link svg {
  vertical-align: -2px;
  fill: currentColor;
  margin-left: 2px;
}

/* --- Section Rules --- */
.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem auto;
  max-width: 860px;
  padding: 0 1.5rem;
}

/* --- Pitch --- */
.pitch {
  padding: 2rem 0;
}

.pitch-text {
  font-size: 1.1rem;
  color: var(--muted);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- Projects --- */
.projects {
  padding: 3rem 0;
}

.projects h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
  text-decoration: none;
}

.dark .project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.project-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.project-meaning {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.project-card p:not(.project-meaning) {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--tag-text);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 500;
}

/* --- Philosophy / Manifesto --- */
.manifesto {
  padding: 3rem 0;
}

.manifesto h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.manifesto blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
  font-style: italic;
}

.manifesto blockquote p {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

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

.manifesto > .container > p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.principle h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.principle p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  text-align: center;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

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

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

.footer-sep {
  color: var(--muted);
  user-select: none;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer-sign-off {
  color: var(--accent);
  font-style: italic;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero {
    padding: 4rem 0 3rem;
  }

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

  .hero-subline {
    font-size: 1.05rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
