@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;500;600;700&family=Space+Grotesk:wght@300;400;500&display=swap');

:root {
  --bg: #1e1109;
  --bg-panel: #33190f;
  --bg-panel-soft: #3d2013;
  --text: #f4e7d6;
  --text-dim: #cbb197;
  --rust: #d9541a;
  --rust-dark: #a83c10;
  --maroon: #7a1414;
  --maroon-dark: #47100d;
  --mustard: #e0a83f;
  --max-width: 1000px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(244, 231, 214, 0.04) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3 {
  font-family: 'Quicksand', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.15;
  margin-top: 0;
  letter-spacing: 0.01em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
  font-weight: 500;
}

p {
  margin-top: 0;
}

a {
  color: var(--mustard);
  text-decoration-color: var(--rust);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--rust);
}

/* Warm glow wash — brightens and warms the whole page as the cylinder is turned */

.warmth-overlay {
  position: fixed;
  inset: 0;
  z-index: 16;
  background: radial-gradient(circle at 50% 38%,
    rgba(255, 176, 64, 0.95) 0%,
    rgba(255, 120, 24, 0.6) 45%,
    transparent 75%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .warmth-overlay {
    transition: none;
  }
}

/* Decorative background blobs */

.blob-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
  will-change: transform;
}

.blob-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: var(--rust);
}

.blob-2 {
  width: 360px;
  height: 360px;
  top: 30vh;
  right: -140px;
  background: var(--mustard);
}

.blob-3 {
  width: 300px;
  height: 300px;
  bottom: -100px;
  left: 20vw;
  background: var(--maroon);
  opacity: 0.35;
}

/* Minimal fixed brand mark */

.site-brand {
  position: fixed;
  top: 1.5rem;
  left: 1.75rem;
  z-index: 30;
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .site-brand {
    transition: none;
  }
}

/* Curtain intro */

.curtain {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 150%;
  z-index: 20;
  background:
    repeating-linear-gradient(97deg,
      rgba(255, 255, 255, 0.07) 0px, rgba(255, 255, 255, 0.07) 2px,
      transparent 2px, transparent 15px),
    repeating-linear-gradient(97deg,
      rgba(0, 0, 0, 0.12) 0px, rgba(0, 0, 0, 0.12) 1px,
      transparent 1px, transparent 15px),
    radial-gradient(ellipse 60% 45% at 32% 18%, rgba(255, 170, 150, 0.22), transparent 65%),
    linear-gradient(160deg, #b81d1d 0%, var(--maroon) 55%, var(--maroon-dark) 100%);
  -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTE1IiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48cGF0aCBkPSJNMCwwIEgxMDAgVjU1IFE1MCwxMDggMCw5MCBaIiBmaWxsPSJibGFjayIvPjwvc3ZnPg==");
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTE1IiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48cGF0aCBkPSJNMCwwIEgxMDAgVjU1IFE1MCwxMDggMCw5MCBaIiBmaWxsPSJibGFjayIvPjwvc3ZnPg==");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding: 0 8vw;
  will-change: transform, opacity;
}

.curtain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.35) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.curtain h1 {
  color: #fff;
  font-weight: 300;
  max-width: 14em;
}

.curtain .curtain-hi {
  display: block;
  font-size: 0.55em;
  font-weight: 300;
  opacity: 0.85;
}

/* Cylinder carousel */

.intro-pin {
  position: relative;
  height: 220vh;
}

.cylinder-section {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.cylinder-stage {
  position: relative;
  width: min(280px, 70vw);
  height: 340px;
  perspective: 1400px;
}

/* The static drum body — this is what makes it read as one solid object
   rather than three floating cards. It never rotates; only the text
   labels on top of it do. */
.cylinder-drum {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 999px / 60px;
  background:
    linear-gradient(90deg,
      rgba(20, 10, 5, 0.75) 0%,
      rgba(20, 10, 5, 0.15) 16%,
      rgba(20, 10, 5, 0) 50%,
      rgba(20, 10, 5, 0.15) 84%,
      rgba(20, 10, 5, 0.75) 100%),
    url('../assets/lightbulb.jpg');
  background-size: cover, cover;
  background-position: center, center 30%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 0 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.cylinder-drum::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg,
    rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 1px,
    transparent 1px, transparent 16px);
  mix-blend-mode: overlay;
}

.cylinder-drum::after {
  content: '';
  position: absolute;
  top: -20px;
  left: 6%;
  right: 6%;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--bg-panel-soft), var(--bg-panel));
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
}

.cylinder {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
  z-index: 3;
}

.cylinder-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.75rem;
  backface-visibility: hidden;
  pointer-events: none;
}

.cylinder-face h3 {
  font-size: 1.4rem;
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 0, 0, 0.6);
  background: rgba(15, 8, 4, 0.35);
  padding: 0.4em 0.7em;
  border-radius: 10px;
  backdrop-filter: blur(2px);
}

.cylinder-face[data-face="0"] { transform: rotateY(0deg) translateZ(140px); }
.cylinder-face[data-face="1"] { transform: rotateY(90deg) translateZ(140px); }
.cylinder-face[data-face="2"] { transform: rotateY(180deg) translateZ(140px); }
.cylinder-face[data-face="3"] { transform: rotateY(270deg) translateZ(140px); }

.wip-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--mustard);
  padding: 0.15em 0.55em;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.4em;
}

/* Particle burst on turn */
.cylinder-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 6px 1px rgba(224, 168, 63, 0.7);
  pointer-events: none;
  z-index: 6;
  animation: particle-slide 0.55s ease-out forwards;
}

@keyframes particle-slide {
  0% { transform: translateX(calc(var(--dir, 1) * -60px)) scale(0.4); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(calc(var(--dir, 1) * 150px)) scale(1); opacity: 0; }
}

.cylinder-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 33%;
  z-index: 5;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  opacity: 0;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.cylinder-zone:hover {
  opacity: 1;
  color: var(--mustard);
}

.cylinder-zone.left { left: -3rem; text-align: left; padding-left: 0.5rem; }
.cylinder-zone.right { right: -3rem; text-align: right; padding-right: 0.5rem; }

.cylinder-dots {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  list-style: none;
  padding: 0;
}

.cylinder-dots button {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.cylinder-dots button.active,
.cylinder-dots button:hover {
  color: var(--mustard);
  border-color: var(--rust);
}

.cylinder-hint {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

/* Layout */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 5rem;
}

.content-panel section {
  display: none;
  margin-bottom: 3rem;
}

.content-panel section.active {
  display: block;
}

/* Scroll reveal */

[data-reveal] {
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal=""],
[data-reveal="up"] {
  transform: translateY(28px);
}

[data-reveal="left"] {
  transform: translateX(-70px);
}

[data-reveal="right"] {
  transform: translateX(70px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.blurb {
  font-size: 1.15rem;
  max-width: 42em;
}

/* Buttons / links styled as CTAs */

.btn {
  display: inline-block;
  position: relative;
  margin-top: 1.5rem;
  padding: 0.8rem 1.8rem;
  background-color: var(--rust);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  z-index: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(217, 84, 26, 0.4);
}

/* Project / card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.card {
  background-color: var(--bg-panel);
  border-radius: 16px;
  padding: 1.5rem;
  transform: rotate(var(--tilt, -1deg));
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.card:nth-child(even) {
  --tilt: 1deg;
}

.card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 16px 34px rgba(217, 84, 26, 0.3);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.card img {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin-top: 0.25rem;
  border: 1px solid rgba(244, 231, 214, 0.15);
}

.card .tag {
  display: inline-block;
  background-color: var(--rust);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.placeholder-note {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 42em;
}

/* Games: horizontal scroll-snap track */

.card-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0.5rem 2rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--rust) transparent;
}

.card-track .card {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: center;
}

/* Zigzag section divider */

.zigzag {
  height: 24px;
  background: linear-gradient(-45deg, var(--rust) 12px, transparent 0),
              linear-gradient(45deg, var(--rust) 12px, transparent 0);
  background-position: left top;
  background-repeat: repeat-x;
  background-size: 24px 24px;
  margin-bottom: 2.5rem;
  opacity: 0.85;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(244, 231, 214, 0.15);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 480px) {
  .cylinder-zone.left { left: 0; }
  .cylinder-zone.right { right: 0; }

  .curtain-lastname {
    display: none;
  }
}
