/* ============================================================
   ALI RAZA — PORTFOLIO
   Design system: "Inspector" — a UI/UX portfolio that speaks
   in the vocabulary of its own craft (specs, grids, redlines).
   ============================================================ */

/* ---------- Tokens ---------- */
:root{
  /* color */
  --canvas: #ECEFEE;
  --canvas-soft: #E3E6E4;
  --paper: #FFFFFF;
  --ink: #0E1013;
  --ink-soft: #494D52;
  --ink-faint: #82878C;
  --accent: #E8380F;
  --accent-bright: #FF5A33;
  --accent-tint: #FDE2DA;
  --ink-deep: #14161A;
  --ink-deep-soft: #9BA0A6;
  --ink-deep-faint: #5E6368;
  --line: #D6D9D5;
  --line-deep: #2A2D31;

  /* type */
  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  --text-hero: clamp(2.75rem, 4.6vw + 1.2rem, 6.4rem);
  --text-xl: clamp(2.1rem, 2.6vw + 1rem, 3.6rem);
  --text-lg: clamp(1.5rem, 1.2vw + 1rem, 2.1rem);
  --text-md: clamp(1.15rem, 0.5vw + 1rem, 1.4rem);
  --text-body-lg: clamp(1.05rem, 0.3vw + 0.95rem, 1.2rem);
  --text-body: 1rem;
  --text-sm: 0.9rem;
  --text-mono: 0.78rem;

  /* layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(4.5rem, 9vw, 8.5rem);
  --radius-card: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.16,.84,.32,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body{
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg{ display:block; max-width:100%; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background:none; border:0; cursor:pointer; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4,p,figure{ margin:0; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus & a11y ---------- */
:focus-visible{
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link{
  position: fixed;
  top: -60px; left: 1rem;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top .25s var(--ease);
}
.skip-link:focus{ top: 1rem; }

/* ---------- Layout helpers ---------- */
.container{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section{
  position: relative;
  padding-block: var(--section-pad);
}
.section--tight{ padding-block: clamp(3rem, 5vw, 5rem); }
.section--dark{
  background: var(--ink-deep);
  color: var(--paper);
}

/* eyebrow / mono labels */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.section--dark .eyebrow{ color: var(--ink-deep-soft); }
.eyebrow::before{
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.section-head{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-head h2{
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 14ch;
  margin-top: .6rem;
}
.section-head .section-head__note{
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: var(--text-body-lg);
  max-width: 32ch;
  line-height: 1.5;
}
.section--dark .section-head__note{ color: var(--ink-deep-soft); }

/* ---------- Inspector marks (signature system) ---------- */
.spec-tag{
  position: absolute;
  top: 1.4rem; left: var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: .5rem;
  z-index: 2;
  pointer-events: none;
}
.spec-tag::before{ content: "—"; opacity: .5; }
.section--dark .spec-tag{ color: var(--ink-deep-faint); }

.bracket-frame{
  position: relative;
}
.bracket-frame::before,
.bracket-frame::after,
.bracket-frame .bf-tr,
.bracket-frame .bf-br{
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 1.5px solid var(--ink-faint);
  opacity: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.bracket-frame::before{ top: -8px; left: -8px; border-right:0; border-bottom:0; transform: translate(4px,4px); }
.bracket-frame::after{ bottom: -8px; right: -8px; border-left:0; border-top:0; transform: translate(-4px,-4px); }
.bracket-frame .bf-tr{ top: -8px; right: -8px; border-left:0; border-bottom:0; transform: translate(-4px,4px); }
.bracket-frame .bf-br{ bottom: -8px; left: -8px; border-right:0; border-top:0; transform: translate(4px,-4px); }
.bracket-frame:hover::before,
.bracket-frame:hover::after,
.bracket-frame:hover .bf-tr,
.bracket-frame:hover .bf-br{
  opacity: 1;
  transform: translate(0,0);
}
.bracket-frame .dim-tag{
  position: absolute;
  bottom: -1.9rem; left: -8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: .2rem .55rem;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}
.bracket-frame:hover .dim-tag{ opacity: 1; transform: translateY(0); }

/* ---------- Progress bar & cursor ---------- */
.progress-bar{
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 1000;
  transform-origin: left;
}

.cursor-dot{
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%,-50%);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
  mix-blend-mode: normal;
  display: none;
}
@media (hover:hover) and (pointer:fine){
  .cursor-dot{ display: block; }
}
.cursor-dot.is-hover{
  width: 34px; height: 34px;
  background: rgba(232,56,15,.14);
  border: 1.5px solid var(--accent);
}

/* ---------- Reveal on scroll ---------- */
[data-reveal]{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding-block: 1.1rem;
  background: rgba(236,239,238,.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), padding .3s var(--ease);
}
.nav.is-scrolled{
  border-bottom-color: var(--line);
  padding-block: .75rem;
}
.nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.nav-logo-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-links{
  display: flex;
  align-items: center;
  gap: 2.1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: .04em;
}
.nav-links a{
  position: relative;
  color: var(--ink-soft);
  padding-block: .3rem;
  transition: color .25s var(--ease);
}
.nav-links a::after{
  content:"";
  position: absolute;
  left:0; right:0; bottom:0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover{ color: var(--ink); }
.nav-links a:hover::after{ transform: scaleX(1); }

.nav-right{ display:flex; align-items:center; gap: 1.25rem; }
.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
}
.nav-toggle span{
  width: 20px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity: 0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile{
  display: none;
  flex-direction: column;
  gap: .25rem;
  padding: 1.25rem var(--gutter) 1.75rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1.1rem;
}
.nav-mobile a{
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.nav-mobile.is-open{ display: flex; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: .03em;
  padding: .9rem 1.5rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  will-change: transform;
}
.btn-primary{
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover{ background: var(--accent); }
.btn-ghost{
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover{ border-color: var(--ink); }
.section--dark .btn-ghost{ border-color: var(--line-deep); color: var(--paper); }
.section--dark .btn-ghost:hover{ border-color: var(--accent-bright); }
.btn-accent{
  background: var(--accent);
  color: var(--paper);
}
.btn-accent:hover{ background: var(--accent-bright); }
.btn-lg{
  padding: 1.15rem 2rem;
  font-size: 0.95rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero{
  padding-top: clamp(8.5rem, 14vw, 12rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy .avail{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: .06em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: .5rem .9rem .5rem .7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.6rem;
}
.avail-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2BAA5E;
  box-shadow: 0 0 0 3px rgba(43,170,94,.18);
  flex-shrink: 0;
}
.hero-copy h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-hero);
  line-height: .98;
  letter-spacing: -0.03em;
  margin-bottom: 1.3rem;
}
.hero-copy h1 em{
  font-style: normal;
  color: var(--accent);
}
.hero-copy p{
  font-size: var(--text-body-lg);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.55;
  margin-bottom: 2rem;
}
.hero-cta{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.role-chips{
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.role-chips span{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  padding: .4rem .7rem;
  border-radius: var(--radius-pill);
}

/* ---------- Hero device mockup ---------- */
.hero-visual{ position: relative; }
.device-frame{
  background: var(--paper);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -25px rgba(14,16,19,.25);
  overflow: hidden;
  transform: rotate(1.2deg);
}
.device-chrome{
  display:flex;
  align-items:center;
  gap: .8rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--canvas-soft);
}
.device-dots{ display:flex; gap: 5px; }
.device-dots span{ width:8px; height:8px; border-radius:50%; background: var(--line); }
.device-url{
  flex:1;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  background: var(--paper);
  border-radius: 5px;
  padding: .3rem .6rem;
}
.device-body{ display:flex; min-height: 320px; }
.device-sidebar{
  width: 30%;
  background: var(--canvas-soft);
  border-right: 1px solid var(--line);
  padding: 1rem .85rem;
  display:flex; flex-direction:column; gap:.4rem;
}
.device-sidebar .ds-logo{
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--ink); margin-bottom: .9rem;
}
.device-navline{
  height: 9px;
  border-radius: 4px;
  background: var(--line);
  width: 78%;
}
.device-navline.active{
  background: var(--accent);
  width: 88%;
}
.device-main{ flex:1; padding: 1.1rem; display:flex; flex-direction:column; gap: 1rem; }
.device-stats{ display:flex; gap: .6rem; }
.device-stat{
  flex:1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem .7rem;
}
.device-stat .ds-label{ height:6px; width:55%; background: var(--line); border-radius:3px; margin-bottom:.5rem; }
.device-stat .ds-num{ font-family: var(--font-mono); font-size: .95rem; font-weight:600; }
.device-chart{
  flex:1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display:flex;
  align-items:flex-end;
  gap: 6px;
  padding: .9rem;
  min-height: 110px;
}
.device-chart i{
  flex:1;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  border-radius: 3px 3px 0 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1s var(--ease);
}
.device-frame.is-visible .device-chart i{ transform: scaleY(var(--h, .5)); }

/* floating tag near hero visual */
.hero-visual .float-tag{
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .5rem .85rem;
  display:flex; align-items:center; gap:.45rem;
  box-shadow: 0 14px 30px -16px rgba(14,16,19,.3);
}
.hero-visual .float-tag.tag-1{ top: -1.2rem; right: 1.5rem; }
.hero-visual .float-tag.tag-2{ bottom: -1.2rem; left: 1rem; color: var(--ink-soft); }
.float-tag-dot{ width:6px; height:6px; border-radius:50%; background:#2BAA5E; }

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 2rem;
}
.trust-inner{
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  gap: 2.5rem 3.2rem;
  justify-content: space-between;
}
.trust-label{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.trust-logos{
  display:flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items:center;
}
.trust-logos span{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-faint);
  letter-spacing: -0.01em;
  opacity: .75;
  transition: opacity .25s var(--ease), color .25s var(--ease);
}
.trust-logos span:hover{ opacity: 1; color: var(--ink); }

/* ============================================================
   WORK
   ============================================================ */
.work-list{
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 7vw, 6rem);
}
.case-row{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}
.work-list .case-row:last-child{ border-bottom: 0; padding-bottom: 0; }
.case-row.flip{ direction: rtl; }
.case-row.flip > *{ direction: ltr; }

.case-copy .case-index{
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--accent);
  letter-spacing: .08em;
  display:block;
  margin-bottom: 1rem;
}
.case-copy h3{
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: .9rem;
}
.case-copy .case-problem{
  color: var(--ink-soft);
  font-size: var(--text-body-lg);
  line-height: 1.55;
  max-width: 42ch;
  margin-bottom: 1.4rem;
}
.case-tags{
  display:flex; flex-wrap:wrap; gap:.5rem;
  margin-bottom: 1.6rem;
}
.case-tags span{
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  padding: .35rem .6rem;
  border-radius: var(--radius-pill);
}
.case-link{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: .2rem;
  transition: color .25s var(--ease), border-color .25s var(--ease), gap .25s var(--ease);
}
.case-link:hover{ color: var(--accent); border-color: var(--accent); gap: .85rem; }
.case-link.is-disabled{
  color: var(--ink-faint);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
}

.case-visual{ position: relative; }
.case-visual .device-frame{ transform: rotate(0); }
.case-row:nth-child(odd) .device-frame{ transform: rotate(-1deg); }
.case-row:nth-child(even) .device-frame{ transform: rotate(1deg); }

/* mobile-style mockup variant */
.device-frame.is-mobile{ max-width: 230px; margin-inline:auto; }
.device-frame.is-mobile .device-body{ min-height: 380px; flex-direction:column; }
.device-frame.is-mobile .device-sidebar{ display:none; }
.device-frame.is-mobile .device-status{
  display:flex; justify-content:space-between; font-family:var(--font-mono);
  font-size:.6rem; color:var(--ink-faint); padding: .3rem 1rem 0;
}
.device-frame.is-mobile .device-cards{ padding: .9rem; display:flex; flex-direction:column; gap:.6rem; }
.device-frame.is-mobile .mob-card{
  border:1px solid var(--line); border-radius:10px; padding:.7rem .8rem;
  display:flex; align-items:center; gap:.7rem;
}
.device-frame.is-mobile .mob-avatar{ width:30px; height:30px; border-radius:50%; background:var(--canvas-soft); flex-shrink:0; }
.device-frame.is-mobile .mob-lines{ flex:1; display:flex; flex-direction:column; gap:.4rem; }
.device-frame.is-mobile .mob-lines i{ display:block; height:7px; border-radius:3px; background:var(--line); }
.device-frame.is-mobile .mob-lines i:first-child{ width:70%; }
.device-frame.is-mobile .mob-lines i:last-child{ width:40%; background: var(--canvas-soft); }
.device-frame.is-mobile .mob-pill{
  font-family: var(--font-mono); font-size:.6rem; padding:.25rem .5rem;
  border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--accent);
  flex-shrink:0;
}

/* components / design-system mockup variant */
.device-frame.is-system .device-body{ flex-direction:column; min-height:auto; }
.system-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: .8rem;
  padding: 1.2rem;
}
.sys-swatch{ height: 46px; border-radius: 8px; }
.sys-block{
  border: 1px solid var(--line); border-radius: 8px; padding: .8rem;
  display:flex; flex-direction:column; gap:.5rem; align-items:flex-start;
  grid-column: span 1;
}
.sys-block .ds-label{ height:6px; width:60%; background: var(--line); border-radius:3px; }
.sys-btn{
  font-family: var(--font-mono); font-size:.62rem; padding:.35rem .7rem;
  border-radius: var(--radius-pill); background: var(--ink); color: var(--paper);
}
.sys-input{
  width:100%; height: 22px; border:1px solid var(--line); border-radius:5px; background:var(--canvas-soft);
}
.sys-toggle{
  width: 30px; height: 16px; border-radius: var(--radius-pill); background: var(--accent);
  position: relative;
}
.sys-toggle::after{ content:""; position:absolute; right:2px; top:2px; width:12px; height:12px; border-radius:50%; background:var(--paper); }

/* ============================================================
   PROCESS
   ============================================================ */
.process-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.process-step{
  background: var(--paper);
  padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1.4rem, 2.5vw, 1.8rem);
  display:flex; flex-direction:column; gap: .9rem;
}
.process-step .ps-num{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: .06em;
}
.process-step h3{
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.process-step p{
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ============================================================
   ABOUT / CAPABILITIES
   ============================================================ */
.about-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.about-bio p{
  font-size: var(--text-body-lg);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 50ch;
}
.about-bio p + p{ margin-top: 1.1rem; }
.about-facts{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 1rem;
  margin-top: 2.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.about-facts dt{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .35rem;
}
.about-facts dd{
  margin:0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.capabilities-list{
  display:flex; flex-direction:column; gap:0;
}
.cap-item{
  display:flex; align-items:baseline; justify-content:space-between; gap:1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.cap-item:first-child{ border-top: 1px solid var(--line); }
.cap-item .cap-name{
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.cap-item .cap-tag{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-inner{ text-align:center; }
.contact h2{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 16ch;
  margin: 1.2rem auto 1.4rem;
}
.contact p{
  color: var(--ink-deep-soft);
  font-size: var(--text-body-lg);
  max-width: 42ch;
  margin: 0 auto 2.6rem;
  line-height: 1.55;
}
.contact-email{
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  display: inline-flex;
  align-items:center;
  gap: .7rem;
  color: var(--paper);
  border: 1px solid var(--line-deep);
  padding: 1.1rem 1.9rem;
  border-radius: var(--radius-pill);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.contact-email:hover{ border-color: var(--accent-bright); background: rgba(255,90,51,.08); }
.contact-socials{
  display:flex; flex-wrap:wrap; justify-content:center; gap: 1.8rem;
  margin-top: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.contact-socials a{
  color: var(--ink-deep-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: .2rem;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.contact-socials a:hover{ color: var(--paper); border-color: var(--accent-bright); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer{ padding-block: 1.8rem; }
.footer-inner{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-deep-soft);
  border-top: 1px solid var(--line-deep);
  padding-top: 1.6rem;
}
.footer-inner a{ color: var(--ink-deep-soft); }
.footer-inner a:hover{ color: var(--paper); }
.back-to-top{
  display:inline-flex; align-items:center; gap:.4rem;
  color: var(--ink-deep-soft);
  transition: color .25s var(--ease);
}
.back-to-top:hover{ color: var(--paper); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px){
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; max-width: 420px; margin-inline:auto; width: 100%; }
  .case-row, .case-row.flip{
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .case-visual{ order: -1; max-width: 440px; margin-inline:auto; width:100%; }
  .about-grid{ grid-template-columns: 1fr; }
  .process-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px){
  .nav-cta{ display:none; }
  .process-grid{ grid-template-columns: 1fr; }
  .process-step{ border-bottom: 1px solid var(--line); }
  .about-facts{ grid-template-columns: 1fr 1fr; }
  .trust-inner{ justify-content:flex-start; }
  .spec-tag{ display: none; }
  .contact-email{ font-size: 1rem; padding: 1rem 1.4rem; }
}

@media (max-width: 420px){
  .hero-cta{ flex-direction: column; align-items: stretch; }
  .hero-cta .btn{ justify-content:center; }
}

/* ============================================================
   ADDITIONS — page-load, word reveal, polish
   ============================================================ */

/* ---------- Page-load body fade ---------- */
body{
  opacity: 1;
  transition: opacity .4s ease;
}
body.is-loading{
  opacity: 0;
}
body.is-loaded{
  opacity: 1;
}

/* ---------- Hero word-split reveal ---------- */
.hero-copy h1.words-split{
  overflow: visible;
}
.word-wrap{
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.02;
}
.word{
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  transition:
    transform .75s var(--ease),
    opacity .75s var(--ease);
  transition-delay: calc(var(--wi, 0) * 0.07s + 0.15s);
}
.hero-copy h1.words-visible .word{
  transform: translateY(0);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce){
  .word{ transform: none; opacity: 1; }
}

/* ---------- Nav active link ---------- */
.nav-links a.is-active{
  color: var(--ink);
}
.nav-links a.is-active::after{
  transform: scaleX(1);
}

/* ---------- Float tags ambient animation ---------- */
@keyframes floatY{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}
@keyframes floatY2{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-5px); }
}
.hero-visual .float-tag.tag-1{
  animation: floatY 4.2s ease-in-out infinite;
}
.hero-visual .float-tag.tag-2{
  animation: floatY2 3.8s ease-in-out 0.6s infinite;
}
@media (prefers-reduced-motion: reduce){
  .hero-visual .float-tag.tag-1,
  .hero-visual .float-tag.tag-2{
    animation: none;
  }
}

/* ---------- Hero visual ambient grain overlay ---------- */
.hero-visual::before{
  content: "";
  position: absolute;
  inset: -20px;
  background-image:
    radial-gradient(ellipse 120% 80% at 60% 40%, rgba(232,56,15,.06) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  border-radius: 24px;
}
.hero-visual > *:not(.float-tag){ position: relative; z-index: 1; }

/* ---------- Case row hover — gentle card lift ---------- */
.case-row{
  transition: none;
}
.case-visual .bracket-frame{
  transition: transform .4s var(--ease);
}
.case-row:hover .case-visual .bracket-frame{
  transform: translateY(-4px);
}

/* ---------- Process step reveal (JS-driven) ---------- */
.process-step{
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .7s var(--ease),
    transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.process-step.is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .process-step{ opacity: 1; transform: none; }
}

/* ---------- Process step hover ---------- */
.process-step{
  cursor: default;
}
.process-step:hover{
  background: var(--canvas);
}
.process-step:hover .ps-num{
  letter-spacing: .12em;
  transition: letter-spacing .3s var(--ease);
}

/* ---------- Capability item hover scan ---------- */
.cap-item{
  position: relative;
  overflow: hidden;
  transition: padding-inline .3s var(--ease);
}
.cap-item::before{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
  z-index: 0;
}
.cap-item.is-hover::before{
  transform: scaleX(1);
}
.cap-item .cap-name,
.cap-item .cap-tag{
  position: relative;
  z-index: 1;
}
.cap-item.is-hover .cap-name{
  color: var(--accent);
}

/* ---------- Insight cards (case study) base reveal ---------- */
.insight-card{
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity .75s var(--ease),
    transform .75s var(--ease),
    box-shadow .3s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.insight-card.is-visible{
  opacity: 1;
  transform: translateY(0);
}
.insight-card:hover{
  box-shadow: 0 16px 40px -20px rgba(14,16,19,.16);
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce){
  .insight-card{ opacity: 1; transform: none; }
}

/* ---------- Timeline step reveal ---------- */
.timeline-step{
  opacity: 0;
  transform: translateX(-18px);
  transition:
    opacity .7s var(--ease),
    transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.timeline-step.is-visible{
  opacity: 1;
  transform: translateX(0);
}
@media (prefers-reduced-motion: reduce){
  .timeline-step{ opacity: 1; transform: none; }
}

/* ---------- Stat card accent bar on scroll-in ---------- */
.stat-card{
  position: relative;
  overflow: hidden;
}
.stat-card::after{
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  transition: width 1.1s var(--ease);
}
.stat-row.is-counted .stat-card::after{
  width: 100%;
}

/* ---------- Contact email — underline sweep ---------- */
.contact-email{
  position: relative;
}
.contact-email::after{
  content: "";
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%; height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.contact-email:hover::after{
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Section dark background ambient glow ---------- */
.section--dark{
  position: relative;
  overflow: hidden;
}
.section--dark::before{
  content: "";
  position: absolute;
  width: 60vw; height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,56,15,.07) 0%, transparent 70%);
  top: -20%; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ---------- Cursor dot initial hidden ---------- */
.cursor-dot{
  opacity: 0;
  transition:
    width .25s var(--ease),
    height .25s var(--ease),
    background .25s var(--ease),
    opacity .4s var(--ease);
}

/* ---------- Trust logo inline gap fix on mobile ---------- */
@media (max-width: 500px){
  .trust-logos{
    gap: 1.2rem;
  }
  .trust-logos span{
    font-size: .88rem;
  }
}
/* ============================================================
   SECTION HEAD — inspired by murynmukha.com + azizkhaldi.com
   Full-width border-top, tight-tracked h2, optional index.
   Replaces the old eyebrow + h2 + side-note pattern entirely.
   ============================================================ */

/* Remove old section-head so the specificity is clean */
.section-head {
  display: block;
  border-top: 1.5px solid var(--ink);
  padding-top: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: clamp(2.5rem, 5.5vw, 5rem);
}
.section--dark .section-head {
  border-top-color: var(--line-deep);
}

.section-head-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Large tight title */
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw + .8rem, 4.2rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 100%;
  margin: 0;
  flex: 1;
}
.section--dark .section-head h2 { color: var(--paper); }

/* Section index number — azizkhaldi-style, floated right */
.section-head__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-shrink: 0;
  padding-top: .35rem;   /* optical align to first text baseline */
}
.section--dark .section-head__index { color: var(--ink-deep-faint); }

/* ============================================================
   CASE STUDY ROW HEADER — murynmukha case-study__header style
   flex: title+caption left, CTA link right
   ============================================================ */

.case-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  padding-bottom: clamp(1.2rem, 2vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.4rem, 2.5vw, 2rem);
}

.case-row-text {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.case-row-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw + .5rem, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.07;
  color: var(--ink);
  margin: 0;
}

.case-row-caption {
  font-size: clamp(.9rem, .5vw + .8rem, 1.05rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .45em;
  flex-wrap: wrap;
}
.case-row-caption .crc-desc  { color: var(--ink-soft); }
.case-row-caption .crc-dot   { color: var(--line); font-weight: 600; font-size: 1.1em; }
.case-row-caption .crc-year  { color: var(--ink-faint); }

.case-row-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

/* Tighten the overall case row now the header carries the meta */
.case-copy .case-index { display: none; }  /* replaced by case-row-head */
.case-copy h3 { display: none; }           /* replaced by case-row-title */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 620px) {
  .case-row-head { flex-direction: column; align-items: flex-start; }
  .section-head h2 { font-size: clamp(1.7rem, 7vw, 2.5rem); }
}

/* ============================================================
   ABOUT SUBHEAD — second line under the tight section heading
   ============================================================ */
.about-subhead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.2vw + .8rem, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

/* case-row-head needs enough left breathing room vs the case-copy grid */
.case-copy { padding-top: 0; }

/* section-head inside about-grid doesn't need full section padding */
.about-grid .section-head { padding-top: 0; }

/* contact section heading — keep existing large style but add tight tracking */
.contact h2 {
  letter-spacing: -0.03em;
}

/* ============================================================
   EXPERIENCE TIMELINE (replaces case-study rows)
   ============================================================ */
.timeline{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2.4rem, 4vw, 3.2rem);
  padding-left: clamp(1.8rem, 3vw, 2.6rem);
}
.timeline::before{
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.timeline-item{ position: relative; }
.timeline-marker{
  position: absolute;
  left: clamp(-1.8rem, -3vw, -2.6rem);
  top: .3rem;
}
.timeline-dot{
  display: block;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-faint);
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.timeline-item:first-child .timeline-dot{
  background: var(--accent);
  border-color: var(--accent);
}
.timeline-head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.timeline-head h3{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.timeline-dates{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
.timeline-company{
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: .3rem;
}
.timeline-desc{
  margin-top: .9rem;
  color: var(--ink-soft);
  max-width: 68ch;
  line-height: 1.65;
}
.timeline-content .case-tags{ margin-top: 1rem; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-intro{
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: var(--text-body-lg);
  line-height: 1.6;
  margin-top: -1.4rem;
  margin-bottom: 2.2rem;
}
.gallery-filters{
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2.4rem;
}
.gallery-filter-btn{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: .02em;
  padding: .55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.gallery-filter-btn:hover{ border-color: var(--ink); color: var(--ink); }
.gallery-filter-btn.is-active{
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2rem);
}
.gallery-card{
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gallery-card:hover{
  transform: translateY(-4px);
}
.gallery-card.is-hidden{ display: none; }

.gallery-visual{
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--canvas-soft);
  box-shadow: 0 10px 30px -18px rgba(14,16,19,.25);
}
.gallery-card:hover .gallery-visual{ box-shadow: 0 18px 40px -18px rgba(14,16,19,.32); }
.gallery-visual img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s var(--ease);
}
.gallery-card:hover .gallery-visual img{ transform: scale(1.04); }

.gallery-info{
  padding-top: .9rem;
}
.gallery-cat{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.gallery-note{
  margin-top: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.gallery-note code{
  font-family: var(--font-mono);
  background: var(--canvas-soft);
  padding: .1rem .35rem;
  border-radius: 4px;
}

/* ============================================================
   EDUCATION & LANGUAGES (About section addition)
   ============================================================ */
.edu-lang-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.edu-lang-grid h4{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.edu-item{ margin-bottom: 1rem; }
.edu-item:last-child{ margin-bottom: 0; }
.edu-item strong{
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.edu-item span{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-top: .15rem;
}
.lang-chips{ display: flex; flex-wrap: wrap; gap: .55rem; }
.lang-chip{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: .4rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
}

/* ============================================================
   RESPONSIVE — timeline & gallery
   ============================================================ */
@media (max-width: 980px){
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .edu-lang-grid{ grid-template-columns: 1fr; gap: 1.8rem; }
}
@media (max-width: 640px){
  .timeline{ padding-left: 1.5rem; }
  .timeline-marker{ left: -1.5rem; }
  .gallery-grid{ grid-template-columns: 1fr; }
  .gallery-filters{ gap: .5rem; }
  .gallery-filter-btn{ font-size: .72rem; padding: .5rem .9rem; }
}

/* ============================================================
   HERO — PRINT BOARD MOCKUP (replaces app/device frame)
   ============================================================ */
.print-board{
  background: var(--paper);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -25px rgba(14,16,19,.25);
  overflow: hidden;
  transform: rotate(1.2deg);
  padding: 1.2rem;
}
.print-poster{
  position: relative;
  aspect-ratio: 4 / 3.1;
  border-radius: 12px;
  background:
    radial-gradient(120% 140% at 20% 15%, rgba(232,56,15,.14), transparent 55%),
    linear-gradient(155deg, var(--ink-deep) 0%, #1c1f24 60%, var(--ink-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  overflow: hidden;
}
.poster-ring{
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 5px solid var(--accent-bright);
  opacity: 0;
  transform: scale(.6) rotate(-25deg);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.poster-ring::before{
  content:"";
  position:absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  opacity: .5;
}
.print-board.is-visible .poster-ring{
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.poster-type{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.pt-line{
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--paper);
  opacity: .85;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .6s var(--ease) .15s;
}
.pt-line--lg{ width: 118px; }
.pt-line--sm{ width: 70px; opacity: .45; }
.print-board.is-visible .pt-line{ transform: scaleX(1); }
.print-swatches{
  display: flex;
  gap: .6rem;
  padding-top: 1.1rem;
}
.print-swatches span{
  flex: 1;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* ==========================================================
   GALLERY LIGHTBOX
   ========================================================== */
.gallery-visual { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 16, 19, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

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

.lightbox[hidden] { display: flex; }

.lightbox-content {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  transform: scale(.96);
  transition: transform .25s ease;
}

.lightbox.is-open .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  background: var(--paper);
  object-fit: contain;
}

.lightbox-caption {
  color: var(--canvas);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: .02em;
  text-align: center;
}

.lightbox-counter {
  color: var(--ink-deep-soft);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: .05em;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-deep);
  background: rgba(255,255,255,.06);
  color: var(--canvas);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line-deep);
  background: rgba(255,255,255,.06);
  color: var(--canvas);
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  z-index: 2;
}

.lightbox-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
}

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

@media (max-width: 640px) {
  .lightbox-content { max-width: 94vw; }
  .lightbox-img { max-height: 66vh; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 1.3rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
