:root {
  color-scheme: dark;
  --bg: #120f1a;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3eff8;
  --muted: #a79fb5;
  --accent: #ff9a6b;
  --accent-2: #b48cff;
  --on-accent: #1c1220;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A slow, warm glow behind everything. */
.glow {
  position: fixed;
  inset: -30vmax;
  z-index: -1;
  background:
    radial-gradient(40vmax 40vmax at 25% 20%, rgba(255, 140, 90, 0.22), transparent 60%),
    radial-gradient(45vmax 45vmax at 80% 30%, rgba(160, 110, 255, 0.22), transparent 60%),
    radial-gradient(40vmax 40vmax at 50% 90%, rgba(80, 170, 255, 0.14), transparent 60%);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-4vmax, 3vmax) rotate(12deg); }
}

main, .hero, footer { width: min(760px, 100%); margin: 0 auto; padding: 0 16px; }

.hero { padding-top: max(56px, calc(env(safe-area-inset-top) + 32px)); padding-bottom: 24px; text-align: center; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 14px; letter-spacing: 0.08em; text-transform: lowercase; }
h1 {
  margin: 0;
  font-size: clamp(44px, 11vw, 76px);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { margin: 16px auto 0; max-width: 34em; color: var(--muted); font-size: 18px; }
.lede em { color: var(--text); font-style: normal; font-weight: 650; }
.hero-links { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.hero-links a {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  background: var(--surface);
}

section { padding: 32px 0; }
h2 { margin: 0 0 16px; font-size: 26px; letter-spacing: -0.01em; }
h3 { margin: 0; font-size: 19px; }
.section-lede { margin: -8px 0 20px; color: var(--muted); }

/* ---------- projects ---------- */
.projects { display: grid; gap: 14px; }
.project {
  display: flex;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.project-icon { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; }
.bot-icon {
  display: grid;
  place-items: center;
  font-size: 32px;
  background: linear-gradient(140deg, #2aabee, #1d7fc4);
}
.project-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.project-body p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; }
.more { margin: 14px 0 0; color: var(--muted); font-size: 15px; text-align: center; }

.button {
  display: inline-block;
  margin-top: 4px;
  padding: 11px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--accent), #ffb77a);
  color: var(--on-accent);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.button.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.button:active { transform: scale(0.98); }

/* ---------- focus room ---------- */
.timer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.timer-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.chip[aria-pressed='true'] { background: var(--surface-2); color: var(--text); }

.clock { position: relative; width: min(240px, 70vw); aspect-ratio: 1; }
.clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.clock circle { fill: none; stroke-width: 6; }
.clock .track { stroke: var(--surface-2); }
.clock .ring {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.4s;
}
.focus[data-mode='short'] .ring, .focus[data-mode='long'] .ring { stroke: var(--accent-2); }
.clock-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.time { font-size: clamp(44px, 13vw, 60px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.clock-label { color: var(--muted); font-weight: 600; }
.timer-actions { display: flex; gap: 10px; }
.timer-actions .button { min-width: 110px; }
.sessions { margin: 0; color: var(--muted); font-size: 14px; }

.sounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.sound {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.sound-toggle span { font-size: 22px; filter: grayscale(0.8); opacity: 0.7; transition: 0.2s; }
.sound-toggle[aria-pressed='true'] { color: var(--text); }
.sound-toggle[aria-pressed='true'] span { filter: none; opacity: 1; }
.sound:has([aria-pressed='true']) { border-color: rgba(255, 154, 107, 0.5); background: var(--surface-2); }
.sound input { width: 100%; accent-color: var(--accent); }

.radio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.radio p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.radio-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.radio-frame iframe { width: 100%; height: 100%; border: 0; }

footer a { color: inherit; }
footer { padding-top: 24px; padding-bottom: max(32px, env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
  html { scroll-behavior: auto; }
}
