:root {
  color-scheme: light;
  --bg: #f4efe6;
  --ink: #17201d;
  --muted: #68706c;
  --line: rgba(23, 32, 29, 0.17);
  --button: rgba(255, 255, 255, 0.5);
  --button-hover: #fff;
  --accent: #e25a35;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111715;
  --ink: #f2eee5;
  --muted: #929c97;
  --line: rgba(242, 238, 229, 0.16);
  --button: rgba(255, 255, 255, 0.06);
  --button-hover: rgba(255, 255, 255, 0.12);
  --accent: #ff7952;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--ink) 3%, transparent), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color 220ms ease, color 220ms ease;
}

button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(100%, 1500px);
  min-height: 100svh;
  margin: auto;
  padding: clamp(24px, 4vw, 56px) clamp(22px, 6vw, 90px);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.brand-dot, .pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button);
  color: var(--ink);
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover { background: var(--button-hover); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 3px; }

.toggle-icon, .toggle-icon svg { width: 17px; height: 17px; }
.toggle-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sun { display: none; }
[data-theme="dark"] .moon { display: none; }
[data-theme="dark"] .sun { display: block; }

.clock-wrap {
  align-self: center;
  text-align: center;
  padding: 9vh 0;
}

.eyebrow {
  margin: 0 0 clamp(16px, 3vw, 32px);
  color: var(--muted);
  font-size: clamp(0.68rem, 1vw, 0.78rem);
  font-weight: 750;
  letter-spacing: 0.24em;
}

.clock {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  font-size: clamp(4.4rem, 16vw, 13rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.84;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.colon {
  color: var(--accent);
  padding: 0 0.035em;
  transform: translateY(-0.06em);
}

.date {
  margin: clamp(28px, 5vw, 50px) 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-style: italic;
}

.timezone {
  width: fit-content;
  margin: 18px auto 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.pulse { width: 6px; height: 6px; box-shadow: none; animation: pulse 2s infinite; }

footer {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.footer-line { height: 1px; flex: 1; margin: 0 18px; background: var(--line); }

@keyframes pulse {
  50% { opacity: 0.35; }
}

@media (max-width: 560px) {
  .shell { padding: 24px 18px; }
  .toggle-label { display: none; }
  .theme-toggle { padding: 10px; }
  .clock { font-size: clamp(3.55rem, 20vw, 6rem); }
  .clock-wrap { padding: 6vh 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
