/* ========================================= */
/* CSS VARIABLES - COLOR THEME ONLY         */
/* ========================================= */

:root {
  --bg-body: #ffffff;
  --bg-section: #ffffff;
  --bg-elevated: #f5f5f5;

  --font-mono: "JetBrains Mono", monospace;

  --text-main: #111111;
  --text-muted: #555555;

  --border-subtle: #e5e5e5;
  --border-strong: #cccccc;

  --card-bg: #ffffff;
  --card-border: #e5e5e5;

  --primary: #000000;
  --accent: #000000;

  --nav-height: 64px;
  --footer-height: 57px;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(0, 0, 0, 0.08);
}

/* ========================================= */
/* PAGE LAYOUT – HERO + FOOTER VISIBLE       */
/* ========================================= */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.about-section,
.skills-section,
.projects-section,
.contact-section {
  min-height: auto;
  display: block;
  align-items: center;
}

/* ========================================= */
/* THEME TRANSITION OVERLAY                  */
/* ========================================= */
body {
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

.site-nav,
.section,
.project-row,
.footer,
.card {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

#theme-transition {
  position: fixed;
  inset: 0;
  background: var(--bg-body);
  pointer-events: none;
  z-index: 9999;
  clip-path: circle(0px at var(--wipe-x, 50%) var(--wipe-y, 50%));
  will-change: clip-path;
}

/* ========================================= */
/* GLOBAL SECTION LAYOUT (SINGLE SOURCE)     */
/* ========================================= */

main {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

main.page-exit {
  opacity: 0;
  transform: translateY(12px);
}

main.page-enter {
  opacity: 0;
  transform: translateY(18px);
}

main {
  overflow: visible;
}

main > section:not(.hero-section) {
  margin-top: 70px;
  padding-bottom: 80px;
}

section {
  transform: translateZ(0);
}

html {
  scroll-behavior: smooth;
}

.section:not(.hero-section) {
  margin-top: 120px;
  padding: 96px 0;
  background: var(--bg-section);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-header {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-main);
  margin: 0;
}

.section-title::after {
  content: "";
  display: block;
  width: 55px;
  height: 3.5px;
  background: var(--text-main);
  margin-top: 6px;
}

.section-subtitle {
  margin-top: 20px;
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.projects-section,
.contact-section,
.skills-section,
.about-section {
  padding: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  will-change: opacity, transform;

  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-group > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-group.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group.visible > *:nth-child(1) {
  transition-delay: 80ms;
}
.reveal-group.visible > *:nth-child(2) {
  transition-delay: 140ms;
}
.reveal-group.visible > *:nth-child(3) {
  transition-delay: 200ms;
}
.reveal-group.visible > *:nth-child(4) {
  transition-delay: 260ms;
}
.reveal-group.visible > *:nth-child(5) {
  transition-delay: 320ms;
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .section-title {
    font-size: 2.2rem;
  }
  main > section:first-of-type {
    margin-top: 64px;
  }

  main > section {
    margin-bottom: 96px;
  }

  .section-title {
    margin-bottom: 32px;
  }

  main > section:last-of-type {
    margin-bottom: 120px;
  }
}

/* ========================================= */
/* BASE STYLES                               */
/* ========================================= */

body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: var(--bg-body);
  color: var(--text-main);
  cursor: default;

  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

code,
pre {
  font-family: "JetBrains Mono", monospace;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

::selection {
  background: rgba(129, 140, 248, 0.25);
  color: #fff;
}

a,
button,
.contact-btn,
.project-links a {
  cursor: pointer;
}

input,
textarea {
  cursor: text;
}

a:hover,
button:hover {
  cursor: pointer;
}

.btn-primary,
.btn-outline-light {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-outline-light:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
}

a,
button,
.project-card {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}
/* =============================== */
/* FOOTER MUSIC PILL + PICKER     */
/* =============================== */

.music-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.music-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.music-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.music-pill.playing {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-elevated));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
  animation: pillPulse 2.4s ease-in-out infinite;
}

.music-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.music-play {
  font-size: 9px;
  line-height: 1;
  color: var(--text-muted);
}

.music-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.music-pill.playing .music-play {
  display: none;
}

.music-pill.playing .music-eq {
  display: inline-flex;
}

.music-eq span {
  width: 3px;
  height: 5px;
  background: var(--accent);
  border-radius: 1px;
  transform-origin: bottom;
}

.music-pill.playing .music-eq span {
  animation: eqBounce 0.9s infinite ease-in-out;
}

.music-pill.playing .music-eq span:nth-child(1) { animation-delay: 0s; }
.music-pill.playing .music-eq span:nth-child(2) { animation-delay: 0.15s; }
.music-pill.playing .music-eq span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pillPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
  50% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-pill.playing {
    animation: none;
  }
  .music-pill.playing .music-eq span {
    animation: none;
  }
}

/* Panel popover */
.music-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  width: 280px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.music-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.music-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.music-option:hover {
  background: var(--card-bg);
}

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

.music-option[aria-checked="true"] {
  background: var(--card-bg);
}

.music-option[aria-checked="true"] .music-option-name::after {
  content: " · playing";
  color: var(--text-muted);
  font-weight: 400;
}

.music-option-icon {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-main);
}

.music-option-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0 auto;
}

.music-option[aria-checked="true"] .music-option-icon {
  color: var(--accent);
}

.music-option-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.music-option-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.music-option-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.music-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--border-subtle);
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 4px;
}

.music-volume-icon {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.music-volume input[type="range"] {
  flex: 1;
  height: 4px;
  accent-color: var(--text-main);
  cursor: pointer;
}

.music-volume input[type="range"]:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
}

/* REACTIVE ONEKO CAT (sprite-based, forked from adryd325/oneko.js) */
#oneko {
  position: fixed;
  right: 240px;
  left: auto;
  bottom: calc(var(--footer-height) + 0px);
  width: 48px;
  height: 48px;
  z-index: 1001;
  pointer-events: auto;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)) sepia(0.22) saturate(1.45) hue-rotate(-4deg) brightness(1.05);
}

/* zzz particles are disabled (cat is static / no motion) */
#oneko-zzz {
  display: none;
}

/* thought/state bubble above the cat */
#oneko-purr {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  padding: 5px 10px;
  background: #20242e; /* dark cloud for the light (white) theme */
  color: #f6f6f6;
  border: 1px solid #3a3f4b;
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

/* little tail pointing down toward the cat */
#oneko-purr::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -6px;
  width: 0;
  height: 0;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #20242e transparent transparent transparent;
}

/* show on hover (purr) and while a state cloud is active */
#oneko:hover #oneko-purr,
#oneko.cloud-show #oneko-purr {
  display: block;
}

/* weeping tear, shown only while sleeping */
#oneko-tear {
  position: absolute;
  top: 36%;
  left: 44%;
  width: 4px;
  height: 6px;
  background: #6cb8ff;
  border-radius: 0 70% 70% 70%;
  display: none;
  pointer-events: none;
  animation: onekoWeep 1.6s ease-in infinite;
}
#oneko.sleeping #oneko-tear {
  display: block;
}
@keyframes onekoWeep {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(9px) scale(1); opacity: 0; }
}

/* dark theme -> white cloud */
.dark #oneko-purr {
  background: #ffffff;
  color: #20242e;
  border-color: #d7d7d7;
}
.dark #oneko-purr::after {
  border-color: #ffffff transparent transparent transparent;
}

@media (max-width: 768px) {
  #oneko {
    position: fixed;
    right: auto;
    bottom: auto;
    width: 38px;
    height: 38px;
    z-index: 1002;
  }

  /* cloud flips below the cat so it isn't clipped under the navbar */
  #oneko-purr {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    bottom: auto;
  }

  #oneko-purr::after {
    top: -6px;
    bottom: auto;
    left: 12px;
    right: auto;
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent #20242e transparent;
  }

  .dark #oneko-purr::after {
    border-color: transparent transparent #ffffff transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  #oneko-purr {
    transition: none;
  }
  #oneko-tear {
    display: none !important;
  }
}

@keyframes eqBounce {
  0%,
  100% {
    height: 5px;
  }
  50% {
    height: 14px;
  }
}

.music-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================== */
/*        NAVBAR         */
/* ===================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-main);
  text-decoration: none;
}

.brand-dot {
  color: var(--primary);
  font-weight: 900;
}

/* Center links */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;

  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 0;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1.5px;
  background: var(--text-main);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Resume button */
.nav-resume-btn {
  height: 34px;
  padding: 0 16px;
  padding-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  background: white;
  color: black;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: background 0.2s ease;
}

.nav-resume-btn:hover {
  background: black;
  color: white;
}

/* Theme toggle */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none; /* hidden on desktop */
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text-main);
  border-radius: 2px;
  margin: 2.5px 0;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
}

.nav-music-toggle {
  display: none; /* hidden on desktop */
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
}
.nav-music-toggle svg {
  width: 22px;
  height: 22px;
}
.nav-music-toggle:hover {
  color: var(--accent);
}
.nav-music-toggle[aria-expanded="true"] {
  color: var(--accent);
}
.nav-music-toggle.playing {
  color: var(--accent);
  animation: musicPulse 1.15s ease-in-out infinite;
}
@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

.nav-music-popover {
  position: fixed;
  top: calc(var(--nav-height) + 8px);
  right: 12px;
  width: 290px;
  max-width: calc(100vw - 24px);
  z-index: 1003;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-elevated);
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.5);
  backdrop-filter: saturate(180%) blur(28px);
}
.nav-music-popover[hidden] {
  display: none;
}
html.dark .nav-music-popover {
  background: rgba(28, 28, 30, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.7);
}

/* Visibility helpers */
.desktop-only {
  display: flex;
}

.mobile-only {
  display: none !important;
}

/* Progress bar */
.nav-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.nav-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--text-main);
  transform-origin: left;
  transition: width 0.18s ease-out;
}

/* ========================================= */
/* HERO – CENTERED, CLEAN (FINAL)            */
/* ========================================= */

.hero-section {
  position: relative;
  overflow: hidden;
}

#network-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-section {
  flex: 1;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  padding: 0;
}

.hero-inner {
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-title {
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-typing {
  width: 100%;
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: left;
  display: inline-block;
}

#typing-text::after {
  content: "▍";
  margin-left: 2px;
  opacity: 0.5;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.glitch-final {
  color: #111111;
}

.glitch-scramble {
  color: #b5b5b5;
}

.hero-buttons {
  display: flex;
  justify-content: left;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: #111;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  background-color: #0073ff;
}

.hero-name {
  display: inline-block;
  font-family: inherit;
  letter-spacing: 0.5px;
}

.hero-name::after {
  margin-left: 2px;
  opacity: 0.5;
  animation: caretBlink 1.2s steps(1) infinite;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

/* ===================== */
/* ABOUT SECTION         */
/* ===================== */

.about-section {
  background: var(--bg-section);
}

.about-content {
  max-width: 820px;
  margin: 0 auto;
}

.about-eyebrow {
  margin-bottom: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.about-intro {
  max-width: 820px;
  margin-top: 36px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  text-align: justify;
}

.about-text {
  max-width: 680px;
  margin-top: 24px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.about-hero {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-top: 28px;
}

.about-hero-text {
  flex: 1;
  min-width: 0;
}

.about-hero-text .about-intro {
  margin-top: 0;
}

.about-photo-wrap {
  flex: 0 0 260px;
  max-width: 260px;
}

.about-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  transition: filter 0.35s ease;
}

html.dark .about-photo {
  filter: none;
}

@media (max-width: 768px) {
  .about-hero {
    flex-direction: column;
  }
  .about-photo-wrap {
    flex: 0 0 auto;
    max-width: 320px;
    width: 100%;
  }
}

.about-principle {
  max-width: 680px;
  margin-top: 32px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 1.6;
  color: var(--text-main);
  text-align: justify;
}

.career-wrapper {
  margin-top: 48px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 400ms ease,
    transform 400ms ease;
}

.career-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.career-divider {
  height: 1px;
  background: var(--border-subtle);
  margin-bottom: 48px;
}

.career-heading {
  position: relative;
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.career-heading::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--text-main);
  margin-top: 8px;
}

.career-tabs {
  position: relative;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}

.career-tab-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 999px;
  background: var(--text-main);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.career-tabs.is-experience .career-tab-thumb {
  transform: translateX(calc(100% + 4px));
}

.career-tab {
  position: relative;
  z-index: 1;
  padding: 8px 24px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.career-tab:hover {
  color: var(--text-main);
}

.career-tab.active {
  color: var(--bg-body);
}

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

.career-tab-panel {
  display: none;
}

.career-tab-panel.active {
  display: block;
}

.career-list {
  display: flex;
  flex-direction: column;
}

.career-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 32px;
  padding: 20px 22px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.career-item:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px -12px var(--border-strong);
}

.career-item:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.timeline-label {
  display: block;
  padding-top: 5px;
  font-size: 0.8rem;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.career-body {
  max-width: 640px;
}

.career-role {
  position: relative;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.career-item:hover .career-role {
  color: var(--accent);
  font-family: var(--font-mono);
}

.career-item:hover .career-role::before {
  content: "$ ";
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

.career-item:hover .timeline-label {
  color: var(--accent);
  font-family: var(--font-mono);
}

.career-item:hover .career-org {
  color: var(--accent);
  font-family: var(--font-mono);
}

.career-item:hover .career-bullets li {
  color: var(--accent);
  font-family: var(--font-mono);
}

.career-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.career-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.career-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.career-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background-color 0.2s ease;
}

.career-item:hover .career-bullets li::before {
  content: ">";
  width: auto;
  height: auto;
  top: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ========================================= */
/* EDUCATION                                 */
/* ========================================= */

.edu-timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 40px;
}

.edu-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-subtle);
}

.edu-timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.edu-timeline-item:last-child {
  padding-bottom: 0;
}

.edu-timeline-dot {
  position: absolute;
  left: -25px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-body);
  border: 2px solid var(--text-muted);
  box-shadow: 0 0 0 4px var(--bg-body);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.edu-timeline-item:hover .edu-timeline-dot {
  background: var(--text-main);
  border-color: var(--text-main);
}

.edu-card {
  padding-bottom: 28px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.edu-timeline-item:last-child .edu-card {
  border-bottom: 0;
  padding-bottom: 0;
}

.edu-btech-extra {
  margin-top: 20px;
  margin-left: 8px;
  padding-left: 16px;
}

.edu-btech-extra .term {
  padding: 0;
}

.edu-degree {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.edu-university {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.edu-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 24px;
}

.edu-detail {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.edu-detail-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.edu-detail-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.edu-section-block {
  margin-bottom: 40px;
}

.edu-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.edu-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.edu-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: background-color 0.2s ease;
}

.edu-tag:hover {
  color: var(--text-main);
}

.cert-link {
  padding: 7px 14px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
}

.cert-link::before {
  content: none;
}

.cert-link::after {
  content: "↗";
  margin-left: 8px;
  font-size: 0.8em;
  color: inherit;
}

.cert-link:hover,
.cert-link:hover::before,
.cert-link:hover::after {
  color: var(--bg-body);
  background: var(--accent);
}

/* ========================================= */
/* TERMINAL COMPONENT (shared)               */
/* ========================================= */

.term {
  padding: 4px 0;
}

.term + .term {
  margin-top: 32px;
}

.term-line {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}

.term-prompt {
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}

.term-cmd {
  color: var(--text-main);
  word-break: break-word;
}

.term-body {
  padding-left: 24px;
}

.term-body + .term-line {
  margin-top: 20px;
}

.term-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.term-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: 2px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.term-chip::before {
  content: "[";
  margin-right: 6px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.term-chip::after {
  content: "]";
  margin-left: 6px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.term-chip:hover,
.term-chip:hover::before,
.term-chip:hover::after {
  color: var(--bg-body);
  background: transparent;
}

.term-chip:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

a.term-chip {
  text-decoration: none;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  color: var(--text-main);
  background: #e9e9e9;
  border: 1px solid #b8b8b8;
  border-radius: 4px;
  padding: 5px 12px 5px 10px;
  box-shadow: none;
}

a.term-chip::before,
a.term-chip::after {
  color: var(--text-muted);
}

a.term-chip::after {
  content: "] ↗";
}

a.term-chip:hover,
a.term-chip:hover::before,
a.term-chip:hover::after {
  color: var(--bg-body);
  border-color: #6e6e6e;
}

a.term-chip:hover {
  background: #2b2b2b;
  transform: translateY(-1px);
  box-shadow: none;
}

html.dark a.term-chip {
  background: #2a2a2e;
  border-color: #4a4a52;
  color: #f0f0f0;
}

html.dark a.term-chip:hover {
  background: #f5f5f5;
  color: #111;
  border-color: #f5f5f5;
}

/* ========================================= */
/* SKILLS SECTION                            */
/* ========================================= */

.skills-section {
  display: block !important;
  background: var(--bg-section);
  scroll-margin-top: 96px;
  min-height: calc(100vh - var(--nav-height));
}

.skills-section .section-text,
.skills-content {
  max-width: 820px;
  margin-inline: auto;
}

/* ---- Core Stack Summary ---- */

.core-stack {
  margin-top: 48px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  background: transparent;
  border: 1px dashed var(--border-subtle);
  border-radius: 4px;

  transition:
    border-color 200ms ease,
    background-color 200ms ease;
}

.core-stack:has(.core-stack-label:hover) {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.core-stack:has(.core-stack-label:hover) .core-stack-icon img {
  filter: grayscale(0) opacity(1);
}

.core-stack-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.core-stack-sigil,
.skill-card-sigil {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  margin-right: 2px;
}

.core-stack-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.core-stack-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;

  transition:
    border-color 200ms ease,
    background-color 200ms ease;
}

.core-stack-icon img {
  width: 22px;
  height: 22px;
  filter: grayscale(1) opacity(0.75);
  transition: filter 200ms ease;
}

.core-stack-icon:hover {
  border-color: var(--border-strong);
  background: var(--card-bg);
}

.core-stack-icon:hover img {
  filter: grayscale(0.15) opacity(1);
}

/* ---- Category Cards ---- */

.skills-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-card {
  background: transparent;
  border: 1px dashed var(--border-subtle);
  border-radius: 2px;
  padding: 24px;

  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}

.skill-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.skill-card:hover .skill-card-label {
  color: var(--accent);
}

.skill-card-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  transition: color 200ms ease;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;

  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.skill-pill:hover {
  color: var(--text-main);
  border-color: var(--text-main);
  background: var(--card-bg);
}

.skill-pill.strong {
  color: var(--text-main);
  font-weight: 600;
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.skill-pill.strong::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.skill-pill.strong:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-body);
}

.skill-pill.strong:hover::before {
  background: var(--bg-body);
}

@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================= */
/* PROJECTS SECTION                          */
/* ========================================= */

.projects-section {
  padding-bottom: 120px;
}

.projects-section .section-text,
.projects-section .projects-grid {
  max-width: 820px;
  margin-inline: auto;
}

.projects-grid {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Card Shell ---- */

.project-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition:
    border-color 300ms ease,
    box-shadow 300ms ease,
    transform 300ms ease;
  opacity: 0;
  transform: translateY(8px);
}

.project-card.revealed {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 500ms ease,
    transform 500ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.project-card.revealed:hover {
  transform: translateY(-2px);
}

/* ---- Progress Indicator ---- */

.project-card-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 2;
}

.project-card-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--text-main);
  border-radius: 0 1px 1px 0;
  transition: width 350ms ease;
}

.project-card:hover .project-card-progress-fill,
.project-card.is-expanded .project-card-progress-fill {
  width: 100%;
}

/* ---- Card Header (Default State) ---- */

.project-card-header {
  padding: 28px 32px;
}

.project-card-number {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.project-card-content {
  display: flex;
  flex-direction: column;
}

.project-card-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.project-card-text {
  flex: 1;
  min-width: 0;
}

.project-card-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 6px;
}

.project-card-impact {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 500px;
}

.project-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  justify-content: flex-start;
  margin-top: 14px;
  margin-bottom: 16px;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 2px 4px;
  transition:
    color 200ms ease,
    background-color 200ms ease,
    transform 200ms ease;
}

.project-card:hover .project-badge,
.project-card.is-expanded .project-badge {
  color: var(--text-main);
}

.project-card:hover .project-badge:hover {
  color: var(--bg-body);
  background: var(--accent);
  transform: translateY(-1px);
}

/* ---- Toggle Arrow ---- */

.project-card-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color 250ms ease,
    border-color 250ms ease,
    background 250ms ease,
    transform 250ms ease;
}

.project-card-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.project-card.is-expanded .project-card-toggle {
  transform: rotate(180deg);
}

.project-card-toggle svg {
  width: 14px;
  height: 14px;
}

/* ---- Expanded State ---- */

.project-card-expanded {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 350ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 300ms ease;
}

.project-card.is-expanded .project-card-expanded {
  max-height: 800px;
  opacity: 1;
  transition:
    max-height 400ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 350ms ease 50ms;
}

.project-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  padding: 4px 0 28px;
}

.project-detail-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-detail-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

.project-detail-block p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-main);
  opacity: 0.85;
}

.project-detail-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-detail-block li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
  opacity: 0.85;
  padding-left: 14px;
  position: relative;
}

.project-detail-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.project-card-metric {
  font-weight: 500;
  opacity: 1 !important;
}

/* ---- Action Links ---- */

.project-card-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.project-action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  transition:
    color 250ms ease,
    border-color 250ms ease,
    background 250ms ease;
}

.project-action-link:hover {
  color: var(--bg-body);
  border-color: var(--accent);
  background: var(--accent);
}

.project-action-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
  .project-card-header {
    padding: 24px 20px;
  }

  .project-card-main {
    flex-direction: column;
    gap: 16px;
  }

  .project-card-badges {
    justify-content: flex-start;
  }

  .project-badge {
    flex: 0 0 auto;
  }

  .project-card-details {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-card-title {
    font-size: 1.25rem;
  }

  .project-card-actions {
    flex-direction: column;
  }

  .project-action-link {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .project-card-header {
    padding: 20px 16px;
  }

  .project-card-number {
    font-size: 0.7rem;
  }

  .project-card-title {
    font-size: 1.1rem;
  }

  .project-card-impact {
    font-size: 0.82rem;
  }
}

/* ========================================= */
/* CONTACT – CLEAN SINGLE PANEL              */
/* ========================================= */

.contact-section {
  background: var(--bg-section);
  padding: 0;
}

.contact-section .section-text {
  max-width: 860px;
  margin-inline: auto;
}

.contact-list {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 24px 0 0;
}

.contact-list a {
  font-size: 20px;
  color: var(--text-main);
  opacity: 0.85;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.contact-list a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.contact-grid {
  max-width: 860px;
  margin: 56px auto 0;
  display: block;
}

.contact-form-split {
  max-width: 520px;
  margin-left: 0;
  background: transparent;
  border: none;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-form-split .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form-split label {
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form-split input,
.contact-form-split textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-strong);
  padding: 12px 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-main);
}

.contact-form-split textarea {
  min-height: 120px;
  resize: none;
}

.contact-form-split input:focus,
.contact-form-split textarea:focus {
  outline: none;
  border-bottom-color: var(--text-main);
}

.contact-form-split .contact-btn {
  margin-top: 10px;
  align-self: flex-start;
  background: #000;
  color: #fff;
  padding: 14px 32px;
  font-size: 0.9rem;
  border-radius: 999px;
  border: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.contact-form-split .contact-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.contact-form-split .contact-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.contact-note {
  font-size: 0.85rem;
  margin-top: -6px;
}

/* ========================================= */
/* FOOTER - IDENTICAL SPACING               */
/* ========================================= */

.footer {
  position: sticky;
  bottom: 0;
  height: var(--footer-height);
  padding: 0;
  background: var(--bg-body);
  z-index: 999;
}

.footer .container {
  padding-top: 0;
  padding-bottom: 0;
}

.footer-inner {
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-left p {
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--text-muted);
}

.footer-dot {
  margin: 0 6px;
  color: var(--primary);
}

.footer-right {
  display: flex;
  gap: 22px;
}

.footer-right a {
  font-size: 0.85rem;
  color: rgb(0, 0, 0);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.footer-right a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.2s ease;
}

.footer-right a:hover::after {
  width: 100%;
}

/* ========================================= */
/* MOBILE RESPONSIVE – GLOBAL (≤ 768px)      */
/* ========================================= */

@media (max-width: 768px) {
  /* ---------- GLOBAL ---------- */
  .section-inner {
    padding: 0 20px;
  }

  main > section:not(.hero-section) {
    margin-top: 96px;
    padding-bottom: 64px;
  }

  .section-title {
    font-size: 2rem;
    letter-spacing: 1.4px;
  }

  .section-title::after {
    width: 40px;
    height: 3px;
  }

  .section-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* ---------- NAVBAR ---------- */

  .nav-container {
    flex-direction: row;
    justify-content: space-between;
  }

  .nav-resume-btn {
    background: transparent;
    border: none;
    padding: 14px 6px;
    height: auto;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted) !important;
    justify-content: flex-start;
  }

  .nav-resume-btn:hover,
  .nav-resume-btn:active {
    background: var(--bg-elevated);
    color: var(--text-main) !important;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--bg-body);
    border-bottom: 1px solid var(--border-subtle);

    flex-direction: column;
    align-items: flex-start;
    gap: 0;

    padding: 12px 20px 20px;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 0;
    font-size: 0.95rem;
    padding: 14px 6px;
    border-radius: 6px;
    transition:
      background-color 0.2s ease,
      color 0.2s ease;
  }

  .nav-links a:hover,
  .nav-links a:active {
    background: var(--bg-elevated);
    color: var(--text-main);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links li:last-child {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    background: var(--bg-body);
  }

  .desktop-only {
    display: flex;
  }

  .mobile-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
  }

  .mobile-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .mobile-sheet-card {
    position: absolute;
    top: calc(var(--nav-height) + 10px);
    left: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100svh - var(--nav-height) - 32px);
    -webkit-overflow-scrolling: touch;
    transform: scale(0.96) translateY(-10px);
    opacity: 0;
    transition:
      transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.28s ease;
  }

  html.dark .mobile-sheet-card {
    background: rgba(28, 28, 30, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.5),
      0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .mobile-sheet-nav {
    list-style: none;
    margin: 0;
    padding: 8px 0;
  }

  .mobile-sheet-nav li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  html.dark .mobile-sheet-nav li {
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }

  .mobile-sheet-nav li:last-child {
    border-bottom: none;
  }

  .mobile-sheet-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-sheet-nav a:hover,
  .mobile-sheet-nav a:active {
    background: rgba(0, 0, 0, 0.04);
  }

  html.dark .mobile-sheet-nav a:hover,
  html.dark .mobile-sheet-nav a:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-sheet-nav a .nav-row-arrow {
    color: var(--text-muted);
    opacity: 0.5;
  }

  .mobile-sheet-divider {
    height: 8px;
    background: rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  html.dark .mobile-sheet-divider {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
  }

  .mobile-sheet-actions {
    padding: 8px 0;
  }

  .mobile-sheet-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
  }

  .mobile-sheet-action:hover,
  .mobile-sheet-action:active {
    background: rgba(0, 0, 0, 0.04);
  }

  html.dark .mobile-sheet-action:hover,
  html.dark .mobile-sheet-action:active {
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-sheet-action-label {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-music {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 4px;
    padding-top: 4px;
  }

  html.dark .mobile-music {
    border-top-color: rgba(255, 255, 255, 0.06);
  }

  .mobile-music-title {
    margin: 0;
    padding: 6px 20px 2px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    color: var(--text-muted);
  }

  .mobile-music .music-option,
  .nav-music-popover .music-option {
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 8px;
  }

  .mobile-music-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 6px;
  }

  .mobile-music-volume-icon {
    color: var(--text-muted);
    font-size: 0.95rem;
  }

  .mobile-music-volume input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
  }

  .mobile-sheet-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .mobile-sheet-action-icon.resume-icon {
    background: #000;
    color: #fff;
  }

  html.dark .mobile-sheet-action-icon.resume-icon {
    background: #fff;
    color: #000;
  }

  .mobile-sheet-action-icon.theme-icon {
    background: var(--bg-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
  }

  .mobile-sheet.open {
    display: block;
  }

  .mobile-sheet.open .mobile-sheet-backdrop {
    opacity: 1;
  }

  .mobile-sheet.open .mobile-sheet-card {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  .nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    gap: 0;
    padding: 0;
    flex-direction: column;
  }

  .nav-music-toggle {
    display: flex !important;
  }

  .nav-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition:
      transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.2s ease,
      width 0.3s ease;
    margin: 2.5px 0;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .desktop-only {
    display: none !important;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex; /* show hamburger on mobile */
  }

  .desktop-only {
    display: none !important;
  }

  /* ---------- HERO ---------- */

  .hero-inner {
    width: 100%;
    max-width: 420px;
    padding: 0 20px;

    margin-left: 0;
    margin-right: auto;

    align-items: flex-start;
    text-align: left;

    transform: none;
  }

  .hero-title {
    font-size: clamp(2.2rem, 7vw, 2.6rem);
  }

  .hero-typing {
    font-size: 0.95rem;
    margin-bottom: 22px;
  }

  .hero-buttons {
    justify-content: flex-start;
  }

  .hero-section {
    min-height: calc(100svh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .about-section {
    padding: 0;
  }

  .about-eyebrow {
    margin-bottom: 12px;
  }

  .about-intro {
    margin-top: 20px;
    font-size: 1rem;
  }

  .about-text {
    margin-top: 18px;
    font-size: 0.97rem;
    line-height: 1.72;
  }

  .about-principle {
    margin-top: 32px;
    padding-top: 22px;
  }

  .career-wrapper {
    margin-top: 56px;
  }

  .career-divider {
    margin-bottom: 36px;
  }

  .career-tabs {
    margin-bottom: 36px;
  }

  .career-tab {
    padding: 7px 18px;
    font-size: 0.72rem;
  }

  .career-item {
    display: block;
    padding: 16px 14px;
    margin-bottom: 10px;
  }

  .timeline-label {
    padding-top: 0;
    font-size: 0.78rem;
    margin-bottom: 12px;
  }

  .career-role {
    font-size: 1rem;
  }

  .career-bullets li {
    font-size: 0.93rem;
    line-height: 1.65;
  }

  .edu-card {
    padding-bottom: 32px;
    margin-bottom: 32px;
  }

  .edu-details {
    margin-top: 20px;
    gap: 10px 24px;
  }

  .edu-section-block {
    margin-bottom: 32px;
  }

  /* ---------- SKILLS ---------- */

  .skills-section {
    min-height: auto;
  }

  .core-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
  }

  .core-stack-icons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .skill-card {
    padding: 20px;
  }

  .term {
    padding: 16px 16px 18px;
  }

  .term-line {
    font-size: 0.8rem;
  }

  .term-body {
    padding-left: 16px;
  }

  /* ---------- PROJECTS ---------- */

  .projects-section {
    padding-bottom: 80px;
  }

  .projects-index {
    padding-left: 6px;
  }

  .projects-index button {
    font-size: 0.8rem;
    line-height: 1.7;
  }

  .projects-grid {
    margin-top: 28px;
  }

  .project-card {
    padding: 20px;
    border-radius: 12px;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-desc {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .project-impact {
    font-size: 0.8rem;
  }

  .project-tech {
    font-size: 0.75rem;
  }

  .projects-terminal {
    margin: 24px 0 40px;
  }

  .projects-terminal .terminal-body {
    padding: 14px 16px 18px;
    font-size: 0.8rem;
  }

  .projects-index button {
    font-size: 0.8rem;
    line-height: 1.7;
  }

  .projects-grid {
    margin-top: 32px;
  }

  .project-card {
    padding: 22px;
    border-radius: 12px;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .project-title {
    font-size: 1.15rem;
  }

  .project-status {
    font-size: 0.65rem;
  }

  .project-desc {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .project-impact {
    font-size: 0.8rem;
  }

  .project-tech {
    font-size: 0.75rem;
  }

  .project-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ---------- CONTACT ---------- */

  .contact-grid {
    margin-top: 40px;
  }

  .contact-form-split {
    max-width: 100%;
    gap: 22px;
  }

  .contact-form-split input,
  .contact-form-split textarea {
    font-size: 0.9rem;
  }

  .contact-form-split .contact-btn {
    width: 100%;
    padding: 14px 0;
    text-align: center;
  }

  .contact-note {
    font-size: 0.8rem;
  }

  /* ---------- FOOTER ---------- */

  .footer {
    position: static;
    height: auto;
    padding: 18px 0 16px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    text-align: center;
  }

  .footer-left p {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted);
  }

  .footer-center {
    display: none;
  }

  .footer-right {
    display: flex;
    justify-content: center;
    gap: 18px;
  }

  .footer-right a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    opacity: 0.75;
  }

  .footer-right a:hover {
    opacity: 1;
  }

  .footer-right svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  .footer-right a span {
    display: none;
  }
}

/* ========================================= */
/* SMALL MOBILE (≤ 420px)                    */
/* ========================================= */

@media (max-width: 420px) {
  .hero-title {
    font-size: 2.1rem;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .terminal-body {
    font-size: 0.75rem;
  }

  .project-card {
    padding: 18px;
  }

  .contact-form-split label {
    font-size: 0.65rem;
  }

  .contact-form-split input,
  .contact-form-split textarea {
    font-size: 0.85rem;
  }
}

/* =======================*/
/* DARK MODE THEME       */
/* ==================== */

html.dark {
  --bg-body: #0d0d0f;
  --bg-section: #0d0d0f;
  --bg-elevated: #16161a;

  --font-mono: "JetBrains Mono", monospace;

  --text-main: #f5f5f5;
  --text-muted: #a1a1aa;

  --border-subtle: #26262b;
  --border-strong: #3a3a40;

  --card-bg: #121216;
  --card-border: #26262b;

  --primary: #ffffff;
  --accent: #ffffff;

  --glass-bg: rgba(20, 20, 20, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Body + transitions */
html.dark body {
  background: var(--bg-body);
  color: var(--text-main);
}

/* Navbar */
html.dark .site-nav {
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

html.dark .nav-links a {
  color: var(--text-muted);
}

html.dark .nav-links a:hover,
html.dark .nav-links a[aria-current="page"] {
  color: var(--text-main);
}

html.dark .site-nav {
  background: rgba(13, 13, 15, 0.8);
}

html.dark .nav-resume-btn {
  background: var(--bg-elevated);
  color: white;
  border-color: var(--border-strong);
}

html.dark .nav-resume-btn:hover {
  background: white;
  color: black;
}

html.dark .theme-toggle:hover {
  background: var(--bg-elevated);
}

/* Hero */
html.dark .hero-section {
  background: var(--bg-body);
}

html.dark .glitch-final {
  color: #f5f5f5;
}

html.dark .glitch-scramble {
  color: #555;
}

html.dark .ghost {
  color: #ffffff;
  opacity: 0.035;
}

html.dark .cta-btn {
  background-color: white;
  color: black;
}

html.dark .cta-btn:hover {
  background-color: #0073ff;
  color: rgb(255, 255, 255);
}

/* ABOUT */
html.dark .timeline-label {
  opacity: 0.75;
}

html.dark .career-tab.active {
  color: var(--bg-body);
}

html.dark .career-bullets li::before {
  background: var(--text-muted);
}

/* Project Cards */
html.dark .project-card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

/* Skills */
html.dark .core-stack {
  border-color: var(--border-subtle);
}

/* Terminal*/
html.dark .terminal {
  background: #050505;
}

/* Contact inputs */
html.dark input,
html.dark textarea {
  color: var(--text-main);
  border-bottom-color: var(--border-strong);
}

/* Footer */
html.dark .footer {
  padding: 0;
  background: var(--bg-body);
}

html.dark .footer-left p,
html.dark .footer-right a {
  color: #e5e5e5;
}

html.dark .footer-right a:hover {
  text-decoration: none;
}

/* Selection */
html.dark ::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

html.dark .contact-btn {
  background-color: rgb(255, 255, 255);
  color: #000;
}

html.dark .contact-btn:disabled {
  background-color: rgb(171, 171, 171);
  color: #282828;
}

/* =============================== */
/* HOBBIES — OFF THE CLOCK         */
/* =============================== */

.hobbies-section {
  min-height: auto;
  display: block;
  position: relative;
  z-index: 1;
  background: var(--bg-section);
  padding: 0;
  scroll-margin-top: 96px;
}

/* Scattered film-photo backdrop spread across the page, behind content */
.hobby-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
}

.hobby-bg-tile {
  position: absolute;
  width: 140px;
  padding: 17px 15px;
  box-sizing: border-box;
  background: #181818;
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hobby-bg-tile img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.hobby-bg-tile .film-perf {
  position: absolute;
  left: 0;
  right: 0;
  height: 9px;
  background-image: radial-gradient(circle 2px at 12px 50%, #000 0 2.2px, transparent 2.6px);
  background-size: 20px 9px;
  background-repeat: repeat-x;
}

.hobby-bg-tile .film-perf.top { top: 0; }
.hobby-bg-tile .film-perf.bottom { bottom: 0; }

.hobby-bg.in-view .hobby-bg-tile {
  opacity: 1;
}

.hobbies-head {
  max-width: 820px;
  margin-inline: auto;
  padding-top: 8px;
}

.hobbies-head .term {
  margin-bottom: 20px;
}

.wall-section,
.music-section,
.facts-section {
  max-width: 820px;
  margin-inline: auto;
}

.wall-section {
  margin-top: 64px;
}

.music-section {
  margin-top: 72px;
}

.wall-section .term-line,
.music-section .term-line {
  margin-bottom: 22px;
}

/* ---- Pinboard backdrop ---- */
.wall {
  position: relative;
  margin-top: 8px;
  padding: 34px clamp(12px, 4vw, 40px);
  column-width: 260px;
  column-gap: 30px;
}

.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 40%, transparent 0, transparent 55%, rgba(0, 0, 0, 0.02) 55%, rgba(0, 0, 0, 0.02) 56%, transparent 56%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.018) 0 1px, transparent 1px 7px);
}

html.dark .wall::before {
  background:
    radial-gradient(circle at 50% 40%, transparent 0, transparent 55%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0.03) 56%, transparent 56%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 7px);
}

/* ---- Polaroid pins ---- */
.polaroid {
  position: relative;
  z-index: 1;
  break-inside: avoid;
  margin-bottom: 34px;
  padding: 9px 9px 34px;
  background: #f5f4f1;
  border-radius: 2px;
  box-shadow: 0 14px 28px -18px rgba(0, 0, 0, 0.55);
  transform: translateY(44px) scale(0.96) rotate(var(--rot, 0deg));
  opacity: 0;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    z-index 0s;
}

.wall.in-view .polaroid {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(var(--rot, 0deg));
  transition-delay: calc(var(--i, 0) * 90ms);
}

.polaroid:hover {
  z-index: 6;
  transform: translateY(-10px) rotate(0deg) scale(1.06);
  box-shadow: 0 30px 44px -20px rgba(0, 0, 0, 0.6);
  transition-delay: 0ms;
}

/* tape + pin animate on hover */
.polaroid::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 62px;
  height: 18px;
  background: rgba(0, 0, 0, 0.07);
  border-left: 2px dotted rgba(0, 0, 0, 0.12);
  border-right: 2px dotted rgba(0, 0, 0, 0.12);
  opacity: 0.9;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.polaroid::after {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.polaroid:hover::before {
  transform: translateX(-50%) rotate(0deg) scaleY(1.25);
  opacity: 1;
}

html.dark .polaroid::before {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: rgba(255, 255, 255, 0.14);
  border-right-color: rgba(255, 255, 255, 0.14);
}

.polaroid:hover::after {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 6px 8px rgba(0, 0, 0, 0.5);
}

.polaroid-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  box-sizing: border-box;
  padding: 18px 14px;
  background: #1d1d1d;
}

/* 35mm film sprocket bars (top + bottom) */
.polaroid-media::before,
.polaroid-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background-image: radial-gradient(circle 3px at 12px 50%, #000 0 3.4px, transparent 3.8px);
  background-size: 22px 14px;
  background-repeat: repeat-x;
  pointer-events: none;
  z-index: 2;
}

.polaroid-media::before { top: 0; }
.polaroid-media::after { bottom: 0; }

.polaroid-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
  transition: filter 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.polaroid:hover .polaroid-media img {
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.06);
}

/* placeholder before real photos are added */
.polaroid-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  text-align: center;
  gap: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 8px),
    #deddda;
  color: rgba(0, 0, 0, 0.45);
}

.polaroid-fallback span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.polaroid-fallback em {
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.5px;
}

.polaroid.no-image .polaroid-media img {
  display: none;
}

.polaroid.no-image .polaroid-fallback {
  display: grid;
}

figcaption {
  padding-top: 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

figcaption strong {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #20201f;
}

figcaption span {
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.55);
}

html.dark .polaroid {
  background: #221f1b;
}

html.dark .polaroid-fallback {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 8px),
    #2a2723;
  color: rgba(255, 255, 255, 0.4);
}

html.dark figcaption strong {
  color: #f0eee9;
}

html.dark figcaption span {
  color: rgba(255, 255, 255, 0.5);
}

/* ---- Music wall ---- */
.music-status {
  margin-left: auto;
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.music-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: 1px;
  animation: statPulse 1.6s ease-in-out infinite;
}

@keyframes statPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.vinyl-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.vinyl-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: 2px;
  background: transparent;
  transition: border-color 240ms ease, background-color 240ms ease, transform 240ms ease;
}

.vinyl-card:hover {
  border-color: var(--border-strong);
  border-style: solid;
  background: var(--bg-elevated);
  transform: translateY(-3px);
}

/* anchor reset so the whole card is clickable */
.playlist-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

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

/* Spotify "new app icon" — dark gradient rounded-square with green glyph */
.spotify-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(160deg, #0b0d10 0%, #1c1f2e 60%, #2b2f47 100%);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.spotify-icon svg {
  width: 24px;
  height: 24px;
}

.spotify-icon svg path {
  fill: #1DB954;
}

/* external-link affordance */
.playlist-card:hover .spotify-icon,
.playlist-card:focus-visible .spotify-icon {
  box-shadow: 0 6px 14px -4px rgba(29, 185, 84, 0.55);
}

.vinyl-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.playlist-name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-caption {
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
  white-space: nowrap;
}

/* hover/focus preview popover */
.playlist-preview {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(6px);
  width: 340px;
  max-width: 86vw;
  z-index: 20;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}

.playlist-preview iframe {
  display: block;
  width: 100% !important;
  border: 0;
  border-radius: 12px;
}

.playlist-card:hover .playlist-preview,
.playlist-card:focus-within .playlist-preview {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---- Vibes tape (single marquee) ---- */
.vibes-tape {
  max-width: 820px;
  margin: 28px auto 0;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
  user-select: none;
}

.vibes-tape-track {
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
  width: max-content;
  animation: tapeScroll 28s linear infinite;
  will-change: transform;
}

.vibes-tape-track span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-main);
}

.vibes-tape-track i {
  font-style: normal;
  color: var(--text-muted);
}

@keyframes tapeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Facts ---- */
.facts-section {
  margin-top: 72px;
  padding-bottom: 24px;
}

.hobby-fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hobby-fact-list li {
  position: relative;
  padding-left: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  transition: color 200ms ease, transform 200ms ease;
}

.hobby-fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background-color 200ms ease;
}

.hobby-fact-list li:hover {
  color: var(--text-main);
  transform: translateX(3px);
}

.hobby-fact-list li:hover::before {
  content: ">";
  width: auto;
  height: auto;
  top: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .vinyl-grid {
    grid-template-columns: 1fr;
  }

  .vinyl-card {
    grid-template-columns: 46px 1fr;
    gap: 12px;
    padding: 14px 16px;
  }

  .playlist-meta {
    grid-column: 1 / -1;
    text-align: left;
    white-space: normal;
    margin-top: 2px;
  }

  .wall {
    column-width: 210px;
    column-gap: 22px;
    padding: 26px 14px;
  }

  .vibes-tape-track span {
    font-size: 0.74rem;
    letter-spacing: 2px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .polaroid {
    opacity: 1 !important;
    transform: translateY(0) scale(1) rotate(var(--rot, 0deg)) !important;
    transition: none !important;
  }

  .vibes-tape-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }

  .playlist-card:hover .playlist-preview,
  .playlist-card:focus-within .playlist-preview {
    transition: opacity 200ms ease, visibility 200ms;
  }

  /* Footer music pill: disable pulse + equalizer, show static indicator */
  .music-pill.playing {
    animation: none;
  }

  .music-pill.playing .music-eq span {
    animation: none;
    height: 10px;
  }
}

/* ========================================= */
/* COMMUNITY — CANVAS + POSTCARD             */
/* ========================================= */

.community-section {
  background: var(--bg-section);
  padding: 0;
}

.community-section .section-text {
  max-width: 820px;
  margin-inline: auto;
}

.community-filters {
  max-width: 820px;
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-filter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 180ms ease;
}

.community-filter:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.community-filter.active {
  background: var(--text-main);
  color: var(--bg-body);
  border-color: var(--text-main);
}

.community-grid {
  max-width: 820px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.community-card {
  background: var(--card-bg);
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 22px 22px 18px;
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease, opacity 300ms ease;
  opacity: 0;
  transform: translateY(14px);
}

.community-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.community-card.is-hidden {
  display: none;
}

.community-card:hover {
  border-style: solid;
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px -18px rgba(0,0,0,.18);
  transform: translateY(-2px);
}

.community-card.revealed:hover {
  transform: translateY(-2px);
}

.community-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.community-card-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.community-card-location {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.community-header {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.community-header .section-text {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.community-hero-wrap {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.community-hero-caption {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.community-postcard--hero {
  width: 200px;
}

.community-card-body {
  display: block;
}

.community-card-title {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0 0 6px;
}

.community-card-org {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.community-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.community-card-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.community-card-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: .7;
}

.community-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.community-postcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 172px;
  padding: 8px 8px 10px;
  background: #f5f4f1;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  box-shadow: 0 10px 22px -16px rgba(0,0,0,.45);
  cursor: pointer;
  text-align: left;
  transition: transform 260ms cubic-bezier(.22,1,.36,1), box-shadow 260ms ease, border-color 200ms ease;
  transform: rotate(-1.1deg);
}

.community-postcard:hover {
  transform: rotate(0deg) scale(1.03) translateY(-4px);
  box-shadow: 0 18px 32px -18px rgba(0,0,0,.5);
  border-color: var(--border-strong);
}

.community-postcard-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 54px;
  height: 14px;
  background: rgba(0,0,0,.07);
  border-left: 2px dotted rgba(0,0,0,.12);
  border-right: 2px dotted rgba(0,0,0,.12);
}

.community-postcard-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1d1d1d;
  padding: 10px 8px;
  box-sizing: border-box;
}

.community-postcard-frame::before,
.community-postcard-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle 2.6px at 10px 50%, #000 0 2.8px, transparent 3px);
  background-size: 18px 10px;
  background-repeat: repeat-x;
  z-index: 1;
}

.community-postcard-frame::before { top: 0; }
.community-postcard-frame::after { bottom: 0; }

.community-postcard-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.02);
  transition: transform 420ms cubic-bezier(.22,1,.36,1), opacity 180ms ease;
}

.community-postcard:hover .community-postcard-frame img {
  transform: scale(1.05);
}

.community-postcard-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(8px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: .6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.community-postcard.has-hint .community-postcard-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.community-postcard.has-hint {
  animation: postcardNudge 4s ease-in-out infinite;
}

@keyframes postcardNudge {
  0%, 85%, 100% { box-shadow: 0 10px 22px -16px rgba(0,0,0,.45); }
  90% { box-shadow: 0 14px 28px -14px rgba(0,0,0,.55); transform: rotate(-1.1deg) scale(1.02); }
}

.community-postcard:hover.has-hint,
.community-postcard:focus-visible.has-hint {
  animation: none;
}

.community-postcard:hover .community-postcard-hint,
.community-postcard:focus-visible .community-postcard-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.community-lightbox-progress {
  height: 2px;
  border-radius: 999px;
  background: var(--border-subtle);
  overflow: hidden;
}

.community-lightbox-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--text-main);
  transition: width 4s linear;
}

.community-postcard-fallback {
  position: absolute;
  inset: 10px 8px;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,.03) 0 1px, transparent 1px 8px), #deddda;
  color: rgba(0,0,0,.45);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.community-postcard-count {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: .4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
}

.community-postcard-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: .6px;
  color: #20201f;
}

.community-postcard-label svg,
.community-postcard-label i { width: 12px; height: 12px; }

html.dark .community-postcard { background: #221f1b; border-color: var(--border-subtle); }
html.dark .community-postcard-tape { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
html.dark .community-postcard-fallback { background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 1px, transparent 1px 8px), #2a2723; color: rgba(255,255,255,.4); }
html.dark .community-postcard-label { color: #f0eee9; }

.community-empty {
  max-width: 820px;
  margin: 24px auto 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 18px;
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  text-align: center;
}

.community-lightbox[hidden] { display: none !important; }
.community-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 16px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.community-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.community-lightbox-card {
  position: relative;
  width: min(720px, 92vw);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.55);
  padding: 14px;
  overflow: hidden;
  margin: auto;
}

.community-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.community-lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: .6px;
  color: var(--text-muted);
}

.community-lightbox-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-main);
  cursor: pointer;
}

.community-lightbox-close svg,
.community-lightbox-close i,
.community-lightbox-close [data-lucide] {
  width: 16px;
  height: 16px;
  display: block;
}

.community-lightbox-stage {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  align-items: center;
}

.community-lightbox-media {
  min-height: 220px;
  max-height: clamp(240px, 42vh, 380px);
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border-radius: 12px;
  overflow: hidden;
}

.community-lightbox-media img,
.community-lightbox-media video {
  max-width: 100%;
  max-height: clamp(240px, 42vh, 380px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: #0d0d0f;
}

.community-lightbox-nav {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
}

.community-lightbox-nav svg,
.community-lightbox-nav i {
  width: 16px;
  height: 16px;
  display: block;
}

.community-lightbox-nav:disabled { opacity: .35; cursor: not-allowed; }

.community-lightbox-caption {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  min-height: 1.4em;
  white-space: pre-wrap;
  word-break: break-word;
}

.community-lightbox-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.community-lightbox-thumb {
  flex: 0 0 64px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--bg-elevated);
  opacity: .7;
}

.community-lightbox-thumb.active {
  border-color: var(--text-main);
  opacity: 1;
}

.community-lightbox-thumb img,
.community-lightbox-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .community-card { padding: 18px 16px 16px; }
  .community-header { flex-direction: column; }
  .community-hero-wrap { width: 100%; }
  .community-postcard--hero { width: 100%; max-width: 320px; }
  .community-postcard { width: 100%; max-width: 320px; transform: rotate(0deg); justify-self: start; }
  .community-postcard:hover { transform: scale(1.02) translateY(-2px); }
  .community-lightbox { padding: 10px; }
  .community-lightbox-card { width: 96vw; max-height: 82svh; }
  .community-lightbox-stage { grid-template-columns: 32px 1fr 32px; }
  .community-lightbox-media { min-height: 200px; max-height: 38svh; }
  .community-lightbox-media img, .community-lightbox-media video { max-height: 38svh; }
}

@media (prefers-reduced-motion: reduce) {
  .community-card { opacity: 1 !important; transform: none !important; }
  .community-postcard { transition: none; animation: none !important; }
  .community-postcard-hint { display: none !important; }
  .community-lightbox-progress-bar { transition: none !important; }
}
