:root {
  --bg: #f4f3f0;
  --sky-top: #eeeff3;
  --sky-bottom: #f7f4ef;
  --cloud: #ffffff;
  --cloud-shadow: #d9dee8;
  --fg: #16151a;
  --muted: #6b6a72;
  --veil: rgba(246, 245, 242, .55);
  --icon-shadow: rgba(25, 20, 35, .18);
}

:root[data-theme="dark"] {
  --bg: #090b11;
  --sky-top: #080a10;
  --sky-bottom: #10131c;
  --cloud: #30394d;
  --cloud-shadow: #171d2a;
  --fg: #f3f2f7;
  --muted: #8b899a;
  --veil: rgba(10, 10, 15, .55);
  --icon-shadow: rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Arial, sans-serif;
  transition: background .4s ease, color .4s ease;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

main {
  position: relative;
  z-index: 1;
  height: 100vh;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

h1 {
  margin: 0;
  font-family: "Unbounded", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(3rem, 13vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.project-strip {
  margin-top: clamp(2rem, 5vh, 3.25rem);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(1.35rem, 4vw, 2.6rem);
  pointer-events: auto;
}

.project-strip a {
  width: clamp(4.5rem, 8vw, 5.6rem);
  display: grid;
  justify-items: center;
  gap: .55rem;
  color: var(--fg);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}

.project-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 24%;
  box-shadow: 0 12px 28px var(--icon-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.project-strip span {
  color: var(--muted);
  transition: color .25s ease;
}

.project-strip a:hover img,
.project-strip a:focus-visible img {
  transform: translateY(-5px) scale(1.035);
  box-shadow: 0 18px 34px var(--icon-shadow);
}

.project-strip a:hover span,
.project-strip a:focus-visible span { color: var(--fg); }
.project-strip a:focus-visible { outline: none; }

#theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  border-radius: 50%;
  background: var(--veil);
  backdrop-filter: blur(8px);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .4s ease, border-color .4s ease, transform .2s ease;
}

#theme-toggle:hover { transform: scale(1.06); }
#theme-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

#theme-toggle .icon {
  position: absolute;
  width: 1.15rem;
  height: 1.15rem;
  transition: opacity .3s ease, transform .3s ease;
}

.icon-moon { opacity: 0; transform: rotate(-40deg) scale(.6); }
:root[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(40deg) scale(.6); }
:root[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
:root:not([data-theme="dark"]) .icon-sun { opacity: 1; transform: rotate(0) scale(1); }

@media (max-width: 520px) {
  main { padding-inline: 1rem; }
  .project-strip { gap: 1.15rem; }
  .project-strip a { width: 4.4rem; }
}

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