:root {
  --bg: #f3efe7; /* oatmeal */
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --text: #1f1d1a;
  --muted: #5f5a52;
  --accent: #0b6b55; /* deep green */
  --accent2: #b88b1d; /* warm gold */
  --border: rgba(31, 29, 26, 0.12);
  --shadow: rgba(31, 29, 26, 0.12);
  --shadow-strong: rgba(31, 29, 26, 0.18);
  --radius: 18px;
  --max: 980px;
  --focus: rgba(11, 107, 85, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 15% 0%, #fff8ec 0%, var(--bg) 55%);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.95em;
  color: var(--accent);
}

.link-button,
button {
  font: inherit;
}

.link-button:focus,
button:focus {
  outline: none;
}

.link-button:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 12px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  z-index: 50;
}
.skip-link:focus {
  left: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(243, 239, 231, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 14px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px var(--shadow);
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.name {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.2;
}
.tagline {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.top-nav a,
.top-nav .link-button {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}
.top-nav a:hover,
.top-nav .link-button:hover {
  background: rgba(255, 255, 255, 0.8);
}
.link-button {
  appearance: none;
  cursor: pointer;
}

.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 14px 110px;
}

.panel {
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  border: 1px solid var(--border);
  box-shadow: 0 18px 44px var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
}
.panel.intro {
  background: linear-gradient(180deg, rgba(11, 107, 85, 0.14), var(--panel));
}

h2 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
}

p {
  margin: 10px 0;
}

.note {
  color: var(--muted);
  font-size: 0.95rem;
}

.bullets {
  margin: 10px 0 0 18px;
  color: var(--muted);
}

.split {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 6px);
  padding: 14px;
  box-shadow: 0 10px 26px var(--shadow);
}

.chips {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 14px;
  color: var(--muted);
}

.noscript {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 14px 20px;
  color: var(--muted);
}

/* Gallery */
.gallery {
  margin-top: 12px;
}
.gallery-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(0, 0, 0, 0.06));
  border: 1px solid var(--border);
  min-height: 180px;
}
.gallery-frame.is-empty {
  display: grid;
  place-items: center;
  padding: 18px;
}
.gallery-frame.is-empty .gallery-image {
  display: none;
}
.gallery-frame.is-empty .gallery-status {
  position: static;
  margin: 0;
  max-width: 34ch;
  text-align: center;
}
.gallery-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: cover;
}
.gallery-image.is-spiral {
  animation: gallerySpiralIn 560ms cubic-bezier(0.18, 0.9, 0.25, 1) both;
  will-change: transform, opacity;
}
@keyframes gallerySpiralIn {
  0% {
    opacity: 0;
    transform: scale(1.14) rotate(-18deg) translate(42px, 18px);
  }
  70% {
    opacity: 1;
    transform: scale(1.02) rotate(6deg) translate(-8px, -4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg) translate(0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-image.is-spiral {
    animation: none;
  }
}
.gallery-status {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
}
.gallery-status:empty {
  display: none;
}
.gallery-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.gallery-controls button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  cursor: pointer;
}
.gallery-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.gallery-controls button:hover {
  background: rgba(255, 255, 255, 0.85);
}

/* Wheel navigation */
.wheel-trigger {
  --trigger-x: -50%;
  --trigger-y: -50%;
  position: fixed;
  left: 50%;
  top: 50%;
  bottom: auto;
  opacity: 0;
  pointer-events: none;
  transform: translate(var(--trigger-x), var(--trigger-y)) scale(0.94);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  box-shadow: 0 22px 55px var(--shadow-strong);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  z-index: 12;
  transition: opacity 160ms ease, transform 160ms ease,
    background-color 160ms ease;
}
.wheel-trigger.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(var(--trigger-x), var(--trigger-y)) scale(1);
}
.wheel-trigger.is-scrolling {
  pointer-events: none;
  opacity: 0.75;
}
.wheel-trigger:active {
  transform: translate(var(--trigger-x), var(--trigger-y)) scale(0.98);
}
.wheel-trigger:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.wheel-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(31, 29, 26, 0.45);
  z-index: 20;
}
.wheel-overlay.is-open {
  display: flex;
}

.wheel {
  position: relative;
  width: min(82vw, 360px);
  height: min(82vw, 360px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.65));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 80px rgba(31, 29, 26, 0.35);
}

.wheel-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110px;
  height: 110px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 8px;
  user-select: none;
  cursor: grab;
}
.wheel-center:active {
  cursor: grabbing;
}

.wheel-items {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
}
.wheel-items li {
  position: absolute;
  inset: 0;
}
.wheel-items button {
  --count: 7;
  --radius: 128px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%)
    rotate(calc((var(--i) * (360deg / var(--count))) - 90deg))
    translate(var(--radius))
    rotate(calc((var(--i) * (-360deg / var(--count))) + 90deg));
  width: 92px;
  padding: 10px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.8);
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
  transition: background-color 120ms ease, border-color 120ms ease,
    box-shadow 120ms ease, color 120ms ease;
}
.wheel-items button.is-selected {
  border-color: rgba(11, 107, 85, 0.95);
  box-shadow: 0 0 0 4px rgba(11, 107, 85, 0.22),
    0 12px 24px rgba(31, 29, 26, 0.18);
  background-color: rgba(11, 107, 85, 0.2);
  color: var(--accent);
  font-weight: 600;
}

.wheel-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
}

/* Timeline */
.timeline {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 10px;
  border-radius: calc(var(--radius) - 8px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
}
.timeline-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--accent2);
  box-shadow: 0 0 0 3px rgba(184, 139, 29, 0.18);
}

/* CTAs */
.cta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}
.primary,
.secondary {
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
}
.primary {
  background: rgba(11, 107, 85, 0.12);
}
.primary:hover {
  background: rgba(11, 107, 85, 0.18);
}
.secondary {
  background: rgba(255, 255, 255, 0.75);
}
.secondary:hover {
  background: rgba(255, 255, 255, 0.9);
}

@media (min-width: 720px) {
  .header-inner {
    padding: 18px 18px;
  }
  .avatar {
    width: 80px;
    height: 80px;
  }
  .name {
    font-size: 1.7rem;
  }
  .content {
    padding-bottom: 130px;
  }
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .cta-row {
    grid-template-columns: 1fr 1fr;
  }
  .wheel-items button {
    --radius: 140px;
  }
}
