:root {
  --bg: #f5f5f5;
  --text: #0a0a0a;
  --muted: #606060;
  --line: var(--text);
  --surface: var(--bg);
  --focus: var(--text);
  --accent-gradient: linear-gradient(90deg, #7ab6ff 0%, #b894ff 45%, #ff8ccf 100%);
  --container: 1100px;
  --gap: 16px;
  --nav-h: 64px;
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
  --border-thick: 4px solid var(--text);
  --shadow-flat: 4px 4px 0 var(--text);
  --active-bg: #00000020;
  --cta-bg: var(--text);
  --cta-text: var(--white);
  --cta-accent: var(--accent-gradient);
  --cta-btn-text: transparent;
  --cta-btn-bg: var(--white);
  --cta-btn-border-image: var(--accent-gradient);
  --white: #ffffff;
  --black: #000000;
}

:root[data-theme="dark"] {
  --bg: #0d0f10;
  --text: #f6f9fb;
  --muted: #7e8486;
  --line: #98a1a6;
  --surface: #0b0c0d;
  --focus: #9bd9ff;
  --accent-gradient: linear-gradient(90deg, #2a5fd6 0%, #9c79f6 45%, #ff6ba8 100%);
  --cta-bg: var(--white);
  --cta-text: var(--black);
  --cta-btn-bg: var(--black);
  --text-rgb: 246, 249, 251;
  --cta-btn-text: var(--white);
  --active-bg: rgba(var(--text-rgb), 0.125);
}

.hidden {
  display: none;
}

/* Utility classes */
.mt-32 { margin-top: 32px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-32 { gap: 32px; }
.gap-18 { gap: 18px; }
.justify-start { justify-content: flex-start; }
.text-muted { color: var(--muted); }

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  position: relative;
  padding-top: 0; 
  overflow-wrap: break-word;
}

.nav__links a:hover {
  text-decoration: none;
}

input, textarea, select, [contenteditable] {
  cursor: text;
}

a {
  color: inherit;
  text-decoration: none;
  font-size: 16px;
}

a:hover {
  text-decoration: underline;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  border: 1px solid var(--line);
  z-index: 20000;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  outline: none;
}


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

h1 {
  margin-bottom: 32px;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 10px;
}

button:hover {
  background: var(--surface);
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.muted {
  color: var(--muted);
}

h1, h2, h3 {
  margin: 0 0 8px 0;
  font-family: var(--font-pixel);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
}

h1 {
  font-family: var(--font-pixel);
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 18px 0;
  line-height: 1.2;
  color: var(--text);
}

h2 {
  font-family: var(--font-pixel);
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 14px 0;
  line-height: 1.25;
  color: var(--text);
}

h3 {
  font-family: var(--font-pixel);
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 10px 0;
  line-height: 1.3;
  color: var(--text);
}

p {
  margin: 0 0 18px 0;
  font-size: 24px;
  color: var(--text);
}


.theme-toggle[aria-pressed="true"] {
  background: var(--bg);
}


.theme-toggle #theme-toggle-label {
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline;
  color: var(--text);
  opacity: 1;
  position: static;
}

/* Section styles */
.section {
  min-height: 100vh;
  border-bottom: var(--border-thick);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section[aria-labelledby="commissions"],
.section[aria-labelledby="personal"] {
  height: auto;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section:not(.hero) {
  padding-top: calc(56px + var(--nav-h));
} 

.section:last-of-type {
  border-bottom: none;
}

.section--full {
  min-height: calc(100vh - var(--nav-h));
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

.section > .container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  justify-content: center;
}

.section__more {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding: 24px 0 32px;
}

.notable__trailer .section__more {
  padding: 8px 0 0;
  margin-top: 12px;
}

.section__head {
  margin-bottom: 18px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section__head--row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
}

.notable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 0;
}

.notable__copy {
  text-align: center;
  max-width: 700px;
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  padding: 24px;
  background: transparent;
}

.notable__trailer {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.trailer {
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  background: var(--surface);
  overflow: hidden;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.trailer__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  margin: 0 auto;
}

.strengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.strength {
  border: 4px solid #777;
  padding: 24px;
  background: transparent;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.strength__icon {
  font-size: 64px;
  margin-bottom: 24px;
  width: 64px;
  height: 64px;
  display: inline-block;
  object-fit: contain;
}

.strength__label {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
}

.about-layout__text {
  max-width: 680px;
}

.about-layout__text h1 {
  font-size: clamp(24px, 6vw, 40px);
  margin-bottom: 12px;
}

.about-layout__text p {
  margin-bottom: 16px;
  color: var(--muted);
}

.about-layout__aside {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-layout__img {
  width: 100%;
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  display: block;
}

.project__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.project__left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project__cover {
  width: 100%;
  height: auto;
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  display: block;
  max-width: 100%;
}

.project__right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project__top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project__desc {
  color: var(--muted);
  line-height: 1.6;
}

.tracks {
  width: 100%;
  border-collapse: collapse;
}

.tracks th, .tracks td {
  text-align: left;
  padding: 8px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.section__head h1 {
  font-size: clamp(24px, 5vw, 32px);
  margin-bottom: 6px;
}

.section__head h2 {
  font-size: clamp(16px, 3.5vw, 24px);
  margin-bottom: 6px;
}

#projects-grid .card {
  aspect-ratio: 1 / 1;
}

#projects-grid .card__overlay {
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
}

#projects-grid .card__meta {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 240ms ease;
  text-align: left;
  width: 100%;
}

#projects-grid .card:hover .card__meta {
  opacity: 1;
  transform: translateY(0);
  color: #ffffff;
}

.card__title {
  font-size: 16px;
  background: transparent;
  display: block;
  text-align: left;
  align-self: flex-end;
  color: #ffffff;
  font-weight: 400;
}

.card__title .letter {
  color: inherit;
  font-weight: inherit;
}

/* About page layout */
.about-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-layout__img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
  margin: 0 auto;
}

.about-layout__description p {
  margin: 0 0 16px 0;
}

.about-layout__description p:last-child {
  margin-bottom: 0;
}

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
  border-bottom: var(--border-thick);
  background: var(--bg);
}

.hero__bgimg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40vw;
  max-width: 540px;
  min-width: 180px;
  opacity: 1;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.hero__squares {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero__square { position: absolute; will-change: transform; }

.hero__square img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: hero-float 6s cubic-bezier(0.22,1,0.36,1) infinite alternate;
}

@keyframes hero-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-28px); }
}

.hero__image {
  position: absolute;
  right: 200px;
  top: 50%;
  transform: translateY(-50%);
  height: 70%;
  max-height: 700px;
  width: auto;
  pointer-events: none;
  display: block;
  z-index: 0;
  margin-right: 32px;
}

.hero > .container { position: relative; z-index: 2; text-align: center; }

.hero__name {
  font-size: clamp(32px, 6vw, 72px);
  margin-bottom: 8px;
  letter-spacing: -2px;
}

.hero__title {
  font-size: clamp(24px, 3vw, 32px);
  color: var(--muted);
  margin: 0;
}

.hero__title .section-letter {
  display: inline-block;
  color: inherit;
  animation: nav-float 2.4s ease-in-out infinite, nav-color-cycle 2s linear infinite;
  animation-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 120ms);
  animation-fill-mode: both;
  will-change: transform, color;
}

.hero__title .section-letter:nth-child(3n+1) { color: #7ab6ff; }
.hero__title .section-letter:nth-child(3n+2) { color: #b894ff; }
.hero__title .section-letter:nth-child(3n) { color: #ff8ccf; }

.project-detail-split {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 10px;
  align-items: flex-start;
}

.project-detail-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: 15px;
}

.project-detail-image {
  width: 100%;
  max-width: 320px;
  border-radius: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: var(--pixel-bg);
}

.project-detail-right {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: var(--border-thick);
  padding: 15px;
  height: 100%;
}

.project-hero__inner, .project-hero__inner.no-banner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: none;
  padding: 48px 0 0 0;
}

.project-hero__title-col {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.project-hero__title {
  font-family: var(--font-pixel);
  font-size: 32px;
  margin: 0;
  line-height: 1.05;
  overflow-wrap: break-word;
  hyphens: none;
}

.accentuation-title .section-letter {
  display: inline-block;
  animation: nav-float 2.4s ease-in-out infinite, nav-color-cycle 2s linear infinite;
  animation-delay: calc(var(--i, 0) * 40ms), calc(var(--i, 0) * 60ms);
  animation-fill-mode: both;
  will-change: transform, color;
}

.accentuation-title .section-letter:nth-child(3n+1) {
  color: #7ab6ff;
}

.accentuation-title .section-letter:nth-child(3n+2) {
  color: #b894ff;
}

.accentuation-title .section-letter:nth-child(3n) {
  color: #ff8ccf;
}

.accentuation-title .section-word {
  white-space: nowrap;
}

.project-hero__right-col {
  color: var(--text);
}

.project-hero__desc {
  color: var(--text);
  font-family: var(--font-body);
  max-width: 100%;
  overflow-wrap: break-word;
}

.project-hero__video {
  margin-top: 18px;
}

.project-hero__video .project__video .video__wrap {
  border-radius: 6px;
  overflow: hidden;
}

.project-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.project-desc {
  text-align: center;
  margin-top: 24px;
}

.project-content {
  display: block;
  padding: 48px 0;
}

.content-full {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tracklist-card {
  width: 100%;
}

.tracklist-card--full {
  width: 100%;
}

.project__player {
  position: static;
  top: auto;
  padding-top: 12px;
  background: transparent;
}

.project__player--full {
  width: 100%;
}

.player__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.player__track {
  text-align: center;
  margin: 6px 0 8px 0;
  font-weight: 400;
}
.player__timeline {
  height: 20px;
  background: var(--active-bg);
  border: var(--border-thick);
  position: relative;
  overflow: hidden;
  border-radius: 0;
}
.player__elapsed {
  height: 100%;
  background-image: var(--accent-gradient);
  width: 0%;
  transition: width 100ms linear;
}

/* Player times below timeline */
.player__track {
  text-align: left;
  margin: 6px 0 8px 0;
  font-weight: 400;
  padding-left: 12px;
}

/* Player times below timeline */
.player__times {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding-left: 12px;
}
.player__time {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-body);
}
.player__time-sep { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  align-items: start;
}

/* Ensure cards fill their grid cells and remain square */
#personal-grid, #commissions-grid, #projects-grid {
  gap: 6px;
}

#personal-grid .card, #commissions-grid .card, #projects-grid .card {
  border: none;
  box-shadow: none;
}

.card {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255,255,255,0.85);
  background: var(--surface);
  overflow: hidden;
}
.card .card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keyboard accessibility for cards */
.card:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.card:focus .card__meta,
.card:focus-within .card__meta {
  opacity: 1;
  transform: translateY(0);
}
.card:focus .card__title .letter {
  opacity: 1;
  transform: translateY(0);
}

.card.placeholder {
  background: var(--active-bg);
  cursor: default;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  transition: background 300ms ease;
}

.card__meta {
  width: 100%;
  opacity: 0;
  transition: opacity 200ms ease;
}

.card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  color: #ffffff;
}

.card__title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 280ms ease, transform 380ms cubic-bezier(0.68,-0.55,0.265,1.55);
  transition-delay: calc(var(--i, 0) * 15ms);
  white-space: nowrap;
}

.card__title .word {
  white-space: nowrap;
}

.card__creator {
  margin: 4px 0 0 0;
  font-size: 16px;
  color: #ffffff;
  opacity: 0.9;
  display: none;
}

.card:hover .card__img {
  filter: brightness(0.5);
  transition: filter 200ms ease;
}

.card:hover .card__meta {
  opacity: 1;
  color: #ffffff;
}

.card:hover .card__title .letter {
  opacity: 1;
  transform: translateY(0);
}

.project__video .video__wrap {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
}

.project__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.tracklist-card {
  border: var(--border-thick);
  padding: 12px;
  box-shadow: var(--shadow-flat);
  background: var(--surface);
}

.tracklist-card__title {
  font-family: var(--font-pixel);
  font-size: 16px;
  margin: 0 0 8px 0;
}

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

.track {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  box-shadow: none;
  position: relative;
}

/* Ensure the track title fills available space and the duration sticks to the right */
.track-title {
  flex: 1 1 auto;
  min-width: 0; /* allow truncation */
}

.track-duration {
  margin-left: auto;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
}

.track.active {
  background: var(--active-bg);
  transition: background 160ms ease;
}

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  background: var(--surface);
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
}

#theme-toggle {
  width: 44px;
  height: 44px;
}

.iconbtn > img,
.iconbtn > svg,
.iconbtn > i {
  display: inline-block;
  height: 1.2em;
  width: auto;
  max-width: none;
  object-fit: contain;
  line-height: 1;
}
.iconbtn > img {
  display: inline-block;
}

.iconbtn:hover {
  background: var(--surface);
  text-decoration: none;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
} 

.theme-toggle {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 12050;
  padding: 6px;
  font-size: 10px;
  font-family: var(--font-pixel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  border: var(--border-thick);
  box-shadow: none;
  background: var(--bg);
  color: var(--text);
  transition: background 120ms ease, transform 160ms cubic-bezier(0.2, 0.9, 0.2, 1);
  transform-origin: center;
}

.theme-toggle:hover,
.theme-toggle:focus {
  transform: translateY(-5px) scale(1.15);
}

.theme-toggle i {
  font-size: 32px;
  line-height: 1;
  display: inline-block;
}

.theme-toggle img,
.theme-toggle svg {
  height: 24px;
  display: block;
  object-fit: contain;
  max-width: 100%;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:root[data-theme="dark"] .theme-toggle {
  background: var(--surface);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  font-family: var(--font-pixel);
  font-size: 16px;
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  background: transparent;
}

.btn:hover {
  background: var(--surface);
  text-decoration: none;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
} 

.btn--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 400;
}

.btn--primary:hover {
  background-color: var(--text);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--text);
} 

.cta-banner {
  background: var(--cta-bg);
  padding: 72px 0;
  text-align: center;
}

.cta-banner .container {
  text-align: center;
  margin-top: 2rem;
}

.cta-banner h2 {
  color: var(--cta-text);
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 400;
}

.cta-banner .btn--cta {
  background: var(--cta-bg);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: var(--cta-accent);
  border: 2px solid;
  border-image: var(--cta-btn-border-image) 1;
  box-shadow: none;
  transition: transform 0.2s;
  margin-top: 1rem;
}

.cta-banner .btn--cta:hover {
  transform: scale(1.08);
}

html[data-theme="dark"] .cta-banner {
  background: var(--cta-bg);
}

html[data-theme="dark"] .cta-banner h2 {
  color: var(--cta-text);
} 

.contact-info-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin: 32px 0 0 0;
}

.contact-info-row > div {
  min-width: 44px;
  min-height: 44px;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
  color: var(--text);
  line-height: 1.5;
  font-size: 24px;
}

.contact-info-row strong {
  color: var(--muted);
  font-size: 16px;
}

.contact-info-row a {
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
  font-size: inherit;
}

.contact-info-row a:hover {
  text-decoration: underline;
}

.contact-email {
  background-image: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-bottom: 0;
}

a[href^="tel:"] {
  color: var(--text);
  text-decoration: none;
  background-image: none;
  -webkit-text-fill-color: var(--text);
  padding-bottom: 0;
}

a[href^="tel:"]:hover {
  text-decoration: underline;
}

.contact-main {
  max-width: 700px;
  margin: 0 auto;
}

.contact-social {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin-top: 32px;
}

.contact-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  padding: 4px 8px;
  min-width: 32px;
  min-height: 32px;
  white-space: nowrap;
  background: var(--bg);
  border: var(--border-thick);
  box-shadow: var(--shadow-flat);
  outline: none;
}

.contact-social-btn:focus,
.contact-social-btn:active {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.contact-social-btn i {
  font-size: 18px;
  display: inline-block;
}

.contact-social-label {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-left: 8px;
  display: inline-block;
}

.strength__desc {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  pointer-events: none;
  font-family: inherit;
}

.crt-overlay > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.crt-scanlines {
  background-image: repeating-linear-gradient(rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.08) 2px 4px);
  background-size: 100% 8px;
  opacity: 0.6;
  animation: scan 1.6s linear infinite;
  mix-blend-mode: multiply;
  will-change: background-position;
  background-repeat: repeat;
}

@keyframes scan {
  0% { background-position: 0 0; }
  100% { background-position: 0 8px; }
}

.crt-flicker {
  background: radial-gradient(ellipse at 10% 10%, rgba(255,255,255,0.02), transparent 10%), radial-gradient(ellipse at 90% 90%, rgba(255,255,255,0.02), transparent 10%);
  opacity: 0.06;
  animation: flicker 3s infinite;
}

@keyframes flicker {
  0% { opacity: 0.04; }
  5% { opacity: 0.09; }
  10% { opacity: 0.03; }
  20% { opacity: 0.06; }
  100% { opacity: 0.04; }
}

.crt-chroma {
  mix-blend-mode: screen;
  opacity: 0.12;
}

.crt-chroma::before,
.crt-chroma::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.crt-chroma::after {
  transform: translateX(1px) translateY(0);
  background: rgba(0,150,255,0.03);
  animation: chroma 4s ease-in-out infinite reverse;
}

.crt-chroma::before {
  transform: translateX(-1px) translateY(0);
  background: rgba(255,0,0,0.03);
  animation: chroma 4s ease-in-out infinite;
}

@keyframes chroma {
  0% { transform: translateX(-1px) translateY(0); }
  50% { transform: translateX(-2px) translateY(0.5px); }
  100% { transform: translateX(-1px) translateY(0); }
}

.crt-vignette {
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,0.5) 100%);
  opacity: 0.35;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.crt-noise {
  background-image: linear-gradient(0deg, rgba(255,255,255,0.01) 0%, rgba(0,0,0,0.01) 100%);
  opacity: 0.03;
  animation: noise 0.2s steps(2) infinite;
  mix-blend-mode: overlay;
}

@keyframes noise {
  0% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

.crt-wipe {
  position: absolute;
  left: 0;
  width: 100%;
  height: 18%;
  top: -25%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
  background: linear-gradient(to bottom, rgba(255,255,255,0.0) 0%, rgba(255,255,255,0.18) 30%, rgba(255,255,255,0.36) 50%, rgba(255,255,255,0.12) 70%, rgba(255,255,255,0.0) 100%);
  transform: translateY(-150%);
}

.crt-wipe.active {
  animation: crt-wipe 1.4s linear forwards;
}

@keyframes crt-wipe {
  0% { transform: translateY(-150%); opacity: 0; }
  10% { opacity: 0.85; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.crt-overlay--reduced {
  opacity: 0.6;
}

.crt-disabled {
  display: none !important;
}

.footer {
  border-top: var(--border-thick);
  padding: 80px 0;
  min-height: 260px;
  background: var(--bg);
  font-size: 24px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}

.footer__brand {
  font-family: var(--font-pixel);
  font-weight: 800;
  margin-bottom: 0.5rem;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.3;
  text-transform: none;
}

.footer__title {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 16px;
}

.footer a {
  display: block;
  padding: 8px 0;
  font-size: 16px;
}

.footer a:hover {
  text-decoration: underline;
}

.footer a[href^="mailto:"]:hover,
.footer a[href^="mailto:"]:focus {
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.footer__bottom {
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-top: var(--border-thick);
  gap: 12px;
}

.footer__author {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}

.footer__made {
  font-size: 16px;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}

.footer__author:hover {
  text-decoration: underline;
}  

/* Header */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--bg);
  border-bottom: var(--border-thick);
  box-shadow: none;
}

.nav {
  width: 100%;
  height: var(--nav-h);
  background: var(--bg);
  color: var(--text);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Animations */
.nav-letter {
  display: inline-block;
  transform: translateY(0);
  color: inherit;
  -webkit-text-fill-color: inherit;
}

.is-active .nav-letter {
  animation: nav-float 2.4s ease-in-out infinite, nav-color-cycle 2s linear infinite;
  animation-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 120ms);
  animation-fill-mode: both;
  will-change: transform, color;
}

.is-active .nav-letter:nth-child(3n+1) {
  color: #7ab6ff;
}

.is-active .nav-letter:nth-child(3n+2) {
  color: #b894ff;
}

.is-active .nav-letter:nth-child(3n) {
  color: #ff8ccf;
}

@keyframes nav-color-cycle {
  0% { color: #7ab6ff; }
  33% { color: #b894ff; }
  66% { color: #ff8ccf; }
  100% { color: #7ab6ff; }
}

@keyframes nav-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Section Headers */
.section__head h2 {
  font-family: var(--font-pixel);
  text-align: center;
}

.section__head h2 .section-letter {
  display: inline-block;
  color: inherit;
}

.section.is-active .section__head h2 .section-letter {
  animation: nav-float 2.4s ease-in-out infinite, nav-color-cycle 2s linear infinite;
  animation-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 120ms);
  animation-fill-mode: both;
  will-change: transform, color;
}

.section.is-active .section__head h2 .section-letter:nth-child(3n+1) { color: #7ab6ff; }
.section.is-active .section__head h2 .section-letter:nth-child(3n+2) { color: #b894ff; }
.section.is-active .section__head h2 .section-letter:nth-child(3n) { color: #ff8ccf; }

/* Nav Links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__links a,
.nav__dropbtn {
  border: 0;
  display: inline-flex;
  align-items: center;
  height: var(--nav-h);
  max-height: fit-content;
  padding: 0 10px;
  font-family: var(--font-pixel);
  font-size: 18px;
  text-decoration: none;
  text-transform: uppercase;
}

.nav__links a .word {
  display: inline-block;
  white-space: nowrap;
}
.nav__main-menu a .word,
.nav__projects-menu a .word,
.nav__submenu a .word,
.nav__mobile-menu a .word,
.nav__links a .nav-word,
.nav__main-menu a .nav-word,
.nav__projects-menu a .nav-word,
.nav__submenu a .nav-word,
.nav__mobile-menu a .nav-word {
  display: inline-block;
  white-space: nowrap;
}

.nav__projects-label {
  text-transform: capitalize;
}

.nav__links a:hover {
  text-decoration: none;
}

.nav__dropbtn {
  gap: 8px;
  background: transparent;
  outline: none;
}

.nav__dropbtn:hover {
  background: transparent;
}

.nav__dropbtn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.nav__dropbtn[aria-expanded="true"] i {
  transform: rotate(180deg);
  transition: transform 180ms ease;
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.nav__submenu {
  display: none;
  position: absolute;
  top: calc(100% + 20px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--text);
  padding: 4px 0;
  width: max-content;
  z-index: 10001;
  outline: var(--border-thick);
  box-shadow: var(--shadow-flat);
}

.nav__submenu a {
  display: block;
  padding: 4px 12px;
  color: var(--text);
  text-decoration: none;
  text-transform: capitalize;
  white-space: nowrap;
}

/* Contact Button */
.btn--primary[href="contact.html"] {
  height: 36px;
  padding: 0 16px;
  font-size: 16px;
  min-width: 80px;
  margin-left: 16px;
}

/* Social Row */
.nav__social-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Nav Right */
.nav__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Extras */
.nav__mobile-extras {
  display: none;
}

/* Legal page: minimal, harmonious styles */
.legal-page {
  max-width: 780px;
  margin: 32px auto;
  padding: 28px;
  border: var(--border-thick);
  background: var(--surface);
  box-shadow: var(--shadow-flat);
}
.legal-page h1 {
  font-size: 36px;
  margin-bottom: 8px;
  color: var(--text);
}
.legal-card {
  margin-top: 18px;
  color: var(--text);
  line-height: 1.6;
}
.legal-card h2 {
  font-family: var(--font-pixel);
  font-size: 18px;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}
.legal-card p { margin: 0 0 12px 0; }

/* Button-specific rules removed: rely on .iconbtn base styles for all buttons */
