/* ========================
   LOADER
   ======================== */
#loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: #ffffff;
  pointer-events: all;
}

#loader-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

html {
  scrollbar-gutter: stable;
  background-color: #ffffff; /* prevent GPU-layer black flash on compositing */
  color-scheme: light;       /* block dark-mode default background */
}

body.loading {
  overflow: hidden;
}

/* ========================
   RESET & BASE
   ======================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none !important;
}

img {
  image-rendering: auto;
}

body {
  background-color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  overflow-x: hidden;
}

/* ========================
   CUSTOM CURSOR
   ======================== */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Default: orange filled circle */
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #054FF0;

  transition:
    width 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.22s ease;

  opacity: 0; /* hidden until first mouse move */
}

#cursor.cursor-pill {
  background-color: #054FF0;
  border-radius: 30px;
  height: 30px;
}

#cursor-text {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
}

#cursor.cursor-pill #cursor-text {
  opacity: 1;
}

/* ========================
   NAVIGATION
   ======================== */
body > nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px 0 22px;
  height: 50px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #ffffff;
}

.nav-logo {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #424242;
  text-decoration: none;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-img {
  height: 20px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #6B7280;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #424242;
}

.nav-resume {
  background: #054FF0;
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 10px;
  letter-spacing: 0.04em;
  transition: opacity 0.15s ease !important;
}

.nav-resume:hover {
  opacity: 0.82;
  color: #fff !important;
}

.nav-theme-toggle {
  display: none;
}

/* ========================
   THEME ROCKER SWITCH
   ======================== */
.theme-rocker {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 26px;
  height: 58px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  background: #888;
  border: 1.5px solid #707070;
  box-shadow:
    2px 4px 10px rgba(0,0,0,0.32),
    inset 0 1px 3px rgba(0,0,0,0.25),
    inset 0 -1px 2px rgba(255,255,255,0.35);
}

.theme-rocker:focus-visible {
  outline: 2px solid #054FF0;
  outline-offset: 3px;
}

.rocker-paddle {
  position: absolute;
  top: 4px;
  left: 5px;
  right: 5px;
  bottom: 16px;
  border-radius: 3px;
  transform-origin: center center;

  /* Light mode — top half pressed DOWN */
  background: linear-gradient(180deg,
    #c8c8c8 0%,
    #dedede 40%,
    #f0f0f0 70%,
    #f8f8f8 100%
  );
  box-shadow:
    inset 0 3px 4px rgba(0,0,0,0.22),
    inset 0 1px 2px rgba(0,0,0,0.14),
    0 5px 6px rgba(0,0,0,0.18),
    0 2px 3px rgba(0,0,0,0.12),
    inset 0 -2px 3px rgba(255,255,255,0.65);
  transform: perspective(50px) rotateX(28deg);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1),
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.rocker-dot {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
  transition: background 0.25s, box-shadow 0.25s;
}

/* ── Dark mode ─────────────────────────── */
[data-theme="dark"] .theme-rocker {
  background: #4a4a4a;
  border: 1.5px solid rgba(255,255,255,0.22);
  box-shadow:
    2px 4px 14px rgba(0,0,0,0.7),
    inset 0 1px 3px rgba(0,0,0,0.5),
    inset 0 -1px 2px rgba(255,255,255,0.1);
}

[data-theme="dark"] .rocker-paddle {
  background: linear-gradient(180deg,
    #606060 0%,
    #505050 35%,
    #404040 70%,
    #383838 100%
  );
  box-shadow:
    0 -4px 6px rgba(0,0,0,0.45),
    inset 0 1px 2px rgba(255,255,255,0.12),
    inset 0 -3px 4px rgba(0,0,0,0.45),
    inset 0 -1px 2px rgba(0,0,0,0.3);
  transform: perspective(50px) rotateX(-28deg);
}

[data-theme="dark"] .rocker-dot {
  background: #054FF0;
  box-shadow: 0 0 5px #054FF0, 0 0 12px rgba(5,79,240,0.5);
}

/* ========================
   HERO SECTION
   ======================== */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  height: calc(100vh - 50px);
  overflow: hidden;
}

.hero-group {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 10vh;
}

/* Central text — not inside any card */
.hero-center-text {
  position: relative;
  text-align: center;
  max-width: 880px;
  width: 100%;
  z-index: 2;
  padding: 0 24px;
}

.hero-intro {
  font-family: 'Inter','IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 400;
  color: #6B7280;
  margin-bottom: 18px;
  letter-spacing: 0;
}

.hero-main {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 49px;
  font-weight: 400;
  color: #424242;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero-main em {
  font-style: italic;
}

/* ========================
   HERO FLOATING ELEMENTS
   ======================== */

/* Wrapper — transparent on desktop (children are absolute), becomes flex row on mobile/tablet */
.hc-cards {
  display: block;
  position: static;
}

/* Small smiley card — top left area */
.hc-smiley {
  position: absolute;
  top: 13%;
  left: 37%;
  width: 101px;
  height: 101px;
  background: #DCFC73;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float-smiley 5s ease-in-out infinite;
  rotate: 7deg;
  transition: scale 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hc-smiley:hover {
  scale: 1.08;
  z-index: 10;
}

.hc-smiley-text {
  font-family: 'Söhne', 'Inter', sans-serif;
  font-size: 29px;
  font-weight: 500;
  color: rgba(11, 13, 18, 0.55);
  letter-spacing: 0.02em;
  user-select: none;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), font-size 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hc-smiley:hover .hc-smiley-text {
  transform: scale(1.45);
}

/* Note cards — base */
.hc-note {
  position: absolute;
  box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.09);
  width: 211px;
  transition: scale 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hc-note:hover {
  scale: 1.08;
  z-index: 10;
}

/* Purple note — folded bottom-left corner */
.hc-note-1 {
  background-color: #CFC4FF;
  border: none;
  box-shadow: none;
  padding: 26px 21px 39px;
  width: 195px;
  top: 67%;
  left: 22%;
  transform: rotate(-3deg);
  animation: float-note1 6.5s ease-in-out infinite;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 31px 100%, 0 calc(100% - 31px));
  filter: drop-shadow(1px 4px 8px rgba(0, 0, 0, 0.12));
  rotate: -6deg;
}

.hc-note-1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 31px;
  height: 31px;
  background: rgba(0, 0, 0, 0.14);
}

.hc-note-1 p {
  font-family: 'Söhne', 'Inter', -apple-system, sans-serif;
  font-size: 12px;
  color: rgba(11, 13, 18, 0.65);
  line-height: 1.8;
  font-weight: 400;
}

/* Blue note — punch holes at top */
.hc-note-2 {
  background-color: #054FF0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 22px,
    rgba(255, 255, 255, 0.12) 22px,
    rgba(255, 255, 255, 0.12) 23px
  );
  background-position-y: 7px;
  border: 1px solid rgba(5, 40, 180, 0.4);
  padding: 0 23px 18px;
  width: 364px;
  height: 148px;
  top: 67%;
  right: 20%;
  transform: rotate(2.5deg);
  animation: float-note2 7.5s ease-in-out infinite 0.8s;
  rotate: 6deg;
}

.hc-note-2 p {
  font-family: 'Söhne', 'Inter', -apple-system, sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 23px;
  font-weight: 400;
}

/* Punch holes */
.hc-holes {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 8px 10px;
  margin-bottom: 4px;
}

.hc-hole {
  width: 9px;
  height: 9px;
  border-radius: 0;
  background: #fff;
  opacity: 0.9;
  flex-shrink: 0;
}

@keyframes float-smiley {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%       { transform: rotate(-1.7deg) translateY(-8px); }
}
@keyframes float-note1 {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%       { transform: rotate(-2.7deg) translateY(-10px); }
}
@keyframes float-note2 {
  0%, 100% { transform: rotate(2.5deg) translateY(0); }
  50%       { transform: rotate(2.2deg) translateY(-8px); }
}

.chinese {
  font-size: 33px;
  color: #424242;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
}

/* ========================
   WORK SECTION
   ======================== */
.work-section {
  position: relative;
  z-index: 1;
  background-color: #ffffff;
  padding: 140px 48px 160px;
}

/* Two independent flex columns — intentional height stagger */
.work-columns {
  display: flex;
  gap: 32px;
}

.work-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Work card */
.work-card {
  display: flex;
  flex-direction: column;
}

.card-preview-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
}

.card-preview {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: transform 0.35s ease;
}

.card-preview-link:hover .card-preview {
  transform: scale(1.012);
}

.card-pills {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: none;
}

.card-pill {
  position: relative;
  top: auto;
  left: auto;
  z-index: 2;
  background: rgba(255, 255, 255, 0.18);
  color: #F9F8F3;
  border: 1px solid rgba(249, 248, 243, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

/* Single pill not in a container — keep absolute positioning */
.card-preview > .card-pill {
  position: absolute;
  top: 12px;
  left: 12px;
}

[data-theme="dark"] .card-pill {
  color: rgba(249, 248, 243, 0.7);
  border-color: rgba(249, 248, 243, 0.3);
}

/* Left column — shorter previews (3:2) */
.col-left .card-preview {
  aspect-ratio: 3 / 2;
}

/* Right column — taller previews (4:3), creates downward stagger */
.col-right .card-preview {
  aspect-ratio: 4 / 3;
}

/* Preview backgrounds */
.preview-openai {
  background: linear-gradient(138deg, #8A5CC8 0%, #B888A0 38%, #D88C68 68%, #E87040 100%);
  background-image: url('Assets/Bosch/Bosch_Home_Cover.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-hero-text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: clamp(22px, 2.6vw, 46px);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
  text-align: center;
  padding: 0 6%;
  line-height: 1.2;
}

.preview-perplexity-health {
  background-image: url('Assets/VEY/Home_Page_Cover_VEY.png');
  background-size: cover;
  background-position: center;
}

.preview-comet {
  background-image: url('Assets/Inside IPL/Cover_Image_INSIDEIPL.png');
  background-size: cover;
  background-position: center;
}

.preview-figma {
  background-color: #A898CC;
  background-image: url('Assets/Tattoo Machine/Tattoo_Machine_2.png');
  background-size: cover;
  background-position: center;
}

.preview-editorial {
  background-color: #6050A0;
  background-image: url('Assets/Systems/Home_Page_Cover_SYSTEMS.png');
  background-size: cover;
  background-position: center;
}

.preview-editorial .card-pill,
.preview-tmobile .card-pill,
.preview-openai .card-pill {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.25);
  color: #F9F8F3;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.preview-tmobile {
  background-color: #E20074;
  background-image: url('Assets/Sudoku/Sudoku_Home_Cover.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tmobile-wordmark {
  font-family: 'Inter', sans-serif;
  font-size: clamp(18px, 2.2vw, 38px);
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.04em;
}

.tmobile-t {
  font-size: 1.3em;
  font-weight: 300;
  margin-right: 2px;
}

.preview-instagram {
  background-color: #F0A8BE;
}

.preview-voter {
  background-color: #78B8D8;
}

/* Badges are now handled by the custom cursor — no static overlay needed */

/* Card meta text */
.card-meta {
  padding: 16px 0 0;
}

.card-meta-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Locked cards — cursor pill shows but links are non-navigable */
.card-locked .card-preview-link,
.card-locked .card-meta-link {
  pointer-events: none;
}
.card-locked { cursor: default; }

.card-tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: #6B7280;
  font-weight: 400;
  margin-bottom: 6px;
  margin-right: 5px;
  text-transform: uppercase;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 20px;
  padding: 4px 10px;
}

.card-tags-top {
  margin-bottom: 2px;
}

.card-tags-bottom {
  margin-top: 10px;
}

.card-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 38px;
  font-weight: 400;
  color: #424242;
  line-height: 1.15;
  margin-top: 14px;
  margin-bottom: 8px;
  font-style: normal;
}

.card-desc {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.65;
  font-weight: 400;
  margin-bottom: 20px;
}

/* Decorative orange dot before footer */
.work-dot {
  width: 13px;
  height: 13px;
  background-color: #DCFC73;
  border-radius: 50%;
  margin: 60px auto 0;
}

/* ========================
   LIGHTBOX
   ======================== */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 94vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  cursor: zoom-out;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  box-shadow: 0 8px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: rgba(255,255,255,0.7);
  font-size: 32px;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  transition: color 0.15s;
}

.lightbox-close:hover {
  color: #fff;
}

.lightbox-trigger {
  cursor: zoom-in;
}

[data-theme="dark"] .lightbox-overlay {
  background: rgba(0, 0, 0, 0.96);
}

/* ========================
   FOOTER
   ======================== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background-color: #0B0D12;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}

/* Temporarily applied by JS after gigamap fullscreen exit to lock footer hidden
   while OSD may fire async scroll events that would otherwise trigger updateFooter. */
.footer-exit-lock {
  clip-path: inset(100% 0 0 0) !important;
}

.footer-top {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 40px;
  padding: 52px 48px 0;
  position: relative;
}

.footer-top::after {
  content: '';
  position: absolute;
  bottom: -140px;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to bottom, #0B0D12 0%, rgba(11,13,18,0.6) 60%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

.footer-quote {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: normal;
  font-size: 44px;
  line-height: 1.15;
  color: #F9F8F3;
  font-weight: 400;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.footer-made {
  font-size: 11px;
  letter-spacing: 0;
  color: #6B7280;
  font-weight: 400;
}

.footer-nav-cols {
  display: flex;
  gap: 52px;
  padding-top: 4px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #6B7280;
  font-weight: 400;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.footer-link {
  font-size: 15px;
  letter-spacing: 0;
  color: rgba(249,248,243,0.55);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: #054FF0;
}

/* ========================
   FOOTER CANVAS
   ======================== */
.footer-canvas {
  display: block;
  width: 100%;
  height: 260px;
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  #cursor { display: none !important; }
}

/* ========================
   TABLET — 769px–1024px
   ======================== */
@media (min-width: 769px) and (max-width: 1024px) {

  body > nav {
    padding: 0 28px;
  }

  .hero-group {
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 0;
    gap: 0;
  }

  .hc-cards {
    display: flex;
    flex-direction: row;
    gap: 14px;
    justify-content: center;
    padding: 4px 32px 44px;
    width: 100%;
  }

  .hc-smiley {
    display: flex;
    position: relative;
    top: auto; left: auto;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    rotate: 0deg;
    animation: none;
  }

  .hc-note {
    display: block;
    position: relative;
    top: auto; left: auto; right: auto;
    flex-shrink: 0;
    rotate: 0deg;
    animation: none;
  }

  .hc-note-1 {
    width: 200px;
    height: 130px;
    padding: 20px 18px 20px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  }

  .hc-note-1::after {
    width: 28px;
    height: 28px;
  }

  .hc-note-2 {
    width: 280px;
    height: 130px;
    padding: 0 20px 16px;
  }

  .hero-main {
    font-size: 40px;
  }

  .work-section {
    padding: 100px 32px 120px;
  }

  .card-title {
    font-size: 30px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 32px 0;
  }

  .footer-quote {
    font-size: 36px;
  }

  .footer-canvas {
    height: 220px;
  }
}

/* ========================
   MOBILE — max-width 768px
   ======================== */
@media (max-width: 768px) {

  /* NAV */
  body > nav {
    padding: 0 20px;
  }

  .nav-logo {
    font-size: 10px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 10px;
  }

  /* HERO */
  .hero {
    height: auto;
    min-height: calc(100svh - 50px);
  }

  .hero-center-text {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 0 24px;
    max-width: 100%;
  }

  .hero-main {
    font-size: 32px;
  }

  .hero-group {
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 0;
    gap: 0;
  }

  .hero-group {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 20px 0 0;
  }

  .hc-smiley {
    display: flex;
    position: relative;
    top: auto; left: auto;
    width: 76px;
    height: 76px;
    rotate: 7deg;
    animation: none;
    flex-shrink: 0;
  }

  .hc-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 24px;
    width: 100%;
  }

  .hc-note {
    display: block;
    position: relative;
    top: auto; left: auto; right: auto;
    rotate: 0deg;
    animation: none;
    width: 100%;
  }

  .hc-note-1 {
    width: 100%;
    padding: 18px 18px 28px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  }

  .hc-note-1::after {
    width: 28px;
    height: 28px;
  }

  .hc-note-2 {
    width: 100%;
    height: auto;
    padding: 0 18px 16px;
  }

  /* WORK SECTION */
  .work-section {
    padding: 64px 20px 100px;
  }

  .work-columns {
    flex-direction: column;
    gap: 0;
  }

  .col-left .card-preview,
  .col-right .card-preview {
    aspect-ratio: 3 / 2;
  }

  .card-meta {
    padding: 12px 0 0;
  }

  .card-title {
    font-size: 22px;
  }

  .card-desc {
    font-size: 12px;
  }

  /* FOOTER */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 20px 0;
  }

  .footer-quote {
    font-size: 28px;
  }

  .footer-nav-cols {
    gap: 32px;
  }

  .footer-canvas {
    height: 180px;
  }

  .nav-resume {
    display: none;
  }
}

/* ========================
   SMOOTH THEME TRANSITION
   ======================== */
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color 0.45s ease,
    color            0.35s ease,
    border-color     0.35s ease,
    box-shadow       0.35s ease,
    opacity          0.35s ease !important;
}

/* ========================
   DARK MODE
   ======================== */
[data-theme="dark"] {
  background-color: #000000;
  color-scheme: dark;
}

[data-theme="dark"] body {
  background-color: #000000;
  /* Subtle blue atmospheric glow at top — ties to brand colour */
  background-image: radial-gradient(ellipse 120% 35% at 50% 0%,
    rgba(5, 79, 240, 0.07) 0%, transparent 70%);
}

[data-theme="dark"] #loader {
  background: #000000;
}

/* Nav: frosted glass over the warm dark bg */
[data-theme="dark"] body > nav {
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 244, 220, 0.07);
}

[data-theme="dark"] .nav-logo { color: #F9F8F3; }
[data-theme="dark"] .nav-links a { color: #6B7280; }
[data-theme="dark"] .nav-links a:hover { color: rgba(249,248,243,0.75); }

[data-theme="dark"] .nav-resume {
  background: #054FF0;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(5, 79, 240, 0.4);
}

[data-theme="dark"] .nav-theme-toggle {
  border-color: rgba(255, 244, 220, 0.18);
  color: rgba(249,248,243,0.4);
}
[data-theme="dark"] .nav-theme-toggle:hover {
  border-color: rgba(255, 244, 220, 0.38);
  color: rgba(249,248,243,0.65);
}

[data-theme="dark"] .hero-intro     { color: rgba(249, 248, 243, 0.4); }
[data-theme="dark"] .hero-main      { color: #F9F8F3; }
[data-theme="dark"] .hc-note-1::after { border-bottom-color: #424242; }

[data-theme="dark"] .work-section { background-color: #000000; }

[data-theme="dark"] .card-tag {
  color: rgba(249,248,243,0.35);
  border-color: rgba(255, 244, 220, 0.12);
  background: rgba(255, 244, 220, 0.04);
}

[data-theme="dark"] .card-title { color: #F9F8F3; }
[data-theme="dark"] .card-desc  { color: #6B7280; }

/* Footer — richer near-black, warmer quote */
[data-theme="dark"] .site-footer { background-color: #000000; }
[data-theme="dark"] .footer-top::after {
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.6) 60%, transparent 100%);
}
[data-theme="dark"] .footer-quote     { color: #F9F8F3; }
[data-theme="dark"] .footer-made      { color: rgba(249,248,243,0.25); }
[data-theme="dark"] .footer-col-title { color: rgba(249,248,243,0.3); }
[data-theme="dark"] .footer-link      { color: rgba(249,248,243,0.45); }
[data-theme="dark"] .footer-link:hover{ color: #054FF0; }

/* ========================
   PAGE TRANSITIONS
   ======================== */
@keyframes fadeInPage {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.page-enter {
  animation: fadeInPage 0.38s ease forwards;
}

body.page-leaving {
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
  pointer-events: none !important;
}
