:root {
  --bg: #080707;
  --bg-soft: #0f0d0d;
  --surface: rgba(255,255,255,.045);
  --surface-strong: #141010;
  --text: #f4efed;
  --muted: #a9a19f;
  --faint: #6d6664;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --burgundy: #63000d;
  --burgundy-2: #8d1020;
  --purple: #8f63ff;
  --purple-soft: #b49bff;
  --success: #a4e7bd;
  --shadow: 0 30px 80px rgba(0,0,0,.35);
  --max: 1240px;
  --ease: cubic-bezier(.22,.61,.36,1);
}


/* =========================================================
   MAHEEM PORTFOLIO — FINAL LIGHT MODE
   Warm Ivory / Cream / Editorial / High Contrast
   ========================================================= */

html[data-theme="light"] {

  /* ---------- Main Background ---------- */

  --bg: #EAE1D5;
  --bg-soft: #E1D6C8;

  /* ---------- Surfaces / Cards ---------- */

  --surface: #F4EEE5;
  --surface-strong: #DED2C4;

  /* ---------- Typography ---------- */

  --text: #211A18;
  --muted: #5D544E;
  --faint: #766B64;

  /* ---------- Borders ---------- */

  --line: rgba(83, 65, 54, .16);
  --line-strong: rgba(83, 65, 54, .26);

  /* ---------- Brand ---------- */

  --burgundy: #63000D;
  --burgundy-2: #7A1523;

  --purple: #6547A8;
  --purple-soft: #7355B7;

  --primary: #63000D;
  --primary-dark: #4D0913;
  --accent: #6547A8;

  --success: #267357;

  /* ---------- Shadows ---------- */

  --shadow:
    0 28px 70px rgba(67, 48, 37, .13);

  --shadow-soft:
    0 12px 35px rgba(67, 48, 37, .075);
}


/* =========================================================
   LIGHT MODE — BODY
   ========================================================= */

html[data-theme="light"] body {

  background:
    radial-gradient(
      circle at 82% 18%,
      rgba(122, 21, 35, .055),
      transparent 28%
    ),
    radial-gradient(
      circle at 15% 72%,
      rgba(101, 71, 168, .035),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #EEE6DC 0%,
      #EAE1D5 48%,
      #E7DDD1 100%
    );

  color: var(--text);
}


/* =========================================================
   LIGHT MODE — MAIN TEXT
   ========================================================= */

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] span {
  color: inherit;
}


/* =========================================================
   LIGHT MODE — SECONDARY TEXT
   ========================================================= */

html[data-theme="light"] .muted,
html[data-theme="light"] .subtitle,
html[data-theme="light"] .description,
html[data-theme="light"] .meta {
  color: var(--muted);
}


/* =========================================================
   LIGHT MODE — CARDS
   ========================================================= */

html[data-theme="light"] .card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .quote-card,
html[data-theme="light"] .about-card,
html[data-theme="light"] .explore-card {

  background: rgba(244, 238, 229, .94);

  border-color: var(--line);

  box-shadow: var(--shadow-soft);
}


/* =========================================================
   LIGHT MODE — CARD HOVER
   ========================================================= */

html[data-theme="light"] .card:hover,
html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .quote-card:hover,
html[data-theme="light"] .about-card:hover,
html[data-theme="light"] .explore-card:hover {

  background: #F8F2E9;

  border-color: var(--line-strong);

  box-shadow:
    0 25px 65px rgba(67, 48, 37, .14);
}


/* =========================================================
   LIGHT MODE — HEADINGS
   ========================================================= */

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4 {

  color: #211A18;
}


/* =========================================================
   LIGHT MODE — LINKS
   ========================================================= */

html[data-theme="light"] a {
  color: #63000D;
}

html[data-theme="light"] a:hover {
  color: #4D0913;
}


/* =========================================================
   LIGHT MODE — BRAND / BURGUNDY
   ========================================================= */

html[data-theme="light"] .burgundy,
html[data-theme="light"] .primary,
html[data-theme="light"] .accent-burgundy {

  color: #63000D;
}


/* =========================================================
   LIGHT MODE — PURPLE
   ========================================================= */

html[data-theme="light"] .purple,
html[data-theme="light"] .lavender,
html[data-theme="light"] .accent-purple {

  color: #6547A8;
}


/* =========================================================
   LIGHT MODE — GREEN STATUS
   ========================================================= */

html[data-theme="light"] .green,
html[data-theme="light"] .status,
html[data-theme="light"] .available {

  color: #267357;
}


/* =========================================================
   LIGHT MODE — TAGS / PILLS
   ========================================================= */

html[data-theme="light"] .tag,
html[data-theme="light"] .pill {

  color: #4B423D;

  background: #E8DED2;

  border-color: #C9BCAE;
}


/* =========================================================
   LIGHT MODE — BUTTONS
   ========================================================= */

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .primary-btn {

  background: #211A18;

  color: #F7F0E7;

  border-color: #211A18;
}


html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .primary-btn:hover {

  background: #63000D;

  color: #FFF8F1;

  border-color: #63000D;
}


/* =========================================================
   LIGHT MODE — SECONDARY BUTTON
   ========================================================= */

html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .secondary-btn {

  background: rgba(244, 238, 229, .72);

  color: #211A18;

  border-color: #C9BCAE;
}


html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .secondary-btn:hover {

  background: #E1D6C8;

  border-color: #AE9F91;
}


/* =========================================================
   LIGHT MODE — NAVIGATION
   ========================================================= */

html[data-theme="light"] header,
html[data-theme="light"] .navbar,
html[data-theme="light"] .nav {

  background: rgba(234, 225, 213, .88);

  border-color: rgba(174, 159, 145, .55);
}


/* =========================================================
   LIGHT MODE — NAV TEXT
   ========================================================= */

html[data-theme="light"] nav a {

  color: #3F3732;
}

html[data-theme="light"] nav a:hover {

  color: #63000D;
}


/* =========================================================
   LIGHT MODE — PROJECT METADATA
   ========================================================= */

html[data-theme="light"] .project-meta,
html[data-theme="light"] .project-number,
html[data-theme="light"] .project-category {

  color: #766B64;
}


/* =========================================================
   LIGHT MODE — QUOTE MARK
   ========================================================= */

html[data-theme="light"] .quote-mark {

  color: #63000D;
}


/* =========================================================
   LIGHT MODE — DIVIDERS
   ========================================================= */

html[data-theme="light"] hr,
html[data-theme="light"] .divider {

  border-color: #C9BCAE;
}


/* =========================================================
   LIGHT MODE — INPUTS
   ========================================================= */

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {

  background: #F5EFE7;

  color: #211A18;

  border-color: #C9BCAE;
}


html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {

  color: #766B64;
}


/* =========================================================
   LIGHT MODE — SELECTION
   ========================================================= */

html[data-theme="light"] ::selection {

  background: #63000D;

  color: #FFF8F1;
}


/* =========================================================
   LIGHT MODE — FOCUS
   ========================================================= */

html[data-theme="light"] :focus-visible {

  outline: 2px solid #6547A8;

  outline-offset: 3px;
}


/* =========================================================
   LIGHT MODE — FEATURE AREAS
   ========================================================= */

html[data-theme="light"] .featured,
html[data-theme="light"] .exploring,
html[data-theme="light"] .feature-card {

  background:
    linear-gradient(
      135deg,
      rgba(210, 188, 187, .36),
      rgba(244, 238, 229, .94)
    );

  border-color: #CBB8B5;
}


/* =========================================================
   LIGHT MODE — CURRENTLY EXPLORING
   ========================================================= */

html[data-theme="light"] .exploring h2,
html[data-theme="light"] .exploring h3 {

  color: #211A18;
}


html[data-theme="light"] .exploring .accent {

  color: #6547A8;
}


/* =========================================================
   LIGHT MODE — REDUCE WASHED OUT EFFECT
   ========================================================= */

html[data-theme="light"] .faint,
html[data-theme="light"] .subtle,
html[data-theme="light"] .caption {

  opacity: 1;

  color: #766B64;
}


/* =========================================================
   LIGHT MODE — NOW CARD
   ========================================================= */

html[data-theme="light"] .now-card {

  background:
    linear-gradient(
      100deg,
      rgba(99, 0, 13, .075),
      rgba(101, 71, 168, .035)
    );

  border-color: var(--line);
}


/* =========================================================
   LIGHT MODE — TERMINAL
   ========================================================= */

html[data-theme="light"] .terminal-mini {

  background: rgba(244, 238, 229, .82);

  border-color: var(--line);
}


/* =========================================================
   LIGHT MODE — SKILL GROUPS
   ========================================================= */

html[data-theme="light"] .skill-groups {

  border-color: var(--line);
}


/* =========================================================
   LIGHT MODE — CHIP TEXT
   ========================================================= */

html[data-theme="light"] .chips span,
html[data-theme="light"] .project-tags span {

  color: #5D544E;

  background: rgba(232, 222, 210, .42);

  border-color: var(--line);
}


/* =========================================================
   LIGHT MODE — ABOUT PORTRAIT
   ========================================================= */

html[data-theme="light"] .portrait-wrap {

  background: #DED2C4;
}


/* =========================================================
   LIGHT MODE — COMMAND PANEL
   ========================================================= */

html[data-theme="light"] .command-overlay {

  background: rgba(43, 31, 25, .32);
}


html[data-theme="light"] .command-panel {

  background: #F0E8DE;

  border-color: var(--line-strong);
}


/* =========================================================
   LIGHT MODE — TOAST
   ========================================================= */

html[data-theme="light"] .toast {

  background: #F0E8DE;

  border-color: var(--line-strong);
}


/* =========================================================
   LIGHT MODE — MOBILE MENU
   ========================================================= */

html[data-theme="light"] .mobile-menu {

  background:
    rgba(234, 225, 213, .96);
}


/* =========================================================
   LIGHT MODE — HERO ACCENTS
   ========================================================= */

html[data-theme="light"] .hero h1 em {

  -webkit-text-stroke:
    1px rgba(33, 26, 24, .72);
}


html[data-theme="light"] .hero-role {

  color: #6547A8;
}


html[data-theme="light"] .hero-role span {

  color: #63000D;
}


/* =========================================================
   LIGHT MODE — BIG NUMBER
   ========================================================= */

html[data-theme="light"] .big-number {

  color: #7A1523;
}


/* =========================================================
   LIGHT MODE — SECTION NUMBERS
   ========================================================= */

html[data-theme="light"] .section-number {

  color: #7A1523;
}


/* =========================================================
   LIGHT MODE — MARQUEE
   ========================================================= */

html[data-theme="light"] .marquee {

  background: rgba(244, 238, 229, .58);

  border-color: var(--line);
}


html[data-theme="light"] .marquee-track b {

  color: #63000D;
}


/* =========================================================
   LIGHT MODE — TEXT BUTTON
   ========================================================= */

html[data-theme="light"] .text-button {

  color: #3F3732;

  border-color: var(--line-strong);
}


/* =========================================================
   LIGHT MODE — READING CARD
   ========================================================= */

html[data-theme="light"] .reading-card {

  background:
    linear-gradient(
      145deg,
      rgba(244, 238, 229, .98),
      rgba(231, 220, 207, .94)
    );
}


/* =========================================================
   LIGHT MODE — QUOTE CARD
   ========================================================= */

html[data-theme="light"] .quote-card {

  background:
    linear-gradient(
      145deg,
      rgba(244, 238, 229, .98),
      rgba(231, 220, 207, .90)
    );
}


/* =========================================================
   LIGHT MODE — QUOTE DISPLAY
   ========================================================= */

html[data-theme="light"] .quote-display > span {

  color: #6547A8;
}


/* =========================================================
   LIGHT MODE — STATEMENT CARD
   ========================================================= */

html[data-theme="light"] .statement-card {

  background: rgba(244, 238, 229, .90);
}


/* =========================================================
   LIGHT MODE — EMAIL
   ========================================================= */

html[data-theme="light"] .email-link {

  color: #211A18;

  border-color: var(--line-strong);
}


html[data-theme="light"] .email-link span {

  color: #6547A8;
}


/* =========================================================
   LIGHT MODE — SOCIAL LINKS
   ========================================================= */

html[data-theme="light"] .social-grid {

  border-color: var(--line);
}


html[data-theme="light"] .social-grid a {

  border-color: var(--line);

  color: #3F3732;
}


html[data-theme="light"] .social-grid a:hover b {

  color: #6547A8;
}


/* =========================================================
   LIGHT MODE — FOOTER
   ========================================================= */

html[data-theme="light"] .footer {

  border-color: var(--line);
}


/* =========================================================
   LIGHT MODE — FOOTER TEXT
   ========================================================= */

html[data-theme="light"] .footer p,
html[data-theme="light"] .footer-right {

  color: #766B64;
}


/* =========================================================
   LIGHT MODE — TOP BUTTON
   ========================================================= */

html[data-theme="light"] #topButton {

  color: #5D544E;

  border-color: var(--line-strong);
}


/* =========================================================
   UNIVERSAL BOX SIZING
   ========================================================= */

* {
  box-sizing: border-box;
}


/* =========================================================
   FIX: Prevent page-level horizontal overflow
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}


html {
  scroll-behavior: smooth;
}


body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}


body.menu-open,
body.command-open {
  overflow: hidden;
}


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


button,
input {
  font: inherit;
}


button {
  color: inherit;
}


::selection {
  background: var(--burgundy);
  color: white;
}


/* =========================================================
   NOISE
   ========================================================= */

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}


/* =========================================================
   SPACE CANVAS
   ========================================================= */

#spaceCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .6;
  pointer-events: none;
}


/* =========================================================
   PRELOADER
   ========================================================= */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity .7s ease, visibility .7s ease;
}


.preloader.done {
  opacity: 0;
  visibility: hidden;
}


.loader-mark {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -.08em;
}


.loader-mark span,
.brand-name span,
.footer-logo span {
  color: var(--purple);
}


.loader-line {
  width: 160px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}


.loader-line i {
  display: block;
  height: 100%;
  width: 45%;
  background: var(--burgundy-2);
  animation: load 1.2s var(--ease) infinite;
}


@keyframes load {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(350%);
  }
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 76px;
  padding: 0 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background .3s, border .3s, backdrop-filter .3s;
}


.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
  border-color: var(--line);
}


/* =========================================================
   BRAND
   ========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  min-width: 0;
  flex-shrink: 1;
}


.brand-symbol {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 14px;
  flex-shrink: 0;
}


.brand-name {
  font-size: 13px;
  white-space: nowrap;
}


/* =========================================================
   DESKTOP NAV
   ========================================================= */

.desktop-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  margin-right: 35px;
}


.desktop-nav a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  transition: color .2s;
}


.desktop-nav a:hover {
  color: var(--text);
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}


/* =========================================================
   ICON BUTTONS
   ========================================================= */

.icon-button,
.menu-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .25s var(--ease);
  flex-shrink: 0;
}


.icon-button:hover,
.menu-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}


.icon-button {
  font-size: 15px;
}


.menu-toggle {
  display: none;
  border-radius: 10px;
  position: relative;
}


.menu-toggle span {
  width: 15px;
  height: 1px;
  background: var(--text);
  position: absolute;
  transition: .25s;
}


.menu-toggle span:first-child {
  transform: translateY(-3px);
}


.menu-toggle span:last-child {
  transform: translateY(3px);
}


.menu-toggle.active span:first-child {
  transform: rotate(45deg);
}


.menu-toggle.active span:last-child {
  transform: rotate(-45deg);
}


/* =========================================================
   MOBILE MENU
   ========================================================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 120px 8vw 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(20px);
  transform: translateY(-100%);
  transition: transform .6s var(--ease);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}


.mobile-menu.open {
  transform: translateY(0);
}


.mobile-menu a {
  font-size: clamp(30px, 8vw, 60px);
  font-weight: 700;
  letter-spacing: -.05em;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  width: min(var(--max), 90vw);
  max-width: 100%;
  margin: auto;
  padding: 140px 0;
  position: relative;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  min-height: 100svh;
  padding-top: 170px;
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}


.hero-content {
  max-width: 850px;
  position: relative;
  z-index: 2;
  min-width: 0;
  width: 100%;
}


.eyebrow {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: .17em;
  font: 500 10px/1 DM Mono, monospace;
  color: var(--muted);
}


.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px var(--success);
  margin-right: 8px;
  vertical-align: 1px;
}


.hero h1 {
  font-size: clamp(60px, 10.8vw, 150px);
  line-height: .84;
  letter-spacing: -.075em;
  margin: 0;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}


.hero h1 em,
h2 em {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
}


.hero h1 em {
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--text) 70%, transparent);
  font-style: italic;
}


.hero-meta {
  margin: 35px 0 30px;
  max-width: 670px;
  min-width: 0;
}


.hero-role {
  font: 500 11px/1.8 DM Mono, monospace;
  color: var(--purple-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
  max-width: 100%;
  overflow-wrap: anywhere;
}


.hero-role span {
  color: var(--burgundy-2);
}


.hero-intro {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 590px;
  overflow-wrap: anywhere;
}


.hero-actions {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  max-width: 100%;
}


.button {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 14px 17px 14px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-transform: uppercase;
  font: 500 10px DM Mono, monospace;
  letter-spacing: .08em;
  transition: .3s var(--ease);
  max-width: 100%;
}


.button span {
  font-size: 15px;
}


.button-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}


.button-primary:hover {
  background: var(--purple-soft);
  border-color: var(--purple-soft);
}


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


/* =========================================================
   HERO QUOTE
   ========================================================= */

.hero-quote {
  position: absolute;
  right: 0;
  bottom: 19%;
  width: 285px;
  z-index: 2;
  max-width: 100%;
}


.quote-mark {
  font: 90px/.4 "Playfair Display", serif;
  color: var(--burgundy-2);
}


.hero-quote p {
  margin: 0 0 10px;
  color: var(--muted);
  font: italic 17px/1.55 "Playfair Display", serif;
}


.hero-quote strong {
  font: 500 9px DM Mono, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
}


/* =========================================================
   HERO ORBS
   ========================================================= */

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}


.orb-a {
  width: 470px;
  height: 470px;
  right: 6%;
  top: 17%;
  background: radial-gradient(
    circle,
    rgba(99,0,13,.5),
    rgba(99,0,13,.04) 65%,
    transparent 72%
  );
  animation: float 8s ease-in-out infinite;
}


.orb-b {
  width: 330px;
  height: 330px;
  right: 22%;
  top: 33%;
  background: radial-gradient(
    circle,
    rgba(143,99,255,.12),
    transparent 68%
  );
  animation: float 11s ease-in-out infinite reverse;
}


@keyframes float {
  50% {
    transform: translate(15px,-22px) scale(1.04);
  }
}


/* =========================================================
   SCROLL CUE
   ========================================================= */

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: 32px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--faint);
  font: 9px DM Mono, monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}


.scroll-cue span {
  width: 32px;
  height: 1px;
  background: var(--line-strong);
}


.hero-index {
  position: absolute;
  right: 0;
  bottom: 32px;
  font: 9px DM Mono, monospace;
  color: var(--faint);
}


/* =========================================================
   MARQUEE
   ========================================================= */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 17px 0;
  background: var(--surface);
}


.marquee-track {
  width: max-content;
  display: flex;
  gap: 35px;
  align-items: center;
  animation: marquee 28s linear infinite;
  font: 500 10px DM Mono, monospace;
  letter-spacing: .16em;
}


.marquee-track b {
  color: var(--burgundy-2);
}


@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}


/* =========================================================
   SECTION HEADING
   ========================================================= */

.section-heading {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  margin-bottom: 70px;
  min-width: 0;
}


.section-number {
  font: 10px DM Mono, monospace;
  color: var(--burgundy-2);
  padding-top: 5px;
}


.section-heading h2 {
  margin: 0;
  font-size: clamp(43px, 6.2vw, 82px);
  line-height: .98;
  letter-spacing: -.06em;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}


.section-heading h2 em {
  color: var(--purple-soft);
}


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

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 9vw;
  align-items: start;
  min-width: 0;
}


.about-copy {
  max-width: 670px;
  min-width: 0;
}


.about-copy p {
  color: var(--muted);
  line-height: 1.85;
  font-size: 15px;
  overflow-wrap: anywhere;
}


.about-copy .lead {
  color: var(--text);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: -.02em;
}


.about-copy strong {
  color: var(--text);
  font-weight: 600;
}


.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}


.portrait-wrap {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: 7px;
}


.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .8;
}


.portrait-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: linear-gradient(
    180deg,
    transparent 45%,
    rgba(0,0,0,.55)
  );
}


.portrait-overlay span {
  font: 700 10px DM Mono, monospace;
  letter-spacing: .2em;
}


.portrait-overlay small {
  margin-top: 7px;
  color: #bbb;
  font: 9px DM Mono, monospace;
}


.about-card-footer {
  display: flex;
  justify-content: space-between;
  padding: 15px 7px 5px;
  color: var(--faint);
  font: 9px DM Mono, monospace;
  letter-spacing: .1em;
}


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

.skills-section {
  border-top: 1px solid var(--line);
}


.skills-layout {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 8vw;
  min-width: 0;
}


.skill-intro {
  position: sticky;
  top: 130px;
  height: fit-content;
  min-width: 0;
}


.big-number {
  font-size: 120px;
  line-height: .7;
  margin: 0 0 30px;
  color: var(--burgundy-2);
  font-weight: 200;
}


.skill-intro > p:not(.big-number) {
  color: var(--muted);
  line-height: 1.8;
  max-width: 330px;
}


.terminal-mini {
  margin-top: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 6px) 1fr;
  gap: 4px;
  min-width: 0;
}


.terminal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
}


.terminal-mini code {
  grid-column: 1/-1;
  margin-top: 12px;
  color: var(--muted);
  font: 10px/1.7 DM Mono, monospace;
  overflow-wrap: anywhere;
}


.terminal-mini b {
  color: var(--success);
  font-weight: 400;
}


.skill-groups {
  border-top: 1px solid var(--line);
  min-width: 0;
}


.skill-group {
  display: grid;
  grid-template-columns: 50px 1fr 1.7fr;
  gap: 20px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}


.skill-index {
  color: var(--burgundy-2);
  font: 10px DM Mono, monospace;
}


.skill-group h3 {
  margin: 0;
  font-size: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}


.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}


.chips span,
.project-tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  font: 9px DM Mono, monospace;
}


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

.projects-section {
  border-top: 1px solid var(--line);
}


.project-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  min-width: 0;
}


.filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}


.filter {
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 13px;
  border-radius: 100px;
  cursor: pointer;
  color: var(--muted);
  font: 9px DM Mono, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: .2s;
}


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


.project-count {
  color: var(--faint);
  font: 9px DM Mono, monospace;
  flex-shrink: 0;
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  min-width: 0;
}


.project-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  transition:
    transform .45s var(--ease),
    border .3s,
    opacity .3s;
  min-width: 0;
  max-width: 100%;
}


.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
}


.project-card.featured {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}


.project-card.hidden {
  display: none;
}


/* =========================================================
   PROJECT VISUAL
   ========================================================= */

.project-visual {
  min-height: 350px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0a0809;
  min-width: 0;
}


.project-card:not(.featured) .project-visual {
  min-height: 300px;
}


.visual-grid {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    linear-gradient(
      rgba(255,255,255,.05) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.05) 1px,
      transparent 1px
    );
  background-size: 35px 35px;
  transform:
    perspective(600px)
    rotateX(55deg)
    scale(1.5)
    translateY(80px);
}


.project-label {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  border-radius: 5px;
  color: #bbb;
  font: 8px DM Mono, monospace;
  letter-spacing: .12em;
}


/* =========================================================
   ASSISTANT UI
   ========================================================= */

.assistant-ui {
  width: 230px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.045);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  text-align: center;
  transform: rotate(-4deg);
  max-width: 100%;
}


.assistant-orb {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      #d9c9ff,
      #8f63ff 35%,
      #63000d 75%
    );
  box-shadow: 0 0 55px rgba(143,99,255,.4);
  animation: breathe 3s ease-in-out infinite;
}


@keyframes breathe {
  50% {
    transform: scale(1.08);
  }
}


.assistant-ui small {
  font: 8px DM Mono, monospace;
  color: var(--purple-soft);
  letter-spacing: .2em;
}


.assistant-ui strong {
  display: block;
  margin: 10px 0 17px;
  font-size: 15px;
}


.assistant-wave {
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}


.assistant-wave i,
.music-bars i {
  display: block;
  width: 3px;
  height: 12px;
  background: var(--purple-soft);
  border-radius: 3px;
  animation: wave 1s ease-in-out infinite;
}


.assistant-wave i:nth-child(2),
.music-bars i:nth-child(2) {
  animation-delay: .12s;
  height: 18px;
}


.assistant-wave i:nth-child(3),
.music-bars i:nth-child(3) {
  animation-delay: .22s;
  height: 23px;
}


.assistant-wave i:nth-child(4),
.music-bars i:nth-child(4) {
  animation-delay: .32s;
  height: 15px;
}


.assistant-wave i:nth-child(5),
.music-bars i:nth-child(5) {
  animation-delay: .42s;
  height: 20px;
}


@keyframes wave {
  50% {
    transform: scaleY(.35);
  }
}


/* =========================================================
   PROJECT INFO
   ========================================================= */

.project-info {
  padding: 27px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}


.project-top {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font: 8px DM Mono, monospace;
  letter-spacing: .12em;
  min-width: 0;
}


.project-info h3 {
  font-size: 42px;
  margin: 25px 0 10px;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}


.project-info p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}


.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}


.project-links {
  margin-top: 25px;
  display: flex;
  gap: 13px;
  align-items: center;
  flex-wrap: wrap;
}


.project-links a {
  font: 10px DM Mono, monospace;
  text-transform: uppercase;
}


.project-links a span {
  color: var(--purple-soft);
  margin-left: 8px;
}


.project-links .coming {
  color: var(--faint);
  font: 8px DM Mono, monospace;
}


.disabled-link {
  opacity: .6;
  cursor: not-allowed;
}


/* =========================================================
   ECHO VISUAL
   ========================================================= */

.echo-visual {
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(143,99,255,.18),
      transparent 40%
    ),
    #09080b;
}


.album {
  width: 145px;
  height: 145px;
  position: relative;
  display: grid;
  place-items: center;
}


.album-core {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(145deg, #1e1724, #09070b);
  font: 700 25px "Playfair Display", serif;
  z-index: 2;
}


.album-ring {
  position: absolute;
  border: 1px solid rgba(143,99,255,.28);
  border-radius: 50%;
  animation: pulse 3s ease-out infinite;
}


.r1 {
  inset: 12px;
}


.r2 {
  inset: -8px;
  animation-delay: .8s;
}


.r3 {
  inset: -28px;
  animation-delay: 1.6s;
}


@keyframes pulse {
  50% {
    opacity: .2;
    transform: scale(1.08);
  }
}


.music-bars {
  position: absolute;
  bottom: 40px;
  display: flex;
  gap: 5px;
  align-items: center;
}


.music-bars i {
  background: var(--burgundy-2);
}


/* =========================================================
   DOCUMENTARY
   ========================================================= */

.documentary-visual {
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(141,16,32,.45),
      transparent 40%
    ),
    #0a0808;
}


.film-frame {
  width: 62%;
  aspect-ratio: 16/10;
  border: 1px solid rgba(255,255,255,.17);
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(-2deg);
  box-shadow: 0 25px 60px #000;
  background: linear-gradient(
    145deg,
    rgba(255,255,255,.04),
    transparent
  );
}


.film-frame span {
  font: 18px "Playfair Display", serif;
  color: #d7c7c2;
}


.film-frame b {
  font: 46px "Playfair Display", serif;
  color: #f3e8e3;
}


.film-frame small {
  margin-top: 10px;
  color: var(--faint);
  font: 7px DM Mono, monospace;
  letter-spacing: .16em;
}


/* =========================================================
   JOURNEY
   ========================================================= */

.journey-section {
  border-top: 1px solid var(--line);
}


.timeline {
  max-width: 930px;
  margin-left: auto;
  border-top: 1px solid var(--line);
}


.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 35px;
  padding: 31px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  min-width: 0;
}


.timeline-year {
  color: var(--faint);
  font: 10px DM Mono, monospace;
}


.timeline-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}


.timeline-item p {
  margin: 0;
  max-width: 600px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}


.timeline-item.active .timeline-year,
.timeline-item.active h3 {
  color: var(--purple-soft);
}


/* =========================================================
   MIND SECTION
   ========================================================= */

.mind-section {
  border-top: 1px solid var(--line);
}


.mind-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  min-width: 0;
}


.reading-card,
.quote-card,
.statement-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 35px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}


.reading-card {
  min-height: 390px;
}


.card-kicker {
  color: var(--burgundy-2);
  font: 9px DM Mono, monospace;
  letter-spacing: .14em;
}


.reading-card h3 {
  font-size: 37px;
  line-height: 1.05;
  letter-spacing: -.05em;
  margin: 65px 0 17px;
  overflow-wrap: anywhere;
}


.reading-card p,
.statement-card p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
  max-width: 470px;
  overflow-wrap: anywhere;
}


/* =========================================================
   BOOK STACK
   ========================================================= */

.book-stack {
  position: absolute;
  right: 35px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  transform: rotate(-5deg);
}


.book-stack span {
  display: grid;
  place-items: center;
  height: 34px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(99,0,13,.18);
  font: 9px DM Mono, monospace;
}


/* =========================================================
   QUOTE CARD
   ========================================================= */

.quote-card {
  min-height: 390px;
  display: flex;
  flex-direction: column;
}


.quote-display {
  margin: auto 0;
}


.quote-display > span {
  font: 65px/.5 "Playfair Display", serif;
  color: var(--purple);
}


.quote-display p {
  font: italic 25px/1.45 "Playfair Display", serif;
  max-width: 470px;
  margin: 15px 0;
  overflow-wrap: anywhere;
}


/* =========================================================
   TEXT BUTTON
   ========================================================= */

.text-button {
  width: fit-content;
  border: 0;
  background: transparent;
  border-bottom: 1px solid var(--line-strong);
  padding: 0 0 6px;
  cursor: pointer;
  font: 9px DM Mono, monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
}


/* =========================================================
   STATEMENT CARD
   ========================================================= */

.statement-card {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}


.statement-card p {
  font: 21px/1.65 "Playfair Display", serif;
  max-width: 760px;
  margin: 0;
  color: var(--text);
}


/* =========================================================
   NOW SECTION
   ========================================================= */

.now-section {
  padding-top: 0;
}


.now-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 55px 1fr auto;
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(
      100deg,
      rgba(99,0,13,.16),
      rgba(143,99,255,.06)
    );
  min-width: 0;
  max-width: 100%;
}


.now-icon {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
}


.now-icon span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 16px var(--success);
}


.now-card h2 {
  margin: 0;
  font-size: 23px;
  overflow-wrap: anywhere;
}


.now-card h2 em {
  color: var(--purple-soft);
}


.now-card > div > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}


.live-badge {
  color: var(--success);
  font: 9px DM Mono, monospace;
  letter-spacing: .12em;
  white-space: nowrap;
}


.live-badge i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 7px;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
  border-top: 1px solid var(--line);
  padding-bottom: 100px;
}


.contact-head h2 {
  margin: 0;
  font-size: clamp(54px, 8vw, 105px);
  line-height: .9;
  letter-spacing: -.07em;
  max-width: 100%;
  overflow-wrap: anywhere;
}


.contact-head h2 em {
  color: var(--purple-soft);
}


.contact-grid {
  margin-top: 85px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 10vw;
  align-items: end;
  min-width: 0;
}


.contact-copy {
  min-width: 0;
}


.contact-copy > p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
  max-width: 450px;
  overflow-wrap: anywhere;
}


.email-link {
  display: inline-flex;
  gap: 22px;
  margin-top: 30px;
  font-size: clamp(17px, 2vw, 25px);
  letter-spacing: -.03em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 9px;
  max-width: 100%;
  overflow-wrap: anywhere;
}


.email-link span {
  color: var(--purple-soft);
}


/* =========================================================
   SOCIAL GRID
   ========================================================= */

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  min-width: 0;
}


.social-grid a {
  display: flex;
  justify-content: space-between;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  min-width: 0;
}


.social-grid a:nth-child(odd) {
  margin-right: 25px;
}


.social-grid a:nth-child(even) {
  margin-left: 25px;
}


.social-grid b {
  color: var(--faint);
  font-weight: 400;
  transition: .2s;
}


.social-grid a:hover b {
  color: var(--purple-soft);
  transform: translate(3px,-3px);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  width: 90vw;
  max-width: var(--max);
  margin: auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}


.footer-logo {
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 13px;
}


.footer p {
  margin: 8px 0 0;
  color: var(--faint);
  font: 9px DM Mono, monospace;
}


.footer-right {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--faint);
  font: 8px DM Mono, monospace;
  text-transform: uppercase;
  min-width: 0;
}


#topButton {
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 0 0 5px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
}


/* =========================================================
   COMMAND PALETTE
   ========================================================= */

.command-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: .25s;
}


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


.command-panel {
  width: min(580px, 90vw);
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(-10px) scale(.98);
  transition: .3s var(--ease);
}


.command-overlay.open .command-panel {
  transform: none;
}


.command-search {
  display: flex;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}


.command-search span {
  color: var(--purple-soft);
}


.command-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  min-width: 0;
}


.command-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr 25px;
  text-align: left;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 13px 20px;
  cursor: pointer;
  min-width: 0;
}


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


.command-list kbd,
.command-list i {
  color: var(--faint);
  font: 9px DM Mono, monospace;
}


.command-list i {
  text-align: right;
}


.command-foot {
  padding: 12px 20px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font: 8px DM Mono, monospace;
  display: flex;
  justify-content: space-between;
}


.command-foot span {
  border: 1px solid var(--line);
  padding: 3px 6px;
  border-radius: 4px;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;
  z-index: 500;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  visibility: hidden;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  border-radius: 7px;
  color: var(--text);
  font: 9px DM Mono, monospace;
  transition: .3s;
  max-width: 90vw;
}


.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}


/* =========================================================
   REVEAL ANIMATION
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .9s var(--ease),
    transform .9s var(--ease);
}


.reveal.visible {
  opacity: 1;
  transform: none;
}


.reveal-delay {
  transition-delay: .12s;
}


/* =========================================================
   CUSTOM CURSOR
   ========================================================= */

.cursor-dot,
.cursor-ring {
  position: fixed;
  z-index: 1001;
  pointer-events: none;
  transform: translate(-50%,-50%);
}


.cursor-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
}


.cursor-ring {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  transition:
    width .2s,
    height .2s,
    background .2s,
    border .2s;
}


.cursor-ring.hover {
  width: 45px;
  height: 45px;
  background: rgba(143,99,255,.08);
  border-color: var(--purple-soft);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .hero {
    padding-top: 140px;
  }

  .hero-quote {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 70px 0 0;
    width: 100%;
  }

  .hero {
    display: block;
  }

  .hero-orb {
    right: -30%;
    top: 10%;
  }

  .about-grid,
  .skills-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .skill-intro {
    position: relative;
    top: auto;
  }

  .skill-groups {
    margin-top: 50px;
  }

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

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

  .statement-card {
    grid-column: auto;
  }

  .contact-grid {
    gap: 50px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {

  .site-header {
    height: 66px;
    padding: 0 5vw;
    width: 100%;
    max-width: 100vw;
  }

  .header-actions {
    gap: 5px;
  }

  .icon-button,
  .menu-toggle {
    width: 34px;
    height: 34px;
  }

  .section {
    width: 90vw;
    max-width: 90vw;
    padding: 100px 0;
  }

  .hero {
    min-height: 100svh;
    padding-top: 125px;
    width: 90vw;
    max-width: 90vw;
  }

  /* FIX: Mobile heading can never push page width */

  .hero h1 {
    font-size: clamp(48px, 14vw, 82px);
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-role {
    line-height: 2;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-intro {
    font-size: 14px;
    max-width: 100%;
  }

  .hero-actions {
    width: 100%;
    max-width: 100%;
  }

  .hero-actions .button {
    flex: 1;
    justify-content: space-between;
    min-width: 0;
  }

  .section-heading {
    grid-template-columns: 35px 1fr;
    margin-bottom: 45px;
    min-width: 0;
  }

  .section-heading h2 {
    font-size: 42px;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .about-copy .lead {
    font-size: 18px;
  }

  .skill-group {
    grid-template-columns: 30px 1fr;
    min-width: 0;
  }

  .skill-group .chips {
    grid-column: 2;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .project-visual,
  .project-card:not(.featured) .project-visual {
    min-height: 270px;
    max-width: 100%;
  }

  .project-info h3 {
    font-size: 34px;
  }

  .project-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .timeline-item {
    grid-template-columns: 55px 1fr;
    gap: 15px;
  }

  .reading-card,
  .quote-card {
    min-height: 340px;
    padding: 25px;
  }

  .reading-card h3 {
    margin-top: 50px;
    font-size: 30px;
  }

  .statement-card {
    padding: 25px;
  }

  .statement-card p {
    font-size: 18px;
  }

  .now-card {
    grid-template-columns: 45px 1fr;
    padding: 22px;
    width: 100%;
    max-width: 100%;
  }

  .live-badge {
    grid-column: 2;
  }

  .social-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .social-grid a:nth-child(odd),
  .social-grid a:nth-child(even) {
    margin: 0;
  }

  .footer {
    flex-direction: column;
    width: 90vw;
    max-width: 90vw;
  }

  .footer-right {
    flex-wrap: wrap;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  /* FINAL MOBILE OVERFLOW SAFETY FIX */

  .site-header,
  .mobile-menu,
  .section,
  .hero,
  .footer,
  .project-card,
  .about-card,
  .now-card,
  .reading-card,
  .quote-card,
  .statement-card {
    max-width: 100%;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* =========================================================
   MAHEEM PORTFOLIO
   FINAL HERO BACKGROUND / NAME CLIPPING FIX
   ========================================================= */

/*
 * IMPORTANT:
 * The body controls page-level horizontal overflow.
 * The hero itself must NOT clip its decorative artwork.
 */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}


@supports not (overflow: clip) {

  html,
  body {
    overflow-x: hidden;
  }
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;

  /*
   * Do not clip the large background/orb artwork.
   */

  overflow: visible !important;

  width: min(var(--max), 90vw);
  max-width: var(--max);
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero-content {
  position: relative;
  z-index: 3;

  min-width: 0;
  width: 100%;
}


/* =========================================================
   MARUF ALLAM MAHIM
   ========================================================= */

.hero h1 {
  position: relative;
  z-index: 3;

  /*
   * Prevent the large name from being cut.
   */

  width: max-content;
  max-width: none;

  overflow: visible;

  /*
   * IMPORTANT:
   * Do not force individual letters/words to break.
   */

  word-break: normal;
  overflow-wrap: normal;
}


.hero h1 em {
  display: inline-block;
  white-space: nowrap;
}


/* =========================================================
   HERO DECORATIVE ORBS / BACKGROUND
   ========================================================= */

.hero-orb {
  position: absolute;
  z-index: 0;

  pointer-events: none;

  /*
   * The artwork is allowed to extend outside the hero.
   */

  overflow: visible;
}


.orb-a,
.orb-b {
  pointer-events: none;
}


/* =========================================================
   QUOTE
   ========================================================= */

.hero-quote {
  z-index: 3;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

  .hero {
    width: 90vw;
    max-width: 90vw;
    overflow: visible !important;
  }

  .hero h1 {
    width: auto;
    max-width: 100%;

    overflow: visible;

    word-break: normal;
    overflow-wrap: normal;
  }

  .hero h1 em {
    display: inline-block;
    white-space: normal;
  }

  .hero-orb {
    z-index: 0;
    right: -20%;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {

  .hero {
    width: 90vw;
    max-width: 90vw;

    overflow: visible !important;

    padding-top: 125px;
  }

  .hero h1 {
    width: 100%;
    max-width: 100%;

    overflow: visible;

    word-break: normal;
    overflow-wrap: normal;
  }

  .hero h1 em {
    display: inline;
    white-space: normal;
  }

  /*
   * Keep the decorative background visible
   * without allowing it to create horizontal scrolling.
   */

  .hero-orb {
    z-index: 0;
    pointer-events: none;
  }

  .orb-a {
    width: 420px;
    height: 420px;
    right: -35%;
  }

  .orb-b {
    width: 290px;
    height: 290px;
    right: -15%;
  }
}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

  .hero h1 {
    font-size: clamp(43px, 13vw, 60px);
    letter-spacing: -.065em;
  }

  .orb-a {
    right: -55%;
  }

  .orb-b {
    right: -25%;
  }
}
