/* -------------------------------------------------------- */
/* Design tokens                                             */
/* -------------------------------------------------------- */
:root {
  --bg: #030303;
  --surface: #131315;
  --surface-2: #1c1c1f;
  --text: #f4f3f0;
  --text-soft: #9a9994;
  --text-muted: #6b6a66;
  --teal: #2ee6c8;
  --teal-dark: #1fae95;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --radius: 16px;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease-standard: cubic-bezier(0.25, 1, 0.5, 1);
  --dur: 0.7s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--text);
}

p {
  margin: 0 0 1em;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.text-accent {
  color: var(--text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
  transition: transform 0.25s var(--ease-standard), box-shadow 0.25s ease, background 0.25s ease;
}

.btn--primary {
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: var(--shadow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: #ececeb;
}

.btn--ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  background: #24242a;
  border-color: var(--text-muted);
}

.btn__arrow {
  transition: transform 0.25s var(--ease-standard);
}

.btn--primary:hover .btn__arrow {
  transform: translateX(3px);
}

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(94%, 1000px);
  border-radius: 999px;
  background: rgba(19, 19, 21, 0.75);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}

.nav {
  margin: 0 auto;
  padding: 0.65rem 0.65rem 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem;
  border-radius: 999px;
  color: var(--teal);
  transition: background 0.2s ease, transform 0.2s var(--ease-standard);
}

.nav__brand:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.nav__brand-mark {
  width: 26px;
  height: 26px;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav__list a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-soft);
  position: relative;
  padding: 0.25rem 0.1rem;
  transition: color 0.2s ease;
}

.nav__list a:not(.nav__cta):hover {
  color: var(--text);
}

.nav__list a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width 0.25s ease;
}

.nav__list a:not(.nav__cta):hover::after,
.nav__list a:not(.nav__cta).is-active::after {
  width: 100%;
}

.nav__list a.is-active {
  color: var(--text);
}

.nav__cta {
  background: #ffffff;
  color: #0a0a0a !important;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.2s var(--ease-standard), background 0.2s ease;
  display: inline-block;
}

.nav__cta:hover {
  transform: translateY(-1px);
  background: #ececeb;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* -------------------------------------------------------- */
/* Section-dot progress nav (desktop only)                    */
/* -------------------------------------------------------- */
.section-dots {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 90;
}

.section-dots a {
  width: 14px;
  height: 14px;
  display: block;
}

.section-dots a span {
  display: block;
  width: 8px;
  height: 8px;
  margin: auto;
  border-radius: 50%;
  background: var(--line-strong);
  transition: transform 0.3s var(--ease-standard), background 0.3s ease;
}

.section-dots a:hover span,
.section-dots a.is-active span {
  background: var(--teal);
  transform: scale(1.4);
}

@media (max-width: 900px) {
  .section-dots {
    display: none;
  }
}

/* -------------------------------------------------------- */
/* Section shell + scroll-reveal mechanic                     */
/* -------------------------------------------------------- */
.section {
  position: relative;
  padding: 7rem 1.5rem 6rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.section--alt {
  background: #060607;
}

.section__inner {
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.section__inner--wide {
  max-width: 1180px;
}

.section__eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 400;
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity var(--dur) var(--ease-standard), transform var(--dur) var(--ease-standard);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

#hero.reveal {
  transform: none;
  opacity: 1;
  transition: none;
}

.reveal .card,
.reveal .project-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-standard), transform 0.6s var(--ease-standard);
}

.reveal.in-view .card,
.reveal.in-view .project-card {
  opacity: 1;
  transform: translateY(0);
}

.reveal.in-view .cards .card:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal.in-view .cards .card:nth-child(2) {
  transition-delay: 0.12s;
}

.reveal.in-view .cards .card:nth-child(3) {
  transition-delay: 0.19s;
}

.reveal.in-view .cards .card:nth-child(4) {
  transition-delay: 0.26s;
}

.reveal.in-view .cards .card:nth-child(5) {
  transition-delay: 0.33s;
}

/* -------------------------------------------------------- */
/* Hero & SVG Animation Utilities                             */
/* -------------------------------------------------------- */
.hero {
  align-items: center;
}

.hero__blob {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 65%;
  background: radial-gradient(40% 40% at 70% 20%, rgba(46, 230, 200, 0.1), transparent 70%);
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero__content {
  max-width: 46ch;
}

.hero__eyebrow {
  font-weight: 500;
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hero__eyebrow span {
  color: var(--teal);
}

.hero__name {
  font-size: clamp(2.6rem, 5.6vw, 4.1rem);
  font-weight: 400;
}

.hero__tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-soft);
  max-width: 42ch;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

/* -------------------------------------------------------- */
/* Hero Isometric Stack Utilities                             */
/* -------------------------------------------------------- */
.hero__visual {
  position: relative;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

@media (min-width: 900px) {
  .hero__visual {
    height: 380px;
  }
}

.dice-cube {
  --cube-size: 130px;
  position: relative;
  width: var(--cube-size);
  height: var(--cube-size);
  transform-style: preserve-3d;
  transform: rotateX(var(--rot-x, -18deg)) rotateY(var(--rot-y, 35deg));
  transition: transform 0.5s var(--ease-standard);
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  animation: diceFloat 4s ease-in-out infinite alternate;
}

@media (min-width: 900px) {
  .dice-cube {
    --cube-size: 200px;
  }
}

.dice-cube.is-dragging,
.dice-cube.is-spinning {
  transition: none;
  animation-play-state: paused;
}

.dice-cube.is-dragging {
  cursor: grabbing;
}

.dice-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(19, 19, 21, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(46, 230, 200, 0.06);
}

/* Glass reflection effect */
.dice-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.dice-face svg {
  width: 46px;
  height: 46px;
}

@media (min-width: 900px) {
  .dice-face svg {
    width: 68px;
    height: 68px;
  }
}

.dice-face--front {
  transform: translateZ(calc(var(--cube-size) / 2));
}

.dice-face--back {
  transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2));
}

.dice-face--right {
  transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2));
}

.dice-face--left {
  transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2));
}

.dice-face--top {
  transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2));
}

.dice-face--bottom {
  transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2));
}

@keyframes diceFloat {
  0% {
    transform: rotateX(var(--rot-x, -18deg)) rotateY(var(--rot-y, 35deg)) translateY(0px);
  }

  100% {
    transform: rotateX(var(--rot-x, -18deg)) rotateY(var(--rot-y, 35deg)) translateY(-10px);
  }
}

@media (max-width: 899px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    max-width: 46ch;
    margin: 0 auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    margin-top: 1.5rem;
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  z-index: 1;
}

.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--teal);
  border-radius: 999px;
  animation: cue 1.6s ease-in-out infinite;
}

@keyframes cue {

  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }

  60% {
    transform: translateY(12px);
    opacity: 0.3;
  }
}

/* -------------------------------------------------------- */
/* About                                                       */
/* -------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  margin-top: 1.5rem;
  align-items: start;
}

.about__copy p {
  color: var(--text-soft);
}

.about__copy strong {
  color: var(--text);
  font-weight: 600;
}

.process-heading {
  margin-top: 2rem;
  font-size: 1.3rem;
}

.process-list {
  list-style: none;
  padding: 0;
  color: var(--text-soft);
}

.process-list li {
  margin-bottom: 0.5rem;
}

.about__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.about__facts li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  font-weight: 500;
  color: var(--text-soft);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.about__facts li:last-child {
  border-bottom: 1px solid var(--line);
}

.about__fact-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--teal);
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .about__grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------- */
/* Services / cards (With Interactive Glow)                    */
/* -------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.card--wide {
  grid-column: span 2;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  overflow: hidden;
  transition: transform 0.3s var(--ease-standard), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
      rgba(46, 230, 200, 0.08),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card>* {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.card__icon {
  width: 46px;
  height: 46px;
  color: var(--teal);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 400;
}

.card p {
  color: var(--text-soft);
  margin-bottom: 0;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .card--wide {
    grid-column: span 1;
  }
}

/* -------------------------------------------------------- */
/* Portfolio: horizontal scroll-snap track                    */
/* -------------------------------------------------------- */
.portfolio {
  padding-left: 0;
  padding-right: 0;
}

.portfolio .section__inner {
  padding: 0 1.5rem;
}

.portfolio__hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.portfolio__track {
  list-style: none;
  width: 100%;
  max-width: 1180px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.5rem 2rem;
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 1.5rem;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

.portfolio__track::-webkit-scrollbar {
  height: 8px;
}

.portfolio__track::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.project-card {
  position: relative;
  scroll-snap-align: start;
  flex: 0 0 min(340px, 80vw);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-standard), box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
      rgba(46, 230, 200, 0.08),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.project-card__trigger {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 2.5;
  border: none;
  padding: 0;
  margin: 0;
  background: var(--surface-2);
  cursor: zoom-in;
  overflow: hidden;
  z-index: 1;
}

.project-card__trigger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--teal);
}

.project-card__trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s var(--ease-standard);
}

.project-card__trigger:hover img {
  transform: scale(1.04);
}

.project-card__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(3, 3, 3, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card__zoom svg {
  width: 16px;
  height: 16px;
}

.project-card__trigger:hover .project-card__zoom,
.project-card__trigger:focus-visible .project-card__zoom {
  opacity: 1;
}

.project-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.4rem 1.5rem;
}

.project-card__body h3 {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.project-card__body p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  list-style: none;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: auto;
  margin-bottom: 0 !important;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.tech-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.project-card--link {
  padding: 0;
}

.project-card__github {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: var(--text);
}

.project-card__github-visual {
  aspect-ratio: 4 / 2.5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}

.project-card__github-visual svg {
  width: 40px;
  height: 40px;
  color: var(--text-soft);
  transition: color 0.25s ease, transform 0.25s var(--ease-standard);
}

.project-card--link:hover .project-card__github-visual svg {
  color: var(--teal);
  transform: translateY(-3px);
}

.project-card__github-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.4rem 1.5rem;
}

.project-card__github-body h3 {
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.project-card__github-body p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.project-card__github-body .project-card__tech {
  color: var(--text-muted);
}

/* -------------------------------------------------------- */
/* Lightbox                                                     */
/* -------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 3, 0.85);
  backdrop-filter: blur(4px);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: lightboxIn 0.25s var(--ease-standard);
}

@keyframes lightboxIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox__close:hover {
  background: #24242a;
}

.lightbox__image {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #050505;
}

.lightbox__body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.lightbox__body h3 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.lightbox__body p:not(.lightbox__tech) {
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.lightbox__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  list-style: none;
  padding: 0;
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
}

.lightbox__tech .tech-badge svg {
  width: 20px;
  height: 20px;
}

/* -------------------------------------------------------- */
/* Contact                                                      */
/* -------------------------------------------------------- */
.contact__intro {
  color: var(--text-soft);
  max-width: 60ch;
}

.contact__alt {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  max-width: 640px;
}

.contact__link {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  transition: transform 0.25s var(--ease-standard), border-color 0.25s ease;
}

.contact__link:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.contact__link-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

@media (max-width: 600px) {
  .contact__alt {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------- */
/* Footer                                                       */
/* -------------------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--text-muted);
}

.footer__cookie-link {
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.footer__cookie-link:hover {
  color: var(--text);
}

/* -------------------------------------------------------- */
/* Cookie consent banner                                        */
/* -------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__panel {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  animation: cookieIn 0.3s var(--ease-standard);
}

@keyframes cookieIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.cookie-banner__text {
  flex: 1 1 320px;
  color: var(--text-soft);
  font-size: 0.88rem;
  margin: 0;
}

.cookie-banner__text a {
  color: var(--teal);
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner__actions .btn {
  padding: 0.65rem 1.3rem;
  font-size: 0.88rem;
}

@media (max-width: 600px) {
  .cookie-banner__panel {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__actions {
    justify-content: flex-end;
  }
}

/* -------------------------------------------------------- */
/* Mobile nav                                                   */
/* -------------------------------------------------------- */
@media (max-width: 760px) {
  .nav__toggle {
    display: flex;
  }

  .nav__list {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s var(--ease-standard), opacity 0.3s ease;
  }

  .nav__list.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav__list li {
    width: 100%;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav__list li:last-child {
    border-bottom: none;
    padding-top: 1rem;
  }

  .nav__cta {
    display: inline-block;
  }

  .nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* -------------------------------------------------------- */
/* Reduced motion: turn off transforms, keep simple fades       */
/* -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal .card,
  .reveal .project-card {
    transform: none !important;
  }

  .scroll-cue span {
    animation: none;
  }
}

html.no-motion .reveal,
html.no-motion .reveal .card,
html.no-motion .reveal .project-card {
  transform: none !important;
  transition-duration: 0.2s !important;
}