/* ============================================================
   ALEEZA EJAZ — PORTFOLIO STYLESHEET
   ============================================================ */

/* ── Custom Properties ── */
:root {
  --black:         #000000;
  --white:         #ffffff;
  --off-white:     #f2f0eb;

  --blue:   #3cc1ee;
  --pink:   #ff5ab8;
  --orange: #fca234;
  --purple: #8d79ff;

  --orange-gradient: linear-gradient(90deg, var(--black) 64%, var(--orange) 100%); 
  --blue-gradient:   linear-gradient(90deg, var(--black) 64%, var(--blue) 100%); 
  --pink-gradient:   linear-gradient(90deg, var(--black) 64%, var(--pink) 100%); 
  --purple-gradient:  linear-gradient(90deg, var(--black) 64%, var(--purple) 100%); 


  --nav-height:    72px;
  --section-pad:   clamp(3rem, 6vw, 6rem);
  --page-margin:   clamp(1.5rem, 5vw, 5rem);

  --font-display:  'DM Serif Display', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:     8px;
  --radius-md:     20px;
  --radius-lg:     48px;
  --radius-pill:   999px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.12);
  --shadow-lift:   0 12px 40px rgba(0,0,0,0.22);

  --cursor: url('media/cursor.png') 16 16, auto;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-x: hidden;
  max-width: 100%;
  cursor: var(--cursor);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--black);
  background-color: var(--white);
  background-image: radial-gradient(circle, rgba(19,31,100,0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: var(--cursor);
  overflow-x: hidden;
  max-width: 100%;
}

img, video { display: block; max-width: 100%; }
ul  { list-style: none; }
a   { color: inherit; text-decoration: none; }
ol  { list-style: none; }

/* ── Typography Scale ── */
h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
}

p {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  font-weight: 300;
  line-height: 1.75;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(141,121,255,0.1);
  color: #534ab7;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Accent/background utilities */
.accent-blue   { color: var(--blue); }
.accent-pink   { color: var(--pink); }
.accent-orange { color: var(--orange); }
.background-blue {background: var(--blue); }
.background-pink {background: var(--pink); }
.background-orange {background: var(--orange); }
.background-purple {background: var(--purple); }
.mono          { font-family: var(--font-mono); font-size: 0.9em; }

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  cursor: var(--cursor);
  padding: 0 var(--page-margin);
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--white);
  transition: color 0.2s;
  cursor: var(--cursor);
}
.nav-logo:hover { color: var(--purple); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--white);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  cursor: var(--cursor);
}
.nav-links a:hover { color: var(--purple); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: var(--cursor);
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  cursor: var(--cursor);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 7px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -7px); }


/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  margin-top: 3rem;
  padding: clamp(1rem, 6vw, 6.25rem);
  align-items: center;
  justify-content: center;
  background-color: #000;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-content h1 {
  background: linear-gradient(135deg, #ffddfa 20%, #fff 50%, #ffddfa 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 12px rgba(102,113,233,0.5));
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 1.2vw, 0.9rem);
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65);
  margin-top: 1.25rem;
  text-transform: uppercase;
}

.hero-icon {
  position: relative;
  width: clamp(1.5rem, 15vw, 7.5rem);
  margin-top: clamp(-1.5rem, 6vw, -3rem);
  z-index: 3;
  filter: drop-shadow(0 4px 12px rgba(102,113,233,0.4));
  animation: float 4s ease-in-out infinite;
}
 

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: var(--section-pad) var(--page-margin) 0;
}

.page-hero-inner {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  min-height: clamp(220px, 35vw, 440px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}

/* ── Intro ── */
.intro {
  position: relative;
  margin: var(--section-pad) auto;
  max-width: 1300px;
  height: clamp(22rem, 9vw, 30rem);
  padding: clamp(2rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem);
  border-radius: var(--radius-lg) 0 var(--radius-lg) 0;
  background: rgb(255, 255, 255);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

.intro-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.9;
}

.intro-inner { 
  position: relative; z-index: 1;
}

.intro-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.intro-label.black {color: var(--purple); margin-bottom: 0; gap: 1rem;}


.intro-heading {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--white);
  background: var(--pink);
  margin-bottom: 1.25rem;
}

.intro-text-col p {
  color: var(--white);
  background: var(--black);
  margin-bottom: 1rem;
}

.intro-text-col a {
  color: rgb(255, 194, 250);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ── Projects ── */
.projects {
  position: relative;
  margin: var(--section-pad) auto;
  padding: clamp(2rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem);
  padding-top: 0;
  padding-bottom: 0;
  max-width: 1300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
}
 
.projects-card { 
  width: 100%;
  height: 6rem;
  background: var(--black);
  border-radius: var(--radius-lg) 0 var(--radius-lg) 0;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

@media (max-width: 700px) {
  .projects-card { 
  width: 100%;
  height: 7rem;
  background: var(--black);
  border-radius: var(--radius-lg) 0 var(--radius-lg) 0;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: left;
}

.projects-card.contact {
   height: 10rem;
   
}
  
}

.projects-card.orange {background: var(--orange-gradient);}
.projects-card.blue {background: var(--blue-gradient);}
.projects-card.pink {background: var(--pink-gradient);}
.projects-card.purple {background: var(--purple-gradient);}

.projects-heading {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--white);
}
 
.projects-card-content {
  color: var(--white);
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);  
}

.projects-title {
  width: 100%;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--black);
  text-align: left;
}
 
.projects-subheading {
  transition: color 0.2s ease;
}
.projects-card:hover .projects-subheading--orange { color: var(--orange);}
.projects-card:hover .projects-subheading--blue { color: var(--blue);}
.projects-card:hover .projects-subheading--pink { color: var(--pink);}
.projects-card:hover .projects-subheading--purple { color: var(--purple);}
 
.projects-card .work-category-label {
  flex-wrap: wrap;
  white-space: normal;
}
 


/* ──  Button ── */
.button-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(-2rem, 1vw, -3rem);
  margin-bottom: 5rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 1rem 2.25rem;
  border-radius: var(--radius-lg);
  background-color: var(--purple);
  border: none;
  cursor: var(--cursor);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.button.blue { 
 background-color: var(--blue);
}

@media (max-width: 700px) {
  .button { 
    padding: 0.5rem 1.25rem;
  }
}

.button:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-lift);
}
.button:active {
  transform: scale(1.02);
}
 
.button-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}

/* ── Work strips (index) ── */
.work {
  padding: 3rem var(--page-margin);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: var(--black);
  
}
.work-category {
  padding: 3rem var(--page-margin);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.work-category:last-child { border-bottom: none; }
.work-category--alt { background: rgba(255,255,255,0.03); }

.work-category-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.work-category-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(141,121,255,0.12);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(141,121,255,0.3);
}

.work-category h3 { color: var(--white); }

.work-strip { 
  margin: 0.5rem;
  display: flex; 
  gap: 0.75rem; 
  padding-bottom: 1.5rem;
  width: max-content; 
  animation: marquee 30s linear infinite; 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.artwork {
  margin-top: 0.65rem;
  height: clamp(200px, 35vw, 420px);
  width: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  filter: brightness(0.92);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.artwork:hover { transform: scale(1.02) translateY(-4px); filter: brightness(1); }

/* ── CTA Banner ── */
.cta-banner { padding: var(--section-pad) var(--page-margin); }

.cta-inner {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 5rem) 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}

.cta-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 3.5vw, 3rem);
  color: var(--white);
  filter: drop-shadow(0 4px 12px rgba(228,128,255,0.4));
  text-align: center;
  line-height: 1.3;
}

/* ── Shared page section header ── */
.section-header {
  max-width: 1300px;
  margin: 0 auto clamp(2rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
}

.section-sub {
  font-size: 0.95rem;
  color: rgba(0,0,0,0.5);
  max-width: 600px;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1300px;
  margin: 0 auto clamp(1.5rem, 2.5vw, 2.5rem);
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(141,121,255,0.3);
  background: transparent;
  color: rgba(0,0,0,0.45);
  cursor: var(--cursor);
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {color:var(--purple); border-color: var(--purple); background:rgb(from var(--purple) r g b / 0.1);}
.filter-btn.blue:hover, .filter-btn.active {color:var(--blue); border-color: var(--blue); background:rgb(from var(--blue) r g b / 0.1);}
.filter-btn.orange:hover, .filter-btn.active {color:var(--orange); border-color: var(--orange); background:rgb(from var(--orange) r g b / 0.1);}
.filter-btn.pink:hover, .filter-btn.active {color:var(--pink); border-color: var(--pink); background:rgb(from var(--pink) r g b / 0.1);}


/* ── Tool tags (shared) ── */
.tool-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(141,121,255,0.1);
  color: #534ab7;
  border: 1px solid rgba(141,121,255,0.2);
}

/* ── No results ── */
.no-results {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(0,0,0,0.35);
  text-align: center;
  padding: 3rem 0;
  max-width: 1300px;
  margin: 0 auto;
}

/* ── Gallery page (art.html) ── */
.gallery-page-section {
  padding: var(--section-pad) var(--page-margin);
}

.gallery-page-inner { max-width: 1300px; margin: 0 auto; }

.art-masonry {
  columns: 3;
  gap: 1rem;
}

.art-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  animation: floatIn 0.7s ease-out both;
  animation-play-state: paused;
}

.art-item img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  transition: transform 0.35s ease;
}
.art-item:hover img { transform: scale(1.04); }

.art-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 60%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.art-item:hover .art-item-overlay { opacity: 1; }

.art-item-overlay figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.art-item-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--white);
}
.art-item-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
}

/* ── Work page ── */
.work-list-section,
.work-detail-section { padding: var(--section-pad) var(--page-margin); }

.work-inner { max-width: 1300px; margin: 0 auto; }

.work-list { display: flex; flex-direction: column; gap: 10px; }

.work-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 0.5px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-md);
  cursor: var(--cursor);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 1300px;
}

/* Card gradient is driven by the same color keyword as everything else
   on the card — set once in JS from the project's `category`. */
.work-entry.orange { background: var(--orange-gradient); }
.work-entry.blue   { background: var(--blue-gradient); }
.work-entry.pink   { background: var(--pink-gradient); }
.work-entry.purple { background: var(--purple-gradient); }

.work-entry:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(141,121,255,0.1);
}

.work-entry-info { flex: 1; min-width: 0; }

.work-entry-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.work-entry-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin: 6px 0 10px;
}

.work-entry-arrow {
  font-size: 1rem;
  color: var(--white);
  align-self: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.work-entry:hover .work-entry-arrow { transform: translateX(4px); }

/* ── Title highlight — same "marker" treatment as .projects-heading
   span.background-* on the homepage, sized for the work list/detail ── */
.work-entry-title,
.work-detail-title {
  font-family: var(--font-display);
  font-style: italic;
}

.work-title-highlight {
  display: inline-block;
  color: var(--white);
  padding: 2px 4px;
  border-radius: 4px;
}
.work-title-highlight.blue   { background: var(--blue); }
.work-title-highlight.orange { background: var(--orange); }
.work-title-highlight.pink   { background: var(--pink); }
.work-title-highlight.purple { background: var(--purple); }

/* ── Tags — bright solid "circle" chips, cycling the accent palette ── */
.work-entry-tags,
.work-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.work-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--black);
  border: 1px solid var(--tag-color, rgba(255,255,255,0.3));
  color: var(--white);
}
.work-tag.blue   { --tag-color: var(--blue); }
.work-tag.pink   { --tag-color: var(--pink); }
.work-tag.orange { --tag-color: var(--orange); }
.work-tag.purple { --tag-color: var(--purple); }

/* ── Detail view ── */
.back-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--black);
  background: none;
  border: none;
  cursor: var(--cursor);
  padding: 0;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--purple); }

.work-detail {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 5px solid var(--black);
}

.work-detail-header {
  padding: 2.5rem 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Same color keyword, same gradient var, just applied to the header instead
   of the whole card — set via JS in buildWorkDetail(), same as .work-entry. */
.work-detail-header.orange { background: var(--orange-gradient); }
.work-detail-header.blue   { background: var(--blue-gradient); }
.work-detail-header.pink   { background: var(--pink-gradient); }
.work-detail-header.purple { background: var(--purple-gradient); }

.work-detail-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

.work-detail-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin: 0 2.5rem;
}

.work-detail-body {
  padding: 1.75rem 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.work-block-label {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.work-block-label.purple { color: var(--purple); }
.work-block-label.pink   { color: var(--pink); }
.work-block-label.blue   { color: var(--blue); }
.work-block-label.orange { color: var(--orange); }
.work-block-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(141,121,255,0.15);
}

.work-block-text {
  font-size: 0.95rem;
  color: rgba(0,0,0,0.6);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.work-block-text:last-child { margin-bottom: 0; }

.work-outcome-box {
  background: rgba(141,121,255,0.06);
  border: 1px solid rgba(141,121,255,0.16);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.work-outcome-box p {
  font-size: 0.95rem;
  color: rgba(0,0,0,0.6);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.work-outcome-box p:last-child { margin-bottom: 0; }

.work-detail-links { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 0.5rem; }

.work-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.5);
  transition: all 0.2s;
}
.work-link:hover { border-color: var(--purple); color: var(--purple); background: rgba(141,121,255,0.07); }

.work-link--primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.work-link--primary:hover { background: #1a0050; border-color: var(--purple); color: var(--white); }
/* ============================================================
   WORK DETAIL — SIDEBAR BOXES + IMAGE / GALLERY SECTIONS
   Additions for content parsed from per-project .txt files.
   ============================================================ */

/* ── Two-column layout: main write-up + sidebar boxes ───────
   Falls back to a single column automatically when there is
   no sidebar content (sidebarHTML is empty in script.js).
──────────────────────────────────────────────────────────────── */
.work-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

@media (min-width: 820px) {
  .work-detail-layout {
    grid-template-columns: 3fr 1.5fr;
    align-items: start;
    gap: 1rem;
  }
  .work-detail-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
  }
}

.work-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Sidebar box — horizontal rectangle, same black-to-category
   gradient as the detail page header. Label color and border
   stay tinted per category so the box still reads as belonging
   to that project. ────────────────────────────────────────────
──────────────────────────────────────────────────────────────── */
.work-sidebar-box {
  border-radius: var(--radius-md);
  padding: 1.75rem 2.5rem 2.5rem;
  margin: 2rem 2rem 0.5rem 2rem;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  border: 1px solid rgb(from var(--purple) r g b / 0.4);
  background: var(--purple-gradient);
}

.work-sidebar-box-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
}

.work-sidebar-box-content {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--white);
}

.work-sidebar-box.blue   { border-color: rgb(from var(--blue) r g b / 0.4);   background: var(--blue-gradient); }
.work-sidebar-box.blue   .work-sidebar-box-label { color: var(--blue); }
.work-sidebar-box.orange { border-color: rgb(from var(--orange) r g b / 0.4); background: var(--orange-gradient); }
.work-sidebar-box.orange .work-sidebar-box-label { color: var(--orange); }
.work-sidebar-box.pink   { border-color: rgb(from var(--pink) r g b / 0.4);   background: var(--pink-gradient); }
.work-sidebar-box.pink   .work-sidebar-box-label { color: var(--pink); }
.work-sidebar-box.purple { border-color: rgb(from var(--purple) r g b / 0.4); background: var(--purple-gradient); }
.work-sidebar-box.purple .work-sidebar-box-label { color: var(--purple); }

/* ── Single embedded image ({image} sections) ────────────── */
.work-single-image { margin-top: 0.5rem; }
.work-single-image img {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.work-single-image figcaption {
  font-size: 0.8rem;
  color: rgba(0,0,0,0.45);
  margin-top: 6px;
  font-style: italic;
}

/* ── Image gallery ({gallery} sections) — carousel shell, track,
   slides, arrows, dots, and caption. Sized for a full-width block
   inside the detail write-up rather than a fixed-height card. ──
──────────────────────────────────────────────────────────────── */
.card-carousel {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #080808;
}

.work-gallery {
  height: 460px;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .work-gallery { height: 320px; }
}

/* ── Image area — holds the sliding track, arrows, and dots.
   Takes all remaining height above the fixed caption bar. ──── */
.carousel-image-area {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.carousel-track-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  position: relative;
}

.carousel-slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Caption bar — solid black, sits below the image, holds the
   prev/next arrows on either side of the caption text. Arrows
   live here now instead of overlaying the image, so they're
   always visible (no hover needed — works on touch too). ───── */
.carousel-caption-bar {
  flex-shrink: 0;
  background: var(--black);
  padding: 10px 14px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.caption-label {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}

/* ── Arrows — static buttons in the caption bar, tinted to the
   project's category color, white outline/icon. ────────────── */
.carousel-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--purple);
  border: 1.5px solid var(--white);
  color: var(--white);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: var(--cursor);
  transition: filter 0.2s, transform 0.15s, opacity 0.2s;
}

.carousel-arrow:hover { filter: brightness(0.85); }
.carousel-arrow:active { transform: scale(0.92); }

.carousel-arrow.dimmed {
  opacity: 0.3;
  pointer-events: none;
}

.card-carousel.blue   .carousel-arrow { background: var(--blue); }
.card-carousel.orange .carousel-arrow { background: var(--orange); }
.card-carousel.pink   .carousel-arrow { background: var(--pink); }
.card-carousel.purple .carousel-arrow { background: var(--purple); }

.carousel-dots {
  position: absolute;
  bottom: 13px;
  right: 14px;
  display: flex;
  gap: 5px;
  z-index: 4;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.25s, width 0.25s, border-radius 0.25s;
  cursor: var(--cursor);
}

.dot.active { background: #fff; width: 14px; border-radius: var(--radius-pill); }

.card-carousel.blue   .dot.active { background: var(--blue); }
.card-carousel.orange .dot.active { background: var(--orange); }
.card-carousel.pink   .dot.active { background: var(--pink); }
.card-carousel.purple .dot.active { background: var(--purple); }

/* ── Fullscreen image lightbox — opened by tapping/clicking a
   gallery image. One shared overlay element, reused across
   every gallery on the page. ────────────────────────────────
──────────────────────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox-overlay.active { display: flex; }

.lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 22px;
  cursor: var(--cursor);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--purple);
  border: 1.5px solid var(--white);
  color: var(--white);
  font-size: 22px;
  cursor: var(--cursor);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s;
}
.lightbox-arrow:hover { filter: brightness(0.85); }

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-overlay.blue   .lightbox-arrow { background: var(--blue); }
.lightbox-overlay.orange .lightbox-arrow { background: var(--orange); }
.lightbox-overlay.pink   .lightbox-arrow { background: var(--pink); }
.lightbox-overlay.purple .lightbox-arrow { background: var(--purple); }

@media (max-width: 600px) {
  .lightbox-arrow { width: 36px; height: 36px; font-size: 18px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* ── Inline links within .txt content — [label](url) syntax.
   Scoped to rendered content only; global `a` reset elsewhere
   on the site is untouched. ─────────────────────────────────
──────────────────────────────────────────────────────────────── */
.work-block-text a,
.work-sidebar-box-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}
.work-block-text a { color: var(--purple); }
.work-sidebar-box-content a { color: var(--white); }
.work-block-text a:hover,
.work-sidebar-box-content a:hover { opacity: 0.7; }

/* -- Footer --*/

footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 3rem var(--page-margin);
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  margin: -1rem;
  color: var(--white);
}

.footer-links { display: flex; gap: 2rem; align-items: center; }
.footer-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  cursor: var(--cursor);
}
.footer-links a:hover { color: var(--purple); }

.footer-copy {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* ── Animations ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

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

@keyframes floatIn {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* ── Responsive ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(12px);
    display: none;
    padding: 1rem 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 99;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.75rem var(--page-margin);
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
  }
  .nav-links.active { display: flex; }

  .intro-grid { grid-template-columns: 1fr; }
  .intro-image-col { display: none; }

  .projects { flex-direction: column; }

  .art-masonry { columns: 2; }

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

  .cloud-detail-header,
  .cloud-detail-body { padding-left: 1.5rem; padding-right: 1.5rem; }
  .cloud-detail-divider { margin: 0 1.5rem; }

  .modal-scroll { max-height: 80vh; }

  .work-category-label { flex-direction: column; gap: 0.5rem; }

}

@media (max-width: 480px) {
  :root { --page-margin: 1.25rem; }
  .hero-icon { width: 80px; margin-top: -2rem; }
  .art-masonry { columns: 1; }
  .cloud-detail { border-radius: var(--radius-md); }
}