*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #070708;
  --bg-elevated: #0c0c0f;
  --text: #f4f2ed;
  --muted: #71717a;
  --prose: #a1a1aa;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #d4a574;
  --accent-dim: rgba(212, 165, 116, 0.14);
  --danger: #e54848;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --max: 720px;
  --content-max: 36rem;
  --pad-x: 1.5rem;
  --section-space: 4.25rem;
  --gallery-cols: 1;
  --surface: #0e0e11;
  --surface-2: #141418;
  --radius: 10px;
  --radius-lg: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --focus: 0 0 0 2px var(--bg), 0 0 0 3px rgba(244, 242, 237, 0.45);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.35);
}

@media (min-width: 720px) {
  :root {
    --content-max: min(92vw, 52rem);
    --gallery-cols: 2;
  }
}

@media (min-width: 960px) {
  :root {
    --content-max: min(94vw, 58rem);
  }
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 70% at 50% -20%, rgba(212, 165, 116, 0.08), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 10%, rgba(120, 140, 200, 0.06), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.03), transparent 35%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(236, 236, 236, 0.18);
  color: var(--text);
}

.skip-link {
  position: absolute;
  left: var(--pad-x);
  top: 0.75rem;
  z-index: 200;
  padding: 0.5rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--focus);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(212, 165, 116, 0.25), rgba(212, 165, 116, 0.85));
  transition: width 0.12s linear;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.nav-backdrop.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 7, 8, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.top-quote {
  margin: 0;
  padding: 0.5rem var(--pad-x);
  text-align: center;
  border: none;
}

.top-quote p {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
  font-style: normal;
  max-width: 48ch;
  margin: 0 auto;
}

.top-quote p::before,
.top-quote p::after {
  content: none;
}

.header {
  position: sticky;
  top: var(--site-top-h, 2.75rem);
  z-index: 50;
  background: rgba(7, 7, 8, 0.75);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  pointer-events: auto;
}

.header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 7, 8, 0.94);
  box-shadow: var(--header-shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.75rem var(--pad-x);
}

.nav-logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.is-active {
  color: var(--text);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(212, 165, 116, 0.35));
  opacity: 0.95;
}

.nav-links a:focus-visible,
.nav-toggle:focus-visible,
.link-down:focus-visible,
.to-top:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  margin: 5px 0;
}

main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  transition: max-width 0.35s ease;
}

.hero {
  padding: 3.25rem 0 3.25rem;
}

.hero-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .hero-layout {
    grid-template-columns: min(13.75rem, 32vw) 1fr;
    gap: 2rem;
  }
}

.hero-main {
  min-width: 0;
}

.activity-rail {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.activity-card {
  padding: 0.85rem 0.9rem 0.75rem;
}

.activity-card__title {
  font-size: 0.6875rem;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.activity-card__kicker {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.activity-card__setup {
  font-size: 0.625rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.activity-card__setup a {
  color: var(--prose);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.activity-card__setup a:hover {
  color: var(--text);
}

.activity-card__setup strong {
  font-weight: 500;
  color: var(--prose);
}

.activity-card__note {
  margin-top: 0.5rem;
  font-size: 0.625rem;
  line-height: 1.45;
  color: var(--muted);
}

.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.activity-list__empty {
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--muted);
  padding: 0.25rem 0;
}

.activity-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.activity-live {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dcea0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 206, 160, 0.35);
  background: rgba(125, 206, 160, 0.08);
  animation: activity-live-pulse 2s ease-in-out infinite;
}

@keyframes activity-live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.activity-item--now .activity-item__art {
  box-shadow: 0 0 0 2px rgba(125, 206, 160, 0.45);
}

.activity-item__link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  font: inherit;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.15s ease;
  cursor: pointer;
  background: transparent;
}

.activity-item__link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.activity-item__link:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.activity-item__inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.15rem;
}

.activity-item__art {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.activity-item__art--ph {
  display: block;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-elevated));
}

.activity-item__text {
  min-width: 0;
  flex: 1;
}

.activity-item__title {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-item__sub {
  font-size: 0.625rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}

body.now-playing-open {
  overflow: hidden;
}

.now-playing {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.now-playing[hidden] {
  display: none;
}

.now-playing__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.82);
  backdrop-filter: blur(14px);
}

.now-playing__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-height: min(92vh, 44rem);
  overflow: auto;
  padding: 1.25rem 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.55);
}

.now-playing__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.now-playing__close:hover {
  color: var(--text);
}

.now-playing__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.now-playing__art {
  width: min(72vw, 17.5rem);
  height: min(72vw, 17.5rem);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
}

.now-playing__meta {
  width: 100%;
}

.now-playing__badge {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7dcea0;
  margin-bottom: 0.35rem;
}

.now-playing__title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.now-playing__artist {
  font-size: 0.9375rem;
  color: var(--prose);
  margin-bottom: 0.2rem;
}

.now-playing__album {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.now-playing__progress {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.now-playing__progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), rgba(212, 165, 116, 0.5));
  transition: width 0.25s linear;
}

.now-playing__stats {
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--muted);
}

.now-playing__lyrics-wrap {
  margin-bottom: 1rem;
}

.now-playing__lyrics-label {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.now-playing__lyrics {
  max-height: 14rem;
  overflow: auto;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}

.now-playing__lyric-line {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(244, 242, 237, 0.38);
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.now-playing__lyric-line.is-active {
  color: var(--text);
  font-weight: 600;
  transform: scale(1.02);
  transform-origin: left center;
}

.now-playing__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.now-playing__link {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
}

.now-playing__link:hover {
  border-color: rgba(212, 165, 116, 0.45);
  background: var(--accent-dim);
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.hero-copy h1 {
  font-size: clamp(2.85rem, 11vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #fff 0%, rgba(244, 242, 237, 0.82) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-grid .weather {
  margin-bottom: 0;
  max-width: none;
  width: 100%;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr min(20rem, 42%);
    align-items: start;
    gap: 2rem;
  }
}

.hero-lead {
  color: var(--prose);
  font-size: 1rem;
  max-width: 34ch;
  margin-bottom: 1rem;
}

.hero-aliases {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.weather {
  margin-bottom: 2rem;
  max-width: 22rem;
  align-self: start;
}

.weather-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.625rem;
}

.weather-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.weather-place {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--prose);
  letter-spacing: 0.02em;
}

.weather-shell {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #121212 0%, #0c0c0c 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.weather-shell.is-live {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.weather-scene {
  position: relative;
  flex: 0 0 6.75rem;
  min-height: 6.75rem;
  overflow: hidden;
  background: linear-gradient(180deg, #1a2433 0%, #0f1419 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.weather-scene[data-condition="loading"] {
  background: linear-gradient(110deg, #141414 0%, #1a1a1a 50%, #141414 100%);
  background-size: 200% 100%;
  animation: weather-shimmer 1.4s ease-in-out infinite;
}

.weather-scene[data-condition="clear"] {
  background: linear-gradient(180deg, #3d5a80 0%, #1a2838 55%, #0f1419 100%);
}

.weather-scene[data-condition="night"] {
  background: linear-gradient(180deg, #0f1724 0%, #06080f 100%);
}

.weather-scene[data-condition="partly"] {
  background: linear-gradient(180deg, #4a6278 0%, #243040 100%);
}

.weather-scene[data-condition="cloudy"],
.weather-scene[data-condition="fog"] {
  background: linear-gradient(180deg, #3a4249 0%, #1c2228 100%);
}

.weather-scene[data-condition="rain"],
.weather-scene[data-condition="storm"] {
  background: linear-gradient(180deg, #2a3540 0%, #141a20 100%);
}

.weather-scene[data-condition="snow"] {
  background: linear-gradient(180deg, #4a5560 0%, #252b32 100%);
}

.weather-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255, 220, 150, 0.35), transparent 55%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.weather-scene[data-condition="clear"] .weather-glow {
  opacity: 1;
}

.weather-sun,
.weather-moon {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.weather-sun-rays {
  position: absolute;
  width: 3.25rem;
  height: 3.25rem;
  top: 0.55rem;
  left: 0.85rem;
  border-radius: 50%;
  opacity: 0;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 220, 140, 0.45) 0deg 8deg,
    transparent 8deg 18deg
  );
  mask: radial-gradient(circle, transparent 42%, #000 43%);
  -webkit-mask: radial-gradient(circle, transparent 42%, #000 43%);
  transition: opacity 0.5s ease;
}

.weather-scene[data-condition="clear"] .weather-sun-rays,
.weather-scene[data-condition="partly"] .weather-sun-rays {
  opacity: 1;
  animation: weather-rays-spin 24s linear infinite;
}

.weather-sun {
  width: 1.85rem;
  height: 1.85rem;
  top: 1.05rem;
  left: 1.25rem;
  background: radial-gradient(circle at 35% 35%, #fff4cc, #ffc857 55%, #f0a030 100%);
  box-shadow: 0 0 28px rgba(255, 200, 100, 0.6);
  z-index: 1;
}

.weather-scene[data-condition="clear"] .weather-sun,
.weather-scene[data-condition="partly"] .weather-sun {
  opacity: 1;
  transform: scale(1);
  animation: weather-sun-pulse 4s ease-in-out infinite;
}

.weather-moon {
  width: 1.35rem;
  height: 1.35rem;
  top: 1.25rem;
  left: 1.45rem;
  background: #e8eef5;
  box-shadow: inset -0.35rem -0.2rem 0 0 #9aa8b8;
}

.weather-scene[data-condition="night"] .weather-moon {
  opacity: 1;
  transform: scale(1);
  animation: weather-moon-float 5s ease-in-out infinite;
}

.weather-cloud {
  position: absolute;
  height: 0.65rem;
  background: rgba(230, 235, 240, 0.85);
  border-radius: 999px;
  opacity: 0;
  filter: blur(0.2px);
  transition: opacity 0.5s ease;
}

.weather-cloud::before,
.weather-cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.weather-cloud--a {
  width: 2.2rem;
  bottom: 1.5rem;
  left: 0.65rem;
}

.weather-cloud--a::before {
  width: 1rem;
  height: 1rem;
  top: -0.45rem;
  left: 0.35rem;
}

.weather-cloud--a::after {
  width: 1.25rem;
  height: 1.25rem;
  top: -0.55rem;
  right: 0.25rem;
}

.weather-cloud--b {
  width: 1.6rem;
  bottom: 2.1rem;
  right: 0.5rem;
  transform: scale(0.85);
  opacity: 0.7;
}

.weather-cloud--b::before {
  width: 0.75rem;
  height: 0.75rem;
  top: -0.35rem;
  left: 0.2rem;
}

.weather-scene[data-condition="partly"] .weather-cloud--a,
.weather-scene[data-condition="cloudy"] .weather-cloud--a,
.weather-scene[data-condition="cloudy"] .weather-cloud--b,
.weather-scene[data-condition="rain"] .weather-cloud--a,
.weather-scene[data-condition="rain"] .weather-cloud--b,
.weather-scene[data-condition="storm"] .weather-cloud--a,
.weather-scene[data-condition="storm"] .weather-cloud--b,
.weather-scene[data-condition="snow"] .weather-cloud--a,
.weather-scene[data-condition="snow"] .weather-cloud--b,
.weather-scene[data-condition="fog"] .weather-cloud--a {
  opacity: 1;
}

.weather-scene[data-condition="partly"] .weather-cloud--a,
.weather-scene[data-condition="cloudy"] .weather-cloud--a {
  animation: weather-cloud-drift 9s ease-in-out infinite;
}

.weather-particle {
  position: absolute;
  top: -0.5rem;
  pointer-events: none;
}

.weather-particle--rain {
  width: 1px;
  height: 0.65rem;
  background: linear-gradient(180deg, transparent, rgba(174, 198, 220, 0.9));
  animation: weather-rain-fall linear infinite;
}

.weather-particle--snow {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: weather-snow-fall linear infinite;
}

.weather-data {
  flex: 1;
  padding: 0.875rem 1.125rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 0.15rem;
}

.weather-temp-line {
  margin: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.weather-temp {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
}

.weather-degree {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.125rem;
}

.weather-feels {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

.weather-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.45s ease 0.15s, transform 0.45s ease 0.15s;
}

.weather-wind {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.45s ease 0.25s;
}

.weather-shell.is-live .weather-wind:not([hidden]) {
  opacity: 1;
}

.weather-desc.is-live {
  opacity: 1;
  transform: translateY(0);
}

@keyframes weather-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes weather-rays-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes weather-sun-pulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 210, 120, 0.45);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 36px rgba(255, 210, 120, 0.8);
    transform: scale(1.05);
  }
}

@keyframes weather-moon-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

@keyframes weather-cloud-drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

@keyframes weather-rain-fall {
  0% {
    transform: translateY(-0.5rem);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(6.75rem);
    opacity: 0.2;
  }
}

@keyframes weather-snow-fall {
  0% {
    transform: translateY(-0.25rem) translateX(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(6.75rem) translateX(0.35rem);
    opacity: 0;
  }
}

.weather-scene[data-condition="storm"] {
  animation: weather-storm-flash 5s ease-in-out infinite;
}

@keyframes weather-storm-flash {
  0%,
  92%,
  100% {
    filter: brightness(1);
  }
  93% {
    filter: brightness(1.35);
  }
  94% {
    filter: brightness(0.95);
  }
}

.ambient-weather {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-weather__canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Keep main above rain layer only — do not override .header / .site-top sticky + z-index */
body main {
  position: relative;
  z-index: 1;
}

body .footer {
  position: relative;
  z-index: 1;
}

.ambient-weather--storm::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.035);
  animation: ambient-flash 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ambient-flash {
  0%,
  92%,
  100% {
    opacity: 0;
  }
  93% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-weather--storm::after {
    animation: none;
  }

  .weather-shell,
  .weather-desc,
  .weather-sun,
  .weather-sun-rays,
  .weather-moon,
  .weather-cloud--a,
  .weather-scene[data-condition="loading"],
  .weather-scene[data-condition="storm"],
  .weather-particle {
    animation: none !important;
    transition: none !important;
  }

  .weather-shell {
    opacity: 1;
    transform: none;
  }

  .weather-desc.is-live {
    opacity: 1;
    transform: none;
  }
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.045) 0%, transparent 42%),
    linear-gradient(220deg, var(--accent-dim) 0%, transparent 55%),
    var(--surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    var(--shadow-soft);
}

.contact {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.contact-emails {
  list-style: none;
  margin: 0 0 0.625rem;
  padding: 0;
}

.contact-emails li {
  margin-bottom: 0.25rem;
}

.contact-emails a {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
}

.contact-emails a:hover {
  text-decoration: underline;
}

.contact-note {
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 40ch;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.contact-hints {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 44ch;
}

.contact-hints li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.55;
}

.contact-hints li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--border);
}

.contact-hints strong {
  color: var(--prose);
  font-weight: 500;
}

.link-down {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.link-down:hover {
  color: var(--text);
}

.link-down--cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.link-down--cta:hover {
  border-color: #333;
  background: var(--surface-2);
}

.block {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--site-top-h, 2.75rem) + 3.5rem);
}

.block h2 {
  font-size: 0.6875rem;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-size: 1.5rem;
  font-family: var(--font);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-lead {
  font-size: 0.875rem;
  color: var(--prose);
  max-width: 40ch;
  margin: 0;
  line-height: 1.6;
}

.section-lead strong {
  color: var(--muted);
  font-weight: 500;
}

.projects-more {
  margin-top: 2rem;
  padding: 1rem 1.125rem;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 44ch;
  line-height: 1.6;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.015);
}

.projects-stack {
  min-width: 0;
}

.project-card {
  scroll-margin-top: calc(var(--site-top-h, 2.75rem) + 5rem);
  padding: 2.75rem 0;
  border-radius: var(--radius-lg);
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  border-left: 2px solid transparent;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s var(--ease-out);
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: var(--accent);
  transform: translateX(2px);
}

.project-card + .project-card {
  border-top: 1px solid var(--border);
}

.project-card__head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
}

.project-card__num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.25rem;
}

.project-card__head .entry-tag {
  margin-bottom: 0.375rem;
}

.project-card__head h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}

.project-card .entry-tag {
  margin-bottom: 0.5rem;
}

.project-card .block p,
.project-card p {
  max-width: none;
}

.project-next {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.project-next:hover {
  color: var(--text);
}

.block p {
  color: var(--prose);
  margin-bottom: 1rem;
  max-width: 52ch;
}

.block p:last-child {
  margin-bottom: 0;
}

.entry {
  padding: 1.35rem 0.85rem;
  margin-left: -0.85rem;
  margin-right: -0.85rem;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background 0.25s ease;
}

.entry:hover {
  background: rgba(255, 255, 255, 0.02);
}

.entry:first-of-type {
  border-top: 1px solid var(--border);
}

.entry-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.entry h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.entry p {
  font-size: 0.9375rem;
  color: var(--prose);
  line-height: 1.65;
}

.entry--now {
  border-bottom: none;
}

.entry--proof .block p,
.entry--proof p {
  max-width: none;
}

.name-blur {
  display: inline-block;
  color: transparent;
  text-shadow: 0 0 12px rgba(229, 229, 229, 0.85);
  filter: blur(5px);
  user-select: none;
  vertical-align: baseline;
}

.proof-caption {
  font-size: 1rem;
  color: var(--text);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.gallery--proof {
  max-width: 28rem;
  margin-bottom: 0.5rem;
}

.work-video-wrap {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  max-width: min(100%, 720px);
}

.work-video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  background: #000;
}

.work-video-fallback {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.project-link {
  color: var(--text);
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

.inline-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(236, 236, 236, 0.25);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
  color: var(--text);
  text-decoration-color: rgba(236, 236, 236, 0.65);
}

.inline-code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
  background: #141414;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.project-subhead {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-list {
  list-style: none;
  margin-bottom: 0.5rem;
}

.project-list li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1rem;
  font-size: 0.875rem;
  color: var(--prose);
  line-height: 1.55;
}

.project-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.project-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--prose);
  font-size: 0.875rem;
  line-height: 1.65;
}

.project-steps li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.project-steps li:last-child {
  margin-bottom: 0;
}

.project-steps strong {
  color: var(--text);
  font-weight: 600;
}


.gallery {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols), minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color 0.15s;
}

.gallery figure:hover {
  border-color: #333;
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.gallery figcaption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
}

.server-list {
  list-style: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.server-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.server-name {
  font-family: var(--mono);
  color: var(--text);
}

.server-note {
  color: var(--muted);
  text-align: right;
}

.notice {
  margin-top: 1.25rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
}

.notice-title {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.notice p {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice--legal {
  border-color: #3a3a3a;
  margin-bottom: 1rem;
}

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-emails {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.footer-emails a {
  color: var(--text);
  text-decoration: none;
}

.footer-emails a:hover {
  text-decoration: underline;
}

.footer-sep {
  color: var(--muted);
  margin: 0 0.15rem;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--prose);
  font-size: 0.9375rem;
}

.skill-list li:first-child {
  border-top: 1px solid var(--border);
}

.block--quote blockquote {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
  border-left: 2px solid var(--border);
  padding: 0.25rem 0 0.25rem 1.25rem;
  max-width: 52ch;
}

.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 15;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-out), color 0.2s ease, border-color 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  color: var(--text);
  border-color: #333;
}

.footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem var(--pad-x) 3.5rem;
  transition: max-width 0.35s ease;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-aliases {
  font-family: var(--mono);
}

.media-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.media-viewer[hidden] {
  display: none;
}

.media-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.media-viewer__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1600px);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.media-viewer__toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--border);
  background: #0d0d0d;
}

.media-viewer__btn {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.375rem 0.625rem;
  cursor: pointer;
}

.media-viewer__btn:hover {
  color: var(--text);
}

.media-viewer__figure {
  margin: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.media-viewer__img {
  display: block;
  width: 100%;
  height: auto;
}

.media-viewer__cap {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
}

.media-viewer:fullscreen .media-viewer__panel {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  border: none;
}

.media-viewer:fullscreen .media-viewer__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .nav-toggle {
    order: 3;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    width: min(82vw, 280px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: calc(var(--site-top-h, 2.75rem) + 2rem) 1.25rem 2rem;
    background: rgba(12, 12, 12, 0.98);
    border-left: 1px solid var(--border);
    box-shadow: -16px 0 48px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 0.28s var(--ease-out);
  }

  .nav-links a {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
  }

  .nav-links a.is-active::after {
    bottom: 0.35rem;
    width: 1.5rem;
    right: auto;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: block;
  }

  .project-card,
  .entry {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .hero {
    padding-top: 3rem;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-emails {
    word-break: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress__bar {
    transition: none;
  }

  .to-top {
    transition: opacity 0.2s ease;
  }
}
