/* Easy-edit tokens for the hobbyist template. */
:root {
  --page-bg: #fcf7ef;
  --surface: rgb(255, 255, 255, 0.82);
  --surface-strong: rgb(255, 255, 255, 0.92);
  --ink: #241b17;
  --muted: #6f6159;
  --brand: #9a5c28;
  --brand-deep: #653916;
  --accent: #ead8b9;
  --border: rgb(36, 27, 23, 0.1);
  --shadow: 0 18px 50px rgb(64, 42, 26, 0.14);
  --radius: 24px;
  --max-width: 1120px;
}

body[data-theme="dark"] {
  --page-bg: #151210;
  --surface: rgb(35, 29, 24, 0.88);
  --surface-strong: rgb(41, 34, 28, 0.94);
  --ink: #f7efe7;
  --muted: #c6b4a6;
  --brand: #d59257;
  --brand-deep: #f4cc9d;
  --accent: #4f3d2b;
  --border: rgb(255, 255, 255, 0.12);
  --shadow: 0 22px 60px rgb(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgb(234, 216, 185, 0.55), transparent 30%),
    linear-gradient(180deg, #fffaf2 0%, var(--page-bg) 100%);
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at top right, rgb(213, 146, 87, 0.12), transparent 30%),
    linear-gradient(180deg, #0f0c0a 0%, var(--page-bg) 100%);
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
}

.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 24px;
  position: relative;
}
.site-header .site-branding {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
}
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Hamburger toggle ────────────────────────────────────── */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 150ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.nav-bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: white;
  border-radius: 2px;
  transition:
    transform 200ms ease,
    opacity 200ms ease,
    width 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle[aria-expanded="true"] .nav-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.site-header-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  transition: transform 180ms ease;
}

.theme-toggle[data-theme-state="dark"] .theme-toggle-thumb {
  transform: translateX(18px);
}

.variant-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.variant-switcher-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.variant-switcher-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.variant-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.variant-pill[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 38px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgb(255, 255, 255, 0.92), rgb(249, 242, 230, 0.9));
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .hero {
  background: linear-gradient(145deg, rgb(41, 34, 28, 0.94), rgb(30, 24, 20, 0.96));
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
h1,
h2,
h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
}
h1 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1;
}
h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}
p {
  color: var(--muted);
  line-height: 1.7;
}

.button-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}
.button-primary {
  background: var(--brand);
  color: #fff;
}
.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.note-card,
.bio-card,
.project-card,
.gallery-card,
.contact-card,
.lightbox {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.note-card,
.bio-card,
.project-card,
.gallery-card,
.contact-card {
  padding: 24px;
}

.section {
  padding: 44px 0;
}
.section-header {
  max-width: 700px;
  margin-bottom: 24px;
}

.project-grid,
.gallery-grid,
.contact-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.project-card span,
.gallery-card span {
  color: var(--brand-deep);
  font-weight: 700;
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gallery-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.gallery-visual {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(154, 92, 40, 0.8), rgb(234, 216, 185, 0.85));
  margin-bottom: 16px;
}

.contact-layout {
  grid-template-columns: 0.9fr 1.1fr;
}
.contact-card ul {
  padding-left: 18px;
  color: var(--muted);
}

.site-footer {
  padding: 32px 0 50px;
  color: var(--muted);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  border-radius: 0;
  background: rgb(21, 15, 12, 0.72);
  z-index: 20;
}
.lightbox.is-open {
  display: grid;
}
.lightbox-dialog {
  width: min(720px, 100%);
  padding: 24px;
  border-radius: var(--radius);
  background: #fff9f1;
  color: var(--ink);
}

body[data-theme="dark"] .lightbox-dialog {
  background: #241d18;
}
.lightbox-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.lightbox-close {
  border: 0;
  background: var(--accent);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font: inherit;
  cursor: pointer;
}

@media (width <= 900px) {
  .hero,
  .project-grid,
  .gallery-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (width <= 640px) {
  .page-wrap {
    padding: 18px;
  }
  .site-header,
  .site-header-group {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 16px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    z-index: 100;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: 11px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
    white-space: normal;
  }
  .hero {
    padding: 28px;
  }
  .variant-switcher {
    align-items: flex-start;
  }
}
