/* danieladonai.com - one stylesheet for every page */
:root {
  --bg: #fbfaf6;
  --card: rgba(255, 255, 255, 0.78);
  --fg: #111111;
  --muted: #444444;
  --dim: #6b6b6b;
  --rule: rgba(0, 0, 0, 0.10);
  --accent: #c2410c;
  --glow-a: rgba(255, 138, 76, 0.30);
  --glow-b: rgba(150, 120, 240, 0.24);
  --glow-c: rgba(255, 120, 160, 0.22);
  --grain: 0.07;
  --sans: "Google Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Google Sans Code", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0f12;
  --card: rgba(22, 23, 27, 0.72);
  --fg: #ececea;
  --muted: #bdbdb8;
  --dim: #8d8d88;
  --rule: rgba(255, 255, 255, 0.10);
  --accent: #ff8a4c;
  --glow-a: rgba(255, 106, 42, 0.42);
  --glow-b: rgba(110, 76, 214, 0.40);
  --glow-c: rgba(224, 53, 107, 0.32);
  --grain: 0.10;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f12;
    --card: rgba(22, 23, 27, 0.72);
    --fg: #ececea;
    --muted: #bdbdb8;
    --dim: #8d8d88;
    --rule: rgba(255, 255, 255, 0.10);
    --accent: #ff8a4c;
    --glow-a: rgba(255, 106, 42, 0.42);
    --glow-b: rgba(110, 76, 214, 0.40);
    --glow-c: rgba(224, 53, 107, 0.32);
    --grain: 0.10;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--fg) 35%, transparent); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- animated sunset glow ---------- */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow .blob { position: absolute; border-radius: 50%; filter: blur(30px); will-change: transform; }
.glow .b1 { left: -18vw; top: -30vh; width: 62vw; height: 62vw; max-width: 820px; max-height: 820px; background: radial-gradient(circle, var(--glow-a), transparent 62%); animation: drift1 22s ease-in-out infinite; }
.glow .b2 { right: -20vw; top: 8vh; width: 66vw; height: 66vw; max-width: 880px; max-height: 880px; background: radial-gradient(circle, var(--glow-b), transparent 62%); animation: drift2 28s ease-in-out infinite; }
.glow .b3 { left: 18vw; bottom: -55vh; width: 62vw; height: 62vw; max-width: 820px; max-height: 820px; background: radial-gradient(circle, var(--glow-c), transparent 62%); animation: drift3 25s ease-in-out infinite; }
.glow svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--grain); }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(17vw, 14vh) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(-18vw, 10vh) scale(0.9); } }
@keyframes drift3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(12vw, -20vh) scale(1.2); } }

/* ---------- shell ---------- */
.page { position: relative; z-index: 1; width: min(100%, 1280px); margin: 0 auto; padding: 40px clamp(16px, 12vw, 160px) 48px; }
.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mark { display: inline-flex; color: var(--fg); text-decoration: none; }
.mark svg { width: 44px; height: 44px; display: block; }
.mark .dot { fill: var(--accent); transition: transform .2s ease; }
.mark:hover .dot { transform: translateY(-40px); }
.top-right { display: flex; align-items: center; gap: 22px; }
.links { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--fg); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: 16px; }
.now { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.live { width: 8px; height: 8px; border-radius: 50%; background: #2f9e44; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 158, 68, .55); } 70% { box-shadow: 0 0 0 8px rgba(47, 158, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 68, 0); } }
.hero h1 { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; }
.cursor { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero p { margin: 0; max-width: 660px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); }

/* ---------- cards ---------- */
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; row-gap: 10px; }
.label { font-size: 14px; font-weight: 500; color: var(--accent); }
.label span { color: var(--dim); }
.label-shipped { grid-column: span 2; }
.tile { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--card); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); text-decoration: none; color: var(--fg); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tile:hover { color: var(--fg); transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 40px -18px rgba(255, 106, 42, .45); }
.tile img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--rule); }
.tile .body { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px 18px; }
.tile .title { font-size: 20px; font-weight: 700; text-decoration: none; color: var(--fg); }
.tile a.title:hover { color: var(--accent); }
.tile-img { display: block; }
.tile .more { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.tile .desc { font-size: 14px; color: var(--muted); }
.foot-links { display: none; gap: 22px; font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .page { padding-top: 24px; }
  .home { gap: 40px; }
  .links { display: none; }
  .work { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .label-shipped { grid-column: auto; }
  .label-play { order: 3; margin-top: 16px; }
  .tile-play { order: 4; }
  .tile img { height: 180px; }
  .foot-links { display: flex; }
}

/* ---------- posts & lists ---------- */
.narrow { max-width: 760px; }
.crumb { font-size: 14px; color: var(--muted); margin-top: 56px; }
.post h1, .list h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.12; font-weight: 500; letter-spacing: -0.015em; margin: 12px 0 8px; }
.meta { font-size: 13px; color: var(--dim); }
.prose { font-size: 18px; line-height: 1.75; margin-top: 40px; }
.prose p { margin: 0 0 1.2em; }
.prose h2, .prose h3, .prose h4 { line-height: 1.3; margin: 2em 0 .6em; font-weight: 700; }
.prose h3 { font-size: 24px; }
.prose h4 { font-size: 20px; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose figure, .prose .wp-caption { margin: 2em 0; max-width: 100% !important; }
.prose figcaption, .prose .wp-caption-text { font-size: 14px; color: var(--dim); margin-top: 8px; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.post-list { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--rule); }
.post-list li { border-bottom: 1px solid var(--rule); }
.post-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 18px 0; text-decoration: none; }
.post-list .t { font-size: 20px; }
.post-list .d { font-size: 13px; color: var(--dim); white-space: nowrap; }
.site-foot { margin-top: 80px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; gap: 22px; font-size: 14px; color: var(--muted); }

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