/* ============================================
   NAJAM UL HASSAN — PORTFOLIO
   Dark Minimal / Yuta Abe Inspired
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --accent: #c0c0c0;
  --hover: #ffffff;
  --card: #111111;
  --card-border: #1e1e1e;
  --radius: 6px;
  --transition: .35s cubic-bezier(.25,.46,.45,.94);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
img { display: block; max-width: 100%; }

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- Custom Cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--fg);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(245, 245, 245, .45);
  transition: width .25s, height .25s, border-color .25s;
}

.cursor-ring.hover {
  width: 56px;
  height: 56px;
  border-color: var(--fg);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}

/* ---------- Loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity .6s ease, visibility .6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  overflow: hidden;
}

.loader-text span {
  display: inline-block;
  animation: loaderReveal .5s ease forwards;
  opacity: 0;
  transform: translateY(100%);
}

@keyframes loaderReveal {
  to { opacity: 1; transform: translateY(0); }
}

.loader-bar {
  width: 120px;
  height: 2px;
  background: #1a1a1a;
  margin-top: 1.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-inner {
  height: 100%;
  background: var(--fg);
  width: 0%;
  animation: barFill .8s ease forwards;
}

@keyframes barFill {
  to { width: 100%; }
}

/* ---------- Navigation ---------- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  mix-blend-mode: difference;
}

.nav-logo {
  cursor: pointer;
  transition: opacity var(--transition);
}

.nav-logo:hover { opacity: .6; }

.nav-links {
  display: flex;
  gap: 2.2rem;
}

.nav-links a {
  position: relative;
  cursor: pointer;
  transition: opacity var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--fg);
  transition: width var(--transition);
}

.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { opacity: .8; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--fg);
  transition: transform .3s ease, opacity .3s ease;
}

.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Full-screen menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.menu-overlay a {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}

.menu-overlay a:hover {
  opacity: .5;
  transform: translateX(10px);
}

/* ---------- Sections (shared) ---------- */
.section {
  display: none;
  min-height: 100vh;
  padding: 0;
}

.section.active {
  display: block;
  animation: sectionIn .5s ease forwards;
}

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- HERO ---------- */
#hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

#hero.active { display: flex; animation: sectionIn .5s ease forwards; }

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 9vw, 7.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1;
  margin-bottom: .5rem;
}

.hero-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px);
  animation: charUp .6s ease forwards;
}

@keyframes charUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(.85rem, 2vw, 1.3rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--accent);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp .7s ease .8s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-family: var(--font-heading);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  opacity: 0;
  animation: fadeUp .7s ease 1.1s forwards;
}

.hero-clock {
  font-variant-numeric: tabular-nums;
}

.hero-counter {
  cursor: pointer;
  transition: color var(--transition);
  user-select: none;
}

.hero-counter:hover { color: var(--fg); }

.hero-shift {
  display: flex;
  align-items: center;
  gap: .5rem;
  opacity: 0;
  animation: fadeUp .7s ease 1.4s forwards;
}

.hero-shift kbd {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: .15rem .55rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: .7rem;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  font-family: var(--font-heading);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--accent);
  opacity: 0;
  animation: fadeUp .7s ease 1.6s forwards, hintPulse 2s ease-in-out 2.5s infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

/* ===== SHIFT MODE: shared badge ===== */
body.time-machine::after,
body.wireframe::after,
body.glitch::after,
body.behind-scenes::after {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  font-family: 'Space Grotesk', monospace;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  z-index: 9999;
  pointer-events: none;
  padding: .4rem .8rem;
}

/* =============================================
   MODE 1 — TIME MACHINE (90s → Y2K → Web 2.0)
   ============================================= */
body.time-machine {
  background: #1a0040 !important;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,.03) 2px, rgba(255,255,255,.03) 4px),
    radial-gradient(ellipse at 30% 20%, #2a0060 0%, #1a0040 70%) !important;
  font-family: 'Courier New', monospace !important;
  color: #00ff00 !important;
}

body.time-machine * {
  transition: all .4s ease !important;
  font-family: inherit !important;
}

body.time-machine #nav {
  background: #0a0020 !important;
  border-bottom: 2px solid #ff00ff !important;
}

body.time-machine .nav-logo,
body.time-machine .menu-overlay a {
  color: #ff00ff !important;
  text-shadow: 0 0 10px #ff00ff !important;
}

body.time-machine .hero-name {
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: 3px 3px #ff0000, -1px -1px #00ffff !important;
  animation: tm-blink 1s steps(2) infinite !important;
}

@keyframes tm-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

body.time-machine .hero-subtitle,
body.time-machine .hero-meta,
body.time-machine .hero-shift {
  color: #00ffcc !important;
}

body.time-machine .project-card {
  background: #0a0030 !important;
  border: 2px solid #ff00ff !important;
  box-shadow: 0 0 15px rgba(255,0,255,.3), inset 0 0 15px rgba(0,255,255,.1) !important;
}

body.time-machine .project-title {
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: 1px 1px #ff0000 !important;
}

body.time-machine .project-desc,
body.time-machine .about-bio,
body.time-machine .timeline-role,
body.time-machine .timeline-place,
body.time-machine .modal-desc {
  color: #00ff00 !important;
}

body.time-machine .project-tag,
body.time-machine .skill-pill,
body.time-machine .filter-btn {
  background: #ff00ff !important;
  color: #000 !important;
  border: 1px solid #ffff00 !important;
  border-radius: 0 !important;
  text-transform: uppercase !important;
}

body.time-machine .filter-btn.active,
body.time-machine .filter-btn:hover {
  background: #00ffff !important;
  color: #000 !important;
}

body.time-machine .project-thumb img,
body.time-machine .about-photo img,
body.time-machine .modal-gallery img {
  filter: saturate(2) contrast(1.3) hue-rotate(30deg) !important;
  border: 2px solid #00ffff !important;
}

body.time-machine .section-header,
body.time-machine .contact-heading {
  color: #ff00ff !important;
  -webkit-text-fill-color: #ff00ff !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: 2px 2px #00ffff !important;
}

body.time-machine .section-line,
body.time-machine .contact-divider {
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff) !important;
  height: 3px !important;
}

body.time-machine .timeline::before {
  background: #ff00ff !important;
}

body.time-machine .timeline-item::before {
  background: #00ffff !important;
  border-color: #ff00ff !important;
}

body.time-machine .timeline-date {
  color: #ffff00 !important;
}

body.time-machine .modal-content {
  background: #0a0030 !important;
  border: 2px solid #ff00ff !important;
  box-shadow: 0 0 30px rgba(255,0,255,.4) !important;
}

body.time-machine .modal-title {
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
  -webkit-text-stroke: 0 !important;
}

body.time-machine .modal-close {
  background: #ff00ff !important;
  color: #000 !important;
  border: 2px solid #ffff00 !important;
}

body.time-machine .modal-tags span {
  background: #0a0030 !important;
  border: 1px solid #00ffff !important;
  color: #00ffff !important;
}

body.time-machine .contact-link {
  color: #00ffcc !important;
  text-decoration: underline !important;
}

body.time-machine .cursor-dot { background: #ff00ff !important; }
body.time-machine .cursor-ring { border-color: #00ffff !important; }
body.time-machine .menu-overlay { background: #0a0030 !important; }
body.time-machine .nav-hamburger span { background: #ff00ff !important; }
body.time-machine .about-photo-overlay { background: transparent !important; color: #00ffff !important; }
body.time-machine .hero-scroll-hint { color: #00ffcc !important; }
body.time-machine .modal-number { color: #ff00ff !important; }
body.time-machine .contact-link-label { color: #00ff00 !important; }
body.time-machine .contact-footer { color: #00ffcc !important; }
body.time-machine .project-number { color: #ff00ff !important; }

body.time-machine::after {
  content: '[ TIME MACHINE — circa 1999 ]';
  color: #00ffcc;
  text-shadow: 0 0 5px #00ffcc;
}

/* =============================================
   MODE 2 — WIREFRAME
   ============================================= */
body.wireframe {
  background: #ffffff !important;
  color: #333 !important;
}

body.wireframe * {
  transition: all .3s ease !important;
  font-family: 'Inter', 'Helvetica Neue', sans-serif !important;
  border-radius: 0 !important;
}

body.wireframe #nav {
  background: #fff !important;
  border-bottom: 1px solid #ccc !important;
}

body.wireframe .nav-logo {
  color: #333 !important;
  font-weight: 400 !important;
}

body.wireframe .hero-name,
body.wireframe .section-header,
body.wireframe .contact-heading,
body.wireframe .modal-title {
  color: #333 !important;
  -webkit-text-fill-color: #333 !important;
  -webkit-text-stroke: 0 !important;
  font-weight: 300 !important;
}

body.wireframe .project-card {
  background: transparent !important;
  border: 1px solid #ccc !important;
  box-shadow: none !important;
}

body.wireframe .project-card:hover {
  box-shadow: none !important;
  transform: none !important;
  border-color: #666 !important;
}

body.wireframe .project-thumb {
  background: #f0f0f0 !important;
  border-bottom: 1px solid #ccc !important;
  position: relative;
}

body.wireframe .project-thumb img,
body.wireframe .about-photo img {
  opacity: 0 !important;
}

body.wireframe .project-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom right, transparent calc(50% - .5px), #ccc calc(50% - .5px), #ccc calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to top right, transparent calc(50% - .5px), #ccc calc(50% - .5px), #ccc calc(50% + .5px), transparent calc(50% + .5px));
  z-index: 1;
}

body.wireframe .project-thumb::after {
  content: 'IMAGE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: .7rem;
  letter-spacing: .15em;
  color: #999;
  z-index: 2;
  background: #f0f0f0;
  padding: .2rem .6rem;
}

body.wireframe .project-title {
  color: #333 !important;
  -webkit-text-fill-color: #333 !important;
  -webkit-text-stroke: 0 !important;
}

body.wireframe .project-desc,
body.wireframe .about-bio,
body.wireframe .hero-subtitle,
body.wireframe .hero-meta,
body.wireframe .hero-shift,
body.wireframe .modal-desc,
body.wireframe .timeline-role,
body.wireframe .timeline-place,
body.wireframe .contact-link-label,
body.wireframe .contact-footer {
  color: #999 !important;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 10px,
    #e0e0e0 10px,
    #e0e0e0 11px
  );
}

body.wireframe .project-tag,
body.wireframe .skill-pill,
body.wireframe .filter-btn,
body.wireframe .modal-tags span {
  background: transparent !important;
  border: 1px solid #ccc !important;
  color: #999 !important;
}

body.wireframe .filter-btn.active,
body.wireframe .filter-btn:hover {
  background: #333 !important;
  color: #fff !important;
  border-color: #333 !important;
}

body.wireframe .section-line,
body.wireframe .contact-divider {
  background: #ccc !important;
}

body.wireframe .timeline::before {
  background: #ccc !important;
}

body.wireframe .timeline-item::before {
  background: #fff !important;
  border-color: #ccc !important;
}

body.wireframe .timeline-date {
  color: #666 !important;
}

body.wireframe .modal-content {
  background: #fff !important;
  border: 1px solid #ccc !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.1) !important;
}

body.wireframe .modal-gallery img {
  opacity: 0 !important;
}

body.wireframe .modal-gallery-item {
  background: #f0f0f0 !important;
  border: 1px solid #ccc !important;
  position: relative;
  min-height: 150px;
}

body.wireframe .modal-close {
  background: transparent !important;
  border: 1px solid #ccc !important;
  color: #333 !important;
}

body.wireframe .contact-link { color: #333 !important; }
body.wireframe .modal-number { color: #ccc !important; }
body.wireframe .project-number { color: #ccc !important; }
body.wireframe .cursor-dot { background: #333 !important; }
body.wireframe .cursor-ring { border-color: rgba(0,0,0,.2) !important; }
body.wireframe .menu-overlay { background: #fff !important; }
body.wireframe .menu-overlay a { color: #333 !important; }
body.wireframe .nav-hamburger span { background: #333 !important; }
body.wireframe .about-photo-overlay { background: transparent !important; color: #333 !important; }
body.wireframe .hero-scroll-hint { color: #999 !important; }

body.wireframe::after {
  content: '[ WIREFRAME ]';
  color: #999;
  border: 1px solid #ccc;
  background: #fff;
}

/* =============================================
   MODE 3 — GLITCH
   ============================================= */
body.glitch {
  animation: glitch-bg .1s steps(2) infinite !important;
}

@keyframes glitch-bg {
  0% { background-position: 0 0; }
  50% { background-position: 1px -1px; }
  100% { background-position: -1px 1px; }
}

body.glitch::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, .03) 2px,
    rgba(0, 255, 0, .03) 4px
  );
  pointer-events: none;
  z-index: 9998;
  animation: glitch-scan 8s linear infinite;
}

@keyframes glitch-scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

body.glitch * {
  transition: none !important;
}

body.glitch .hero-name {
  animation: glitch-text .3s steps(2) infinite !important;
  text-shadow:
    2px 0 #ff0000,
    -2px 0 #00ffff !important;
  -webkit-text-fill-color: #f5f5f5 !important;
  -webkit-text-stroke: 0 !important;
}

@keyframes glitch-text {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 2px); }
  100% { transform: translate(0); }
}

body.glitch .section-header,
body.glitch .contact-heading {
  text-shadow: 2px 0 #ff0000, -2px 0 #00ffff !important;
  -webkit-text-fill-color: #f5f5f5 !important;
  -webkit-text-stroke: 0 !important;
}

body.glitch .project-thumb img,
body.glitch .about-photo img,
body.glitch .modal-gallery img {
  filter: saturate(1.5) contrast(1.2) !important;
  animation: glitch-img 4s steps(1) infinite !important;
}

@keyframes glitch-img {
  0%, 90%, 100% { transform: translate(0); filter: saturate(1.5) contrast(1.2); }
  91% { transform: translate(3px, -2px); filter: saturate(2) hue-rotate(20deg); }
  92% { transform: translate(-3px, 1px); filter: saturate(1.5) contrast(1.2); }
  93% { transform: translate(2px, 2px); filter: saturate(3) hue-rotate(-15deg); }
  94% { transform: translate(0); filter: saturate(1.5) contrast(1.2); }
}

body.glitch .project-card {
  position: relative;
  overflow: hidden !important;
}

body.glitch .project-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(255, 0, 0, .4);
  animation: glitch-line 3s linear infinite;
}

@keyframes glitch-line {
  0% { top: -10%; }
  100% { top: 110%; }
}

body.glitch .project-title {
  text-shadow: 1px 0 #ff0000, -1px 0 #00ffff !important;
  -webkit-text-fill-color: #f5f5f5 !important;
  -webkit-text-stroke: 0 !important;
  animation: glitch-text .5s steps(2) infinite !important;
  animation-delay: calc(var(--i, 0) * .1s) !important;
}

body.glitch .project-number {
  text-shadow: 1px 0 #ff0000, -1px 0 #00ffff !important;
}

body.glitch .section-line,
body.glitch .contact-divider {
  background: #ff0000 !important;
  box-shadow: 0 0 8px #ff0000, 2px 0 #00ffff, -2px 0 #ff00ff !important;
  animation: glitch-text .2s steps(2) infinite !important;
}

body.glitch .modal-content {
  border-color: #ff0000 !important;
  box-shadow: 3px 0 #00ffff, -3px 0 #ff0000, 0 0 30px rgba(255,0,0,.2) !important;
}

body.glitch .modal-title {
  text-shadow: 2px 0 #ff0000, -2px 0 #00ffff !important;
  -webkit-text-fill-color: #f5f5f5 !important;
  -webkit-text-stroke: 0 !important;
}

body.glitch .cursor-dot {
  background: #ff0000 !important;
  box-shadow: 2px 0 #00ffff, -2px 0 #ff00ff !important;
}

body.glitch .cursor-ring {
  border-color: rgba(255, 0, 0, .5) !important;
}

body.glitch .filter-btn.active,
body.glitch .filter-btn:hover {
  text-shadow: 1px 0 #ff0000, -1px 0 #00ffff !important;
}

body.glitch .modal-close {
  text-shadow: 1px 0 #ff0000, -1px 0 #00ffff !important;
}

body.glitch::after {
  content: '[ GL1TCH M0DE ]';
  color: #ff0000;
  text-shadow: 1px 0 #00ffff, -1px 0 #ff00ff;
  animation: glitch-text .3s steps(2) infinite;
}

/* =============================================
   MODE 4 — BEHIND THE SCENES
   ============================================= */
body.behind-scenes {
  background:
    linear-gradient(90deg, rgba(100,100,255,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(100,100,255,.04) 1px, transparent 1px),
    #0a0a0a !important;
  background-size: 40px 40px, 40px 40px !important;
}

body.behind-scenes * {
  transition: all .3s ease !important;
}

body.behind-scenes .project-card,
body.behind-scenes .modal-content,
body.behind-scenes .filter-btn,
body.behind-scenes .skill-pill,
body.behind-scenes .timeline-item,
body.behind-scenes #nav {
  outline: 1px solid rgba(130, 80, 255, .3) !important;
  outline-offset: -1px;
}

body.behind-scenes .project-thumb {
  outline: 1px dashed rgba(255, 130, 80, .4) !important;
}

body.behind-scenes .project-card {
  background: rgba(130, 80, 255, .05) !important;
}

body.behind-scenes .hero-name,
body.behind-scenes .section-header,
body.behind-scenes .contact-heading {
  -webkit-text-fill-color: #f5f5f5 !important;
  -webkit-text-stroke: 0 !important;
  background: rgba(255, 80, 130, .1) !important;
  outline: 1px dashed rgba(255, 80, 130, .4) !important;
  padding: .2rem .5rem !important;
}

body.behind-scenes .project-title {
  -webkit-text-fill-color: #f5f5f5 !important;
  -webkit-text-stroke: 0 !important;
}

body.behind-scenes .project-tag,
body.behind-scenes .modal-tags span {
  outline: 1px dashed rgba(80, 200, 120, .4) !important;
}

body.behind-scenes .project-thumb img,
body.behind-scenes .about-photo img,
body.behind-scenes .modal-gallery img {
  opacity: .5 !important;
  filter: grayscale(.5) !important;
}

body.behind-scenes .section-line,
body.behind-scenes .contact-divider {
  background: rgba(130, 80, 255, .5) !important;
  box-shadow: 0 0 8px rgba(130, 80, 255, .3) !important;
}

.debug-label {
  position: absolute !important;
  top: -1px;
  left: -1px;
  background: rgba(130, 80, 255, .85) !important;
  color: #fff !important;
  font-family: 'Courier New', monospace !important;
  font-size: .55rem !important;
  padding: 1px 5px !important;
  z-index: 100;
  pointer-events: none;
  line-height: 1.5;
  letter-spacing: .02em;
  white-space: nowrap;
}

body.behind-scenes .project-number {
  background: rgba(255, 130, 80, .2) !important;
  outline: 1px dashed rgba(255, 130, 80, .5) !important;
  padding: .1rem .3rem !important;
}

body.behind-scenes .modal-content {
  background: rgba(10, 10, 10, .97) !important;
  border: 1px solid rgba(130, 80, 255, .4) !important;
}

body.behind-scenes .cursor-dot {
  background: #8250ff !important;
}

body.behind-scenes .cursor-ring {
  border-color: rgba(130, 80, 255, .5) !important;
}

body.behind-scenes .modal-close {
  outline: 1px dashed rgba(255, 80, 130, .5) !important;
}

body.behind-scenes::after {
  content: '[ BEHIND THE SCENES ]';
  color: rgba(130, 80, 255, .7);
  font-family: 'Courier New', monospace;
  border: 1px dashed rgba(130, 80, 255, .3);
  background: rgba(10, 10, 10, .8);
}

/* ---------- PROJECTS ---------- */
#projects {
  padding: 8rem 2.5rem 4rem;
}

.section-header {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 1rem;
}

.section-line {
  width: 60px;
  height: 2px;
  background: var(--fg);
  margin-bottom: 3rem;
}

/* Filter Tags */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 3rem;
}

.filter-btn {
  font-family: var(--font-heading);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .45rem 1rem;
  background: transparent;
  border: 1px solid #2a2a2a;
  color: var(--accent);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.8rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  border-color: #333;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: #141414;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.project-card:hover .project-thumb img {
  transform: scale(1.05);
}

.project-thumb-placeholder {
  font-family: var(--font-heading);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #333;
}

.project-number {
  position: absolute;
  top: .8rem;
  right: .8rem;
  font-family: var(--font-heading);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #444;
}

.project-info {
  padding: 1.3rem 1.4rem;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .4rem;
}

.project-desc {
  font-size: .82rem;
  color: var(--accent);
  line-height: 1.55;
  margin-bottom: .8rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.project-tag {
  font-family: var(--font-heading);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .2rem .6rem;
  border: 1px solid #2a2a2a;
  border-radius: 100px;
  color: #777;
}

/* ---------- ABOUT ---------- */
#about {
  padding: 8rem 2.5rem 4rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 5rem;
}

.about-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.about-photo img {
  width: 100%;
  filter: grayscale(1) contrast(1.1);
  transition: filter .6s ease;
}

.about-photo:hover img {
  filter: grayscale(.5) contrast(1.05);
}

.about-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(10,10,10,.9));
  font-family: var(--font-heading);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--accent);
}

.about-bio {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--accent);
  margin-bottom: 2rem;
}

.about-bio strong {
  color: var(--fg);
  font-weight: 600;
}

/* Timeline */
.timeline-section {
  margin-bottom: 4rem;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 2rem;
  color: var(--fg);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #2a2a2a;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: .35rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #333;
  border: 1.5px solid var(--fg);
  transform: translateX(-50%);
  transition: background var(--transition);
}

.timeline-item:hover::before {
  background: var(--fg);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #555;
  margin-bottom: .3rem;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.timeline-place {
  font-size: .82rem;
  color: var(--accent);
}

/* Skills */
.skills-section { margin-bottom: 4rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}

.skill-category h4 {
  font-family: var(--font-heading);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #555;
  margin-bottom: .7rem;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.skill-pill {
  font-family: var(--font-heading);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .35rem .75rem;
  border: 1px solid #2a2a2a;
  border-radius: 100px;
  color: var(--accent);
  transition: all var(--transition);
}

.skill-pill:hover {
  border-color: var(--fg);
  color: var(--fg);
}

/* ---------- CONTACT ---------- */
#contact {
  padding: 8rem 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

#contact.active { display: flex; animation: sectionIn .5s ease forwards; }

.contact-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.1;
  margin-bottom: 3rem;
}

.contact-heading span {
  display: block;
  color: var(--accent);
  font-size: .5em;
  letter-spacing: .1em;
  font-weight: 400;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--font-heading);
  font-size: clamp(.9rem, 2vw, 1.3rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}

.contact-link:hover {
  opacity: .6;
  transform: translateX(8px);
}

.contact-link-label {
  font-size: .65rem;
  color: #444;
  letter-spacing: .15em;
  min-width: 70px;
}

.contact-divider {
  width: 100%;
  height: 1px;
  background: #1a1a1a;
  margin: 3rem 0 2rem;
}

.contact-footer {
  font-family: var(--font-heading);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #333;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

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

/* ---------- Konami Surprise ---------- */
body.konami-active {
  animation: rainbowBg 2s ease;
}

@keyframes rainbowBg {
  0% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(180deg) saturate(3); }
  100% { filter: hue-rotate(0deg); }
}

/* ---------- Project Detail Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
  overflow-y: auto;
  padding: 2rem;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #0f0f0f;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  margin: 4rem auto 2rem;
  transform: translateY(30px);
  transition: transform .4s ease;
  overflow: hidden;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  z-index: 2100;
  background: rgba(255,255,255,.08);
  border: 1px solid #2a2a2a;
  color: var(--fg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  font-family: var(--font-heading);
}

.modal-close:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.modal-header {
  padding: 2.5rem 2.5rem 1.5rem;
  border-bottom: 1px solid #1a1a1a;
}

.modal-number {
  font-family: var(--font-heading);
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #444;
  display: block;
  margin-bottom: .5rem;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.modal-tags span {
  font-family: var(--font-heading);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .25rem .7rem;
  border: 1px solid #2a2a2a;
  border-radius: 100px;
  color: #777;
}

.modal-body {
  padding: 2rem 2.5rem 2.5rem;
}

.modal-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--accent);
  margin-bottom: 2.5rem;
  max-width: 680px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.modal-gallery img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #1a1a1a;
  cursor: pointer;
  transition: transform .3s ease, border-color .3s ease;
}

.modal-gallery img:hover {
  border-color: #333;
  transform: scale(1.01);
}

/* Lightbox for full-size image viewing */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, .95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  cursor: zoom-out;
  padding: 2rem;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
}

body.modal-open {
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-photo {
    max-width: 350px;
  }
}

@media (max-width: 768px) {
  #nav { padding: 1rem 1.5rem; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  #hero { padding: 1.5rem; }

  .hero-meta {
    flex-direction: column;
    gap: 1rem;
  }

  #projects,
  #about,
  #contact {
    padding: 6rem 1.5rem 3rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-link {
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

  .hero-subtitle {
    font-size: .7rem;
    letter-spacing: .15em;
  }

  .section-header {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }

  .modal { padding: .5rem; }
  .modal-content { margin: 3.5rem auto 1rem; }
  .modal-header { padding: 1.5rem 1.2rem 1rem; }
  .modal-body { padding: 1.2rem; }
  .modal-close { top: .8rem; right: .8rem; }
}
