/* ==========================================================================
   NIYAYESH — Portfolio Stylesheet
   Design tokens live in :root as CSS variables — edit palette/type here.
   ========================================================================== */

:root{
  /* ---- Color palette ---- */
  --navy:            #12203E;
  --navy-deep:        #0B1226;
  --navy-soft:        #1C2C50;
  --cream:            #F6EFE4;
  --cream-soft:       #FBF7F0;
  --beige:            #E9DFCD;
  --rose-gold:        #C9A08C;
  --rose-gold-soft:   #E3C7B8;
  --rose-gold-deep:   #B07E68;
  --ink:              #1B2333;
  --line:             rgba(18,32,62,0.12);
  --line-light:       rgba(246,239,228,0.16);

  /* ---- Semantic tokens (flip these for dark mode) ---- */
  --bg:               var(--cream);
  --bg-alt:           var(--cream-soft);
  --surface:          #ffffff;
  --text:             var(--ink);
  --text-muted:       #5B6478;
  --border:           var(--line);
  --accent:           var(--rose-gold-deep);
  --inverse-bg:       var(--navy);
  --inverse-text:     var(--cream);

  /* ---- Type ---- */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans:    'Jost', 'Segoe UI', Arial, sans-serif;
  --font-fa:      'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;

  /* ---- Layout ---- */
  --container: 1240px;
  --gap: clamp(1rem, 2vw, 2rem);
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(11,18,38,0.06);
  --shadow-md: 0 12px 40px rgba(11,18,38,0.10);
  --shadow-lg: 0 24px 70px rgba(11,18,38,0.16);
  --ease: cubic-bezier(.22,.68,0,1);
}

[data-theme="dark"]{
  --bg:               var(--navy-deep);
  --bg-alt:            #0F1830;
  --surface:           #16213F;
  --text:              var(--cream);
  --text-muted:        #A9B0C4;
  --border:            var(--line-light);
  --accent:            var(--rose-gold-soft);
  --inverse-bg:        var(--cream);
  --inverse-text:      var(--navy);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family: var(--font-display); font-weight:600; margin:0; line-height:1.12; }
p{ margin:0; }
button{ font-family: inherit; cursor:pointer; }

/* Persian / RTL text */
[dir="rtl"], .fa{
  font-family: var(--font-fa);
  direction: rtl;
  text-align: right;
  line-height: 1.9;
}

:focus-visible{
  outline: 2px solid var(--rose-gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.container{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

section{ position: relative; }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.6em;
  font-family: var(--font-sans);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.eyebrow::before{
  content:"";
  width: 26px; height: 1px;
  background: var(--accent);
}
[dir="rtl"] .eyebrow{ flex-direction: row-reverse; }

/* Reveal on scroll */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
.reveal-stagger > *{ transition-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  html{ scroll-behavior:auto; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55em;
  padding: .95em 1.7em;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
  white-space: nowrap;
}
.btn svg{ width:16px; height:16px; flex-shrink:0; }
.btn:hover{ transform: translateY(-2px); }

.btn-primary{
  background: var(--navy);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{ background: var(--rose-gold-deep); box-shadow: var(--shadow-md); }
[data-theme="dark"] .btn-primary{ background: var(--rose-gold-soft); color: var(--navy-deep); }
[data-theme="dark"] .btn-primary:hover{ background: var(--cream); }

.btn-ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }

.btn-light{
  background: var(--cream);
  color: var(--navy);
}
.btn-light:hover{ background: var(--rose-gold-soft); }

.btn-sm{ padding: .6em 1.2em; font-size: .82rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246,239,228,0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
[data-theme="dark"] .site-header{ background: rgba(11,18,38,0.78); }
.site-header.is-scrolled{
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1.5rem;
  padding-block: 1.15rem;
}
.logo{
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
}
.logo .dot{ color: var(--accent); }

.main-nav{ display:flex; }
.main-nav ul{ display:flex; align-items:center; gap: 2.1rem; }
.main-nav a{
  position:relative;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-block: .3rem;
  transition: color .25s ease;
}
.main-nav a::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-2px;
  height:1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.main-nav a:hover, .main-nav a.is-active{ color: var(--text); }
.main-nav a:hover::after, .main-nav a.is-active::after{ transform: scaleX(1); transform-origin: left; }

.header-actions{ display:flex; align-items:center; gap: .9rem; }

.theme-toggle{
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  display:flex; align-items:center; justify-content:center;
  color: var(--text);
  transition: border-color .3s ease, transform .3s var(--ease);
}
.theme-toggle:hover{ border-color: var(--accent); transform: rotate(14deg); }
.theme-toggle svg{ width:18px; height:18px; }
.theme-toggle .icon-moon{ display:none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:block; }

.hamburger{
  display:none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  position: relative;
}
.hamburger span, .hamburger span::before, .hamburger span::after{
  content:"";
  position:absolute; left:50%; top:50%;
  width: 16px; height: 1.5px;
  background: var(--text);
  transform: translate(-50%,-50%);
  transition: transform .3s var(--ease), opacity .3s ease;
}
.hamburger span::before{ transform: translate(-50%,-6px); }
.hamburger span::after{ transform: translate(-50%,6px); }
.hamburger.is-open span{ background: transparent; }
.hamburger.is-open span::before{ transform: translate(-50%,-50%) rotate(45deg); }
.hamburger.is-open span::after{ transform: translate(-50%,-50%) rotate(-45deg); }

.mobile-nav{
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 99;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap: 1.9rem;
  opacity:0; visibility:hidden;
  transform: translateY(-12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
}
.mobile-nav.is-open{ opacity:1; visibility:visible; transform:none; }
.mobile-nav a{ font-family: var(--font-display); font-size: 1.9rem; color: var(--text); }
.mobile-nav a:hover{ color: var(--accent); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items:center;
}
.hero-eyebrow{ margin-bottom: 1.4rem; }
.hero h1{
  font-size: clamp(2.5rem, 5.2vw, 4.1rem);
  letter-spacing: -.01em;
}
.hero h1 em{
  font-style: normal;
  color: var(--rose-gold-deep);
}
[data-theme="dark"] .hero h1 em{ color: var(--rose-gold-soft); }

.hero-fa{
  margin-top: 1.6rem;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.hero-actions{
  display:flex; gap: 1rem; flex-wrap:wrap;
  margin-top: 2.3rem;
}
.hero-scroll{
  margin-top: 3rem;
  display:flex; align-items:center; gap:.7rem;
  font-size:.82rem; color: var(--text-muted);
}
.hero-scroll .scroll-dot{
  width:22px; height:34px; border:1.5px solid var(--border); border-radius:99px;
  position:relative; flex-shrink:0;
}
.hero-scroll .scroll-dot::after{
  content:""; position:absolute; top:6px; left:50%; width:3px; height:6px;
  background: var(--accent); border-radius:99px; transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot{ 0%{ opacity:1; top:6px;} 70%{ opacity:0; top:16px;} 100%{opacity:0; top:6px;} }

/* Hero visual */
.hero-visual{
  position: relative;
  display:flex; align-items:center; justify-content:center;
  min-height: 420px;
}
.hero-visual-decor{
  position:absolute; inset:0;
  z-index:0;
}
.hero-visual-decor .n-letter{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-size: clamp(9rem, 20vw, 15rem);
  font-weight:600;
  color: var(--navy);
  opacity:.9;
}
[data-theme="dark"] .hero-visual-decor .n-letter{ color: var(--cream); opacity:.85; }
.hero-visual-decor .brush{
  position:absolute;
  width: 78%; height: 46%;
  top: 30%; left: 8%;
  background: linear-gradient(120deg, var(--rose-gold) 0%, var(--rose-gold-soft) 60%, transparent 100%);
  filter: blur(2px);
  clip-path: polygon(2% 40%, 20% 10%, 45% 28%, 60% 5%, 82% 30%, 98% 18%, 92% 65%, 70% 55%, 55% 92%, 32% 70%, 12% 88%);
  opacity:.55;
  animation: brushFloat 9s ease-in-out infinite;
}
@keyframes brushFloat{ 0%,100%{ transform: translateY(0) rotate(0deg);} 50%{ transform: translateY(-10px) rotate(1.2deg);} }
.hero-visual-decor .dash-square{
  position:absolute; top: 6%; right: 4%;
  width: 90px; height: 90px;
  border: 1.5px dashed var(--accent);
  opacity:.6;
}
.hero-visual-decor .dot-col{
  position:absolute; left: -6%; top: 18%;
  display:flex; flex-direction:column; gap:10px;
}
.hero-visual-decor .dot-col span{
  width:6px; height:6px; border-radius:50%; background: var(--accent); opacity:.7;
  display:block;
}
.hero-visual-decor .dot-col span:nth-child(2){ opacity:.4; }
.hero-visual-decor .dot-col span:nth-child(3){ opacity:.2; }

.hero-mockup{
  position: relative;
  z-index: 1;
  width: min(94%, 480px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transform: rotate(-2deg);
  transition: transform .5s var(--ease);
}
.hero-mockup:hover{ transform: rotate(0deg) translateY(-6px); }
.browser-chrome{
  display:flex; align-items:center; gap:6px;
  padding: .7rem .9rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.browser-chrome span{ width:9px; height:9px; border-radius:50%; background: var(--border); }
.browser-chrome span:nth-child(1){ background:#E4A2A0; }
.browser-chrome span:nth-child(2){ background:#E9CB93; }
.browser-chrome span:nth-child(3){ background:#A6CDAE; }
.hero-mockup img{ width:100%; display:block; }
.mockup-float{
  position:absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: .8rem 1rem;
  display:flex; align-items:center; gap:.6rem;
  font-size:.8rem; font-weight:600;
  z-index: 2;
}
.mockup-float svg{ width:18px; height:18px; color: var(--accent); flex-shrink:0; }
.mockup-float.float-1{ top: -6%; left: -8%; animation: floaty 6s ease-in-out infinite; }
.mockup-float.float-2{ bottom: 8%; right: -10%; animation: floaty 7s ease-in-out infinite 1s; }
@keyframes floaty{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-12px);} }

/* ==========================================================================
   Services
   ========================================================================== */
.services{
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.services-band{
  background: var(--beige);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3rem);
}
[data-theme="dark"] .services-band{ background: var(--bg-alt); }
.services-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.service-card{
  text-align:center;
  padding: 1.6rem 1rem;
  border-radius: var(--radius-md);
  transition: transform .4s var(--ease), background .3s ease;
}
.service-card:hover{
  transform: translateY(-6px);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.service-icon{
  width: 54px; height:54px;
  margin-inline:auto;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 1.1rem;
  color: var(--accent);
  transition: background .3s ease, border-color .3s ease;
}
[data-theme="dark"] .service-icon{ background: var(--navy-soft); }
.service-card:hover .service-icon{ border-color: var(--accent); }
.service-icon svg{ width:24px; height:24px; }
.service-card h3{
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.service-card p{ font-size: .92rem; color: var(--text-muted); }

/* ==========================================================================
   Projects (dark band)
   ========================================================================== */
.projects{
  background: var(--navy);
  color: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 6rem);
  margin-block: clamp(2.5rem, 6vw, 4rem);
}
[data-theme="dark"] .projects{ background: var(--bg-alt); }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:1.5rem; flex-wrap:wrap;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.projects h2{ font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--cream); }
.projects .eyebrow{ color: var(--rose-gold-soft); }

.project-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.project-card{
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  overflow:hidden;
  background: rgba(255,255,255,0.02);
  transition: transform .45s var(--ease), border-color .3s ease;
}
.project-card:hover{ transform: translateY(-8px); border-color: var(--rose-gold-soft); }
.project-thumb{
  position:relative;
  aspect-ratio: 4/3;
  overflow:hidden;
}
.project-thumb img{
  width:100%; height:100%; object-fit:cover;
  transition: transform .6s var(--ease);
}
.project-card:hover .project-thumb img{ transform: scale(1.06); }
.project-thumb .project-link{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(11,18,38,0.55);
  opacity:0;
  transition: opacity .35s ease;
}
.project-card:hover .project-thumb .project-link{ opacity:1; }
.project-link span{
  width:46px; height:46px; border-radius:50%;
  background: var(--cream); color: var(--navy);
  display:flex; align-items:center; justify-content:center;
  transform: scale(.8);
  transition: transform .35s var(--ease);
}
.project-card:hover .project-link span{ transform: scale(1); }
.project-link svg{ width:18px; height:18px; }
.project-body{ padding: 1.2rem 1.3rem 1.4rem; }
.project-number{ font-size: .78rem; color: var(--rose-gold-soft); letter-spacing: .1em; }
.project-title{ font-size: 1.2rem; margin-top:.3rem; color: var(--cream); }
.project-category{ font-size: .82rem; color: #A9B0C4; margin-top:.3rem; }

/* ==========================================================================
   Code x Canvas
   ========================================================================== */
.code-canvas{ padding-block: clamp(2.5rem, 6vw, 4rem); }
.cc-grid{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items:center;
}
.code-card{
  background: var(--navy-deep);
  border-radius: var(--radius-md);
  overflow:hidden;
  box-shadow: var(--shadow-lg);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  transform: rotate(-1.4deg);
  transition: transform .5s var(--ease);
}
.code-card:hover{ transform: rotate(0deg); }
.code-topbar{
  display:flex; align-items:center; gap:6px;
  padding:.7rem .9rem;
  background: rgba(255,255,255,0.03);
}
.code-topbar span{ width:9px; height:9px; border-radius:50%; }
.code-topbar span:nth-child(1){ background:#E4A2A0; }
.code-topbar span:nth-child(2){ background:#E9CB93; }
.code-topbar span:nth-child(3){ background:#A6CDAE; }
.code-body{ padding: 1.3rem 1.4rem 1.6rem; font-size: .86rem; line-height:1.9; }
.code-body .ln{ color:#5B6478; display:inline-block; width:1.6em; user-select:none; }
.code-kw{ color: var(--rose-gold-soft); }
.code-fn{ color:#9FC6D9; }
.code-str{ color:#B7D8A8; }
.code-punc{ color:#A9B0C4; }

.cc-middle{ text-align:center; }
.cc-middle p{
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-block: .3rem;
}
.cc-middle p:first-child{ color: var(--text); }
.cc-middle p:last-child{ color: var(--rose-gold-deep); font-style: italic; }
[data-theme="dark"] .cc-middle p:last-child{ color: var(--rose-gold-soft); }
.cc-divider{
  width:1px; height:70px; background: var(--border);
  margin-inline:auto; margin-block:1.2rem;
}

.canvas-card{
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.4deg);
  transition: transform .5s var(--ease);
}
.canvas-card:hover{ transform: rotate(0deg); }
.canvas-card img{ width:100%; }

/* ==========================================================================
   About
   ========================================================================== */
.about{ padding-block: clamp(3rem, 6vw, 5rem); }
.about-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items:center;
}
.about h2{ font-size: clamp(2rem, 3.6vw, 2.8rem); margin-top:.6rem; }
.about h2 em{ font-style:normal; color: var(--rose-gold-deep); }
[data-theme="dark"] .about h2 em{ color: var(--rose-gold-soft); }
.about-fa{ margin-top: 1.4rem; color: var(--text-muted); max-width: 52ch; }
.about-cta{ margin-top: 1.8rem; }

.about-stats{
  display:flex; gap: clamp(1.4rem, 3vw, 2.6rem);
  margin-top: 2.3rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}
.stat b{
  display:block; font-family: var(--font-display); font-size: 2rem; color: var(--text);
}
.stat span{ font-size: .82rem; color: var(--text-muted); }

.about-visual{ position:relative; }
.about-photo{
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow-lg);
  position:relative;
}
.about-photo::after{
  content:"";
  position:absolute; inset:0;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
}
.about-signature{
  position:absolute; bottom: -22px; right: -18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: 50%;
  width: 84px; height: 84px;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
}
[dir="rtl"] .about-signature{ right:auto; left:-18px; }

/* Expertise bars */
.expertise{ margin-top: clamp(2.5rem, 5vw, 4rem); }
.expertise-title{
  font-size: .8rem; letter-spacing:.16em; text-transform:uppercase;
  color: var(--text-muted); font-weight:700; margin-bottom: 1.4rem;
}
.skill-row{ margin-bottom: 1.15rem; }
.skill-row-top{ display:flex; justify-content:space-between; font-size:.9rem; margin-bottom:.5rem; }
.skill-row-top b{ font-weight:600; }
.skill-row-top span{ color: var(--accent); font-weight:600; }
.skill-track{
  height: 6px; border-radius:99px; background: var(--border); overflow:hidden;
}
.skill-fill{
  height:100%; border-radius:99px;
  background: linear-gradient(90deg, var(--rose-gold-deep), var(--rose-gold-soft));
  width:0%;
  transition: width 1.3s var(--ease);
}

/* ==========================================================================
   Art gallery strip
   ========================================================================== */
.art-gallery{
  background: var(--navy);
  color: var(--cream);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
[data-theme="dark"] .art-gallery{ background: var(--bg-alt); }
.art-gallery h2{ color: var(--cream); font-size: clamp(1.7rem, 3vw, 2.2rem); }
.art-gallery .eyebrow{ color: var(--rose-gold-soft); }
.art-track{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 1.1rem;
  overflow-x:auto;
  padding-bottom: .6rem;
  scroll-snap-type: x proximity;
}
.art-track::-webkit-scrollbar{ height:5px; }
.art-track::-webkit-scrollbar-thumb{ background: var(--rose-gold-deep); border-radius:99px; }
.art-item{
  scroll-snap-align:start;
  border-radius: var(--radius-md);
  overflow:hidden;
  aspect-ratio: 4/5;
  position:relative;
  border: 1px solid var(--line-light);
}
.art-item img{ width:100%; height:100%; object-fit:cover; transition: transform .6s var(--ease); }
.art-item:hover img{ transform: scale(1.08); }
.art-item .art-cap{
  position:absolute; left:0; right:0; bottom:0;
  padding: .8rem .9rem;
  font-size: .78rem;
  background: linear-gradient(0deg, rgba(11,18,38,.85), transparent);
  opacity:0; transition: opacity .3s ease;
}
.art-item:hover .art-cap{ opacity:1; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta{
  padding-block: clamp(3.5rem, 7vw, 6rem);
  text-align:center;
}
.cta h2{ font-size: clamp(2rem, 4.2vw, 3rem); }
.cta h2 + h2{ color: var(--rose-gold-deep); margin-top:.2rem; }
[data-theme="dark"] .cta h2 + h2{ color: var(--rose-gold-soft); }
.cta .btn{ margin-top: 2.1rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--navy);
  color: var(--cream);
  padding-block: clamp(3rem, 6vw, 4.5rem) 1.6rem;
}
[data-theme="dark"] .site-footer{ background: var(--bg-alt); border-top:1px solid var(--line-light); }
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.8rem, 4vw, 2.6rem);
}
.footer-logo{ font-family: var(--font-display); font-size:1.5rem; margin-bottom: 1rem; }
.footer-logo .dot{ color: var(--rose-gold-soft); }
.footer-desc{ color:#A9B0C4; max-width: 32ch; font-size:.92rem; }
.footer-col h4{
  font-family: var(--font-sans); font-size:.78rem; letter-spacing:.14em; text-transform:uppercase;
  color: var(--rose-gold-soft); margin-bottom:1.1rem; font-weight:700;
}
.footer-col ul{ display:flex; flex-direction:column; gap:.7rem; }
.footer-col a, .footer-contact li{ color:#C7CCDB; font-size:.92rem; transition:color .25s ease; }
.footer-col a:hover{ color: var(--cream); }
.footer-contact{ display:flex; flex-direction:column; gap:.8rem; }
.footer-contact li{ display:flex; align-items:center; gap:.6rem; }
[dir="rtl"] .footer-contact li{ flex-direction:row-reverse; justify-content:flex-end; }
.footer-contact svg{ width:16px; height:16px; color: var(--rose-gold-soft); flex-shrink:0; }
.footer-social{ display:flex; gap:.7rem; margin-top:1.2rem; }
.footer-social a{
  width:36px; height:36px; border-radius:50%; border:1px solid var(--line-light);
  display:flex; align-items:center; justify-content:center;
}
.footer-social svg{ width:16px; height:16px; }
.footer-social a:hover{ background: var(--rose-gold-soft); color: var(--navy); border-color: transparent; }
.footer-bottom{
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-light);
  text-align:center;
  font-size: .82rem;
  color:#8891A6;
}
.back-to-top{
  position: fixed;
  bottom: 1.6rem; right: 1.6rem;
  width: 46px; height:46px;
  border-radius:50%;
  background: var(--navy);
  color: var(--cream);
  display:flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow-md);
  opacity:0; visibility:hidden; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  z-index: 90;
}
[dir="rtl"] .back-to-top{ right:auto; left:1.6rem; }
.back-to-top.is-visible{ opacity:1; visibility:visible; transform:none; }
.back-to-top svg{ width:18px; height:18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px){
  .project-grid{ grid-template-columns: repeat(2, 1fr); }
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px){
  .main-nav{ display:none; }
  .hamburger{ display:block; }
  .hero-grid{ grid-template-columns:1fr; }
  .hero-visual{ order:-1; min-height: 320px; }
  .about-grid{ grid-template-columns:1fr; }
  .about-visual{ order:-1; max-width:380px; margin-inline:auto; }
  .cc-grid{ grid-template-columns:1fr; }
  .cc-divider{ width:70px; height:1px; }
  .code-card, .canvas-card{ transform:none; }
}

@media (max-width: 640px){
  .services-grid{ grid-template-columns: 1fr 1fr; }
  .project-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .about-stats{ flex-wrap:wrap; row-gap:1.2rem; }
  .header-actions .btn-primary{ display:none; }
}

@media (max-width: 460px){
  .services-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
}
