:root {
  --bg: #f7f3ea;
  --bg-deep: #efe8d8;
  --surface: #fffdf8;
  --text: #1a2a21;
  --muted: #5a6a60;
  --border: #ddd4c0;
  --green: #0b3a24;
  --green-soft: #1d5a3c;
  --red: #a30d16;
  --red-hover: #870a12;
  --on-accent: #fffdf8;
  --disc: #fffdf8;
  --ring: rgba(255, 253, 248, 0.55);
  --glow: rgba(163, 13, 22, 0.08);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1813;
    --bg-deep: #0a120e;
    --surface: #142019;
    --text: #ece6d8;
    --muted: #a3aea6;
    --border: #24352b;
    --green: #8fc4a5;
    --green-soft: #6fae8a;
    --red: #d9434c;
    --red-hover: #e85c64;
    --on-accent: #0e1813;
    --disc: #f7f3ea;
    --ring: rgba(247, 243, 234, 0.07);
    --glow: rgba(217, 67, 76, 0.12);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-hover); }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  color: var(--green);
  text-decoration: none;
}

nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; }

nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

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

nav .nav-patreon { color: var(--red); }

/* Hero */

.hero {
  position: relative;
  padding: 120px 0 128px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, var(--glow), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  overflow: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.005em;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 12px;
  animation: rise 0.9s ease-out both;
}

.tagline {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 32px;
  animation: rise 0.9s 0.1s ease-out both;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: rise 0.9s 0.2s ease-out both;
}

.button {
  display: inline-block;
  background: var(--red);
  color: var(--on-accent);
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.15s, color 0.15s;
}

.button:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: var(--on-accent);
  transform: translateY(-1px);
}

.button.ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--border);
}

.button.ghost:hover {
  background: var(--surface);
  color: var(--green);
  border-color: var(--green-soft);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Sections */

section { padding: 72px 0; }

section + section { border-top: 1px solid var(--border); }

.eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

h2 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 28px;
}

.lead {
  font-size: 1.15rem;
  max-width: 60ch;
  margin: 0;
}

/* Projects */

.projects {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

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

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--green), var(--red));
}

.card:hover {
  border-color: var(--green-soft);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -24px rgba(11, 58, 36, 0.45);
}

.card.project {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 28px;
  padding: 28px;
}

.logo-disc {
  width: 100%;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 50%;
  background: var(--disc);
  box-shadow:
    0 0 0 1px var(--border),
    0 0 0 8px var(--ring),
    0 18px 40px -18px rgba(11, 58, 36, 0.4);
}

.logo-disc img {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 560px) {
  .card.project {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 20px;
  }
  .logo-disc { width: 150px; }
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.card h3 { margin: 0; font-size: 1.7rem; line-height: 1.2; }

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-soft);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 10px;
}

.card p { margin: 0 0 16px; color: var(--muted); }

.card-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

/* Contact */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.contact-list span {
  min-width: 72px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a { overflow-wrap: anywhere; }

/* Footer */

footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 28px 0;
}

footer p { margin: 0; }
