*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --canvas: #000000;
  --surface-soft: #0d0d0d;
  --surface-card: #141414;
  --surface-elev: #1f1f1f;
  --hairline: #262626;
  --hairline-str: #3a3a3a;
  --on-dark: #ffffff;
  --body: #cccccc;
  --body-strong: #e6e6e6;
  --muted: #999999;
  --muted-soft: #666666;
  --link: #c3d9f3;
  --success: #5fa657;

  /* Bugatti Display substitute → display headlines, wordmark */
  --font-display:
    "Saira Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Bugatti Monospace substitute → buttons, nav, captions, labels, body */
  --font-mono:
    "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;

  --sidebar-width: 252px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--canvas);
  color: var(--on-dark);
  font-family: var(--font-mono);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
}

/* ── SKIP LINK ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--on-dark);
  color: var(--canvas);
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ── SIDEBAR ── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface-soft);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  will-change: transform;
}

.sidebar::-webkit-scrollbar {
  width: 2px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--hairline-str);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 20px 22px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-logo:hover {
  transform: scale(1.07);
}

#logoMorphPath {
  transition: opacity 0.2s ease;
}

.logo-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark);
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-close {
  display: none;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--hairline-str);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.sidebar-close:hover {
  border-color: var(--on-dark);
  color: var(--on-dark);
}

/* ── SIDEBAR NAV ── */

.sidebar-nav {
  padding: 10px 0 16px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 1px 10px;
  border-radius: 100px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
}

.nav-item:hover {
  color: var(--body-strong);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--hairline-str);
}

.cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cat-icon svg {
  display: block;
}

/* ── NAV ICON ANIMATIONS ── */

@keyframes icon-spin {
  0% {
    transform: rotate(0) scale(1);
  }
  50% {
    transform: rotate(200deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}
@keyframes icon-heartbeat {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.35);
  }
  30% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
  65% {
    transform: scale(1);
  }
}
@keyframes icon-flip {
  0% {
    transform: perspective(200px) rotateY(0);
  }
  50% {
    transform: perspective(200px) rotateY(90deg) scale(0.85);
  }
  100% {
    transform: perspective(200px) rotateY(360deg);
  }
}
@keyframes icon-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-6px);
  }
  50% {
    transform: translateY(-2px);
  }
  75% {
    transform: translateY(-5px);
  }
}
@keyframes icon-swing {
  0%,
  100% {
    transform: rotate(0);
    transform-origin: top center;
  }
  25% {
    transform: rotate(18deg);
    transform-origin: top center;
  }
  75% {
    transform: rotate(-18deg);
    transform-origin: top center;
  }
}
@keyframes icon-shake {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  20% {
    transform: translateX(-3px) rotate(-6deg);
  }
  40% {
    transform: translateX(3px) rotate(6deg);
  }
  60% {
    transform: translateX(-2px) rotate(-4deg);
  }
  80% {
    transform: translateX(2px) rotate(4deg);
  }
}
@keyframes icon-glitch {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 1px) skewX(-4deg);
  }
  40% {
    transform: translate(2px, -1px) skewX(4deg);
  }
  60% {
    transform: translate(-1px, 2px);
  }
  80% {
    transform: translate(1px, -2px) skewX(-2deg);
  }
}
@keyframes icon-jiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-14deg);
  }
  50% {
    transform: rotate(14deg);
  }
  80% {
    transform: rotate(-8deg);
  }
}
@keyframes icon-pop {
  0% {
    transform: scale(1) rotate(0);
  }
  30% {
    transform: scale(1.4) rotate(-8deg);
  }
  60% {
    transform: scale(0.85) rotate(6deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
@keyframes icon-tighten {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-25deg);
  }
  75% {
    transform: rotate(25deg);
  }
}

.nav-item:hover .cat-icon[data-cat="featured"] svg {
  animation: icon-spin 0.6s ease;
}
.nav-item:hover .cat-icon[data-cat="business"] svg {
  animation: icon-shake 0.5s ease;
}
.nav-item:hover .cat-icon[data-cat="finance"] svg {
  animation: icon-flip 0.6s ease;
}
.nav-item:hover .cat-icon[data-cat="food"] svg {
  animation: icon-swing 0.5s ease;
}
.nav-item:hover .cat-icon[data-cat="health"] svg {
  animation: icon-heartbeat 0.7s ease;
}
.nav-item:hover .cat-icon[data-cat="travel"] svg {
  animation: icon-bounce 0.5s ease;
}
.nav-item:hover .cat-icon[data-cat="media"] svg {
  animation: icon-glitch 0.4s ease;
}
.nav-item:hover .cat-icon[data-cat="shopping"] svg {
  animation: icon-jiggle 0.5s ease;
}
.nav-item:hover .cat-icon[data-cat="social"] svg {
  animation: icon-pop 0.5s ease;
}
.nav-item:hover .cat-icon[data-cat="productivity"] svg {
  animation: icon-tighten 0.5s ease;
}

/* ── SIDEBAR FOOTER ── */

.sidebar-footer {
  padding: 18px 20px 28px;
  border-top: 1px solid var(--hairline);
  flex-shrink: 0;
}

.sidebar-footer p {
  font-size: 0.78rem;
  color: var(--muted-soft);
  line-height: 1.7;
  margin-bottom: 8px;
}

.sidebar-footer p:last-child {
  margin-bottom: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-footer a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-footer a:hover {
  color: var(--on-dark);
}

/* ── MOBILE TRIGGER ── */

.mob-trigger {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 300;
  width: 40px;
  height: 40px;
  background: rgba(13, 13, 13, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline-str);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.15s,
    opacity 0.2s;
}

.mob-trigger:hover {
  border-color: var(--on-dark);
}

body.sidebar-open .mob-trigger {
  opacity: 0;
  pointer-events: none;
}

/* ── SIDEBAR OVERLAY ── */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ── MAIN ── */

.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 72px 56px 120px;
}

.page-header,
.category-section {
  max-width: 1100px;
}

/* ── PAGE HEADER ── */

.page-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 64px;
}

.header-content {
  flex: 1;
  min-width: 0;
  max-width: 560px;
}

.header-years {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.header-meta {
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.header-meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.page-header h1 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: none;
  line-height: 1.3;
  color: var(--on-dark);
}

.page-sub {
  margin-top: 12px;
  font-size: 15px;
  color: var(--body);
  line-height: 1.75;
  max-width: 520px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.email-short {
  display: none;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  height: 44px;
  background: transparent;
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--on-dark);
  border-radius: 9999px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-action--copied {
  border-color: var(--success);
  color: var(--success);
}

/* ── SECTIONS ── */

.category-section {
  margin-bottom: 72px;
  scroll-margin-top: 40px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
  color: var(--on-dark);
  margin-bottom: 28px;
}

/* ── CARD GRID ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.card {
  cursor: pointer;
}

.card-thumb {
  background: var(--surface-card);
  overflow: hidden;
  border-radius: 24px;
  position: relative;
  aspect-ratio: 4 / 3;
  transition:
    opacity 0.2s,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-thumb {
  opacity: 0.85;
}

.card--peeking .card-thumb {
  transform: scale(1.04);
  opacity: 0.92;
}

.card-title {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}

.card-thumb video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
}

.card-thumb.loaded video {
  opacity: 1;
}

.card-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--surface-card) 25%,
    var(--surface-elev) 50%,
    var(--surface-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  z-index: 1;
  transition: opacity 0.4s;
}

.card-thumb.loaded::before {
  opacity: 0;
  pointer-events: none;
}

@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}

/* ── LIGHTBOX ── */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: opacity 0.25s;
  will-change: opacity;
}

#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-video {
  display: block;
  max-width: min(520px, 90vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#lightbox.open #lightbox-video {
  transform: scale(1);
}

/* ── SCROLL TO TOP ── */

.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 400;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--on-dark);
  border-radius: 9999px;
  color: var(--on-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    background 0.15s;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ── RESPONSIVE ── */

@media (max-width: 960px) {
  .main {
    padding: 64px 32px 80px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 12px 0 64px rgba(0, 0, 0, 0.8);
  }

  .sidebar-overlay {
    display: block;
  }

  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close {
    display: flex;
  }
  .mob-trigger {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding: 72px 20px 80px;
  }

  .category-section {
    scroll-margin-top: 88px;
  }

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

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions .btn-action {
    justify-content: center;
  }

  .header-actions #emailBtn .email-full {
    display: none;
  }

  .header-actions #emailBtn .email-short {
    display: inline;
  }

  .header-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 28px;
    order: -1;
  }

  .header-meta-item {
    align-items: flex-start;
  }

  .page-header {
    display: flex;
    flex-direction: column;
  }
}
