/* ==========================================================================
   Rouf Mughal — Portfolio Homepage
   Table of contents:
   1. Custom properties / reset
   2. Base typography & utilities
   3. Layout helpers (container, sections)
   4. Header & navigation
   5. Hero
   6. Outcomes
   7. About
   8. Services
   9. Featured Solution (flow)
   10. Projects
   11. Skills
   12. Process
   13. Why / Testimonials
   14. FAQ / Accordion
   15. Final CTA
   16. Contact / Form
   17. Footer / back-to-top
   18. Reveal animations
   19. Responsive breakpoints
   ========================================================================== */

/* 1. Custom properties / reset -------------------------------------------- */
:root{
  --bg: #0B0F16;
  --bg-elevated: #10161F;
  --surface: #151D29;
  --surface-2: #1A2330;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text-primary: #F2F5F1;
  --text-secondary: #A9B4C4;
  --text-muted: #6E7A8C;
  --accent: #C6FF4D;
  --accent-dim: #97CC2E;
  --accent-ink: #0B0F16;

  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --container-w: 1280px;
  --container-w-narrow: 760px;

  --ease: cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3{ font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p{ margin: 0 0 1em; color: var(--text-secondary); }
button{ font-family: inherit; }

@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; }
}

/* 2. Base typography & utilities ------------------------------------------ */
.sr-only{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link{
  position: absolute; left: 1rem; top: -60px; background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; z-index: 999;
  transition: top .2s var(--ease);
}
.skip-link:focus{ top: 1rem; }

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

.eyebrow{
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}
.section-title{ font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); color: var(--text-primary); max-width: 34ch; }
.section-sub{ max-width: 56ch; font-size: 1.05rem; margin-bottom: 2.5rem; }

.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn-accent{ background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover{ background: var(--accent-dim); }
.btn-outline{ background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }
.btn-block{ width: 100%; }

.tag-list{ display: flex; flex-wrap: wrap; gap: .6rem; }
.tag-list li{
  border: 1px solid var(--border); border-radius: 999px; padding: .5rem 1rem;
  font-size: .88rem; color: var(--text-secondary);
}

/* 3. Layout helpers --------------------------------------------------------*/
.container{ max-width: var(--container-w); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow{ max-width: var(--container-w-narrow); }
.section{ padding: clamp(3.5rem, 3rem + 3vw, 6.5rem) 0; }

/* 4. Header & navigation ---------------------------------------------------*/
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,15,22,.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-scrolled{ border-bottom-color: var(--border); background: rgba(11,15,22,.92); }

.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.1rem 1.5rem;
}
.brand{ font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }

.nav-desktop ul{ display: flex; gap: 1.9rem; }
.nav-desktop{ flex: 1; display: flex; justify-content: center; }
.nav-link{
  font-size: .92rem; color: var(--text-secondary); position: relative; padding: .3rem 0;
  transition: color .15s var(--ease);
}
.nav-link:hover, .nav-link.is-active{ color: var(--text-primary); }
.nav-link.is-active::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent);
}

.btn-header-cta{ display: inline-flex; }

.menu-toggle{
  display: none; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer;
}
.menu-toggle-bars{ display: block; width: 20px; height: 14px; position: relative; }
.menu-toggle-bars span{
  position: absolute; left: 0; right: 0; height: 2px; background: var(--text-primary);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.menu-toggle-bars span:nth-child(1){ top: 0; }
.menu-toggle-bars span:nth-child(2){ top: 6px; }
.menu-toggle-bars span:nth-child(3){ top: 12px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2){ opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

.nav-mobile{
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.nav-mobile ul{ display: flex; flex-direction: column; padding: 1rem 1.5rem 1.5rem; gap: .3rem; }
.nav-mobile .nav-link{ display: block; padding: .8rem .2rem; font-size: 1.02rem; }
.nav-mobile .btn{ margin-top: .6rem; }

/* 5. Hero --------------------------------------------------------------- */
.hero{ padding: clamp(3rem, 2rem + 4vw, 6rem) 0 clamp(3rem, 2rem + 3vw, 5rem); }
.hero-grid{
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 2rem + 2vw, 4rem);
  align-items: center;
}
.hero-title{ font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); letter-spacing: -.02em; margin-bottom: .7em; }
.hero-sub{ font-size: 1.12rem; max-width: 52ch; margin-bottom: 2rem; }
.hero-actions{ display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.8rem; }
.section-view-all{ display: flex; justify-content: center; margin-top: 2.5rem; }
.section-view-all .btn{ transition: transform .25s var(--ease), background .15s var(--ease), border-color .15s var(--ease), box-shadow .25s var(--ease); }
.section-view-all .btn:hover{ transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 30px -8px rgba(198,255,77,.45); }
.hero-credibility{
  display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--text-muted);
  font-family: var(--font-mono);
}
.hero-credibility .dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.hero-visual{ position: relative; }
.portrait-frame{
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  aspect-ratio: 4/5; max-width: 420px; margin: 0 auto;
}
.portrait-img{ width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder{
  display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 4rem; color: var(--accent); background: var(--surface);
}
.portrait-frame.portrait-fallback .portrait-img{ display: none; }
.portrait-frame.portrait-fallback .portrait-placeholder{ display: flex; }

.hero-tag{
  position: absolute; font-family: var(--font-mono); font-size: .78rem;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-primary);
  padding: .5rem .9rem; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.hero-tag-1{ top: 6%; left: -6%; }
.hero-tag-2{ bottom: 18%; right: -10%; }
.hero-tag-3{ bottom: -4%; left: 12%; }

/* 6. Outcomes ------------------------------------------------------------ */
.outcomes{ padding: 3rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.outcomes-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 1.8rem; }
.outcome-title{ font-size: 1.02rem; color: var(--text-primary); margin-bottom: .35em; }
.outcome p{ font-size: .92rem; margin-bottom: 0; }

/* 7. About ---------------------------------------------------------------*/
.about-grid{ display: grid; grid-template-columns: .78fr 1.3fr 1fr; gap: clamp(1.6rem, 3vw, 2.6rem); align-items: start; }
.about-media{
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); aspect-ratio: 3/4; position: sticky; top: 100px;
}
.about-media img{ width: 100%; height: 100%; object-fit: cover; }
.about-media-fallback{
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem; color: var(--accent);
  background: radial-gradient(120% 140% at 0% 0%, rgba(198,255,77,.14), transparent 55%), linear-gradient(135deg, var(--surface-2), var(--bg-elevated));
}
.about-media-fallback span{ font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.about-industries{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem;
}
.about-industries-title{ font-family: var(--font-display); font-size: 1rem; margin-bottom: 1.2rem; }

/* 8. Services --------------------------------------------------------------*/
.services-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 2rem; }
.service-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.9rem; display: flex; flex-direction: column; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.service-card:hover{ border-color: var(--border-strong); transform: translateY(-3px); }
.service-icon{
  width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 1.1rem;
}
.service-card h3{ font-size: 1.12rem; margin-bottom: .5em; }
.service-card > p{ font-size: .93rem; }
.service-points{ margin: .3rem 0 1rem; display: flex; flex-direction: column; gap: .45rem; }
.service-points li{
  font-size: .85rem; color: var(--text-secondary); padding-left: 1.1rem; position: relative;
}
.service-points li::before{ content: "—"; position: absolute; left: 0; color: var(--accent); }
.service-outcome{ font-size: .84rem; color: var(--text-primary); font-weight: 500; margin-bottom: 1rem; }
.service-cta{ margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--accent); }
.service-cta:hover{ text-decoration: underline; }

/* 9. Featured Solution / flow ---------------------------------------------*/
.solution{ background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.solution-media{
  margin-top: 2rem; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); aspect-ratio: 16/6;
}
.solution-media img{ width: 100%; height: 100%; object-fit: cover; }
.solution-media-fallback{
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .7rem; color: var(--accent);
  background: radial-gradient(120% 160% at 0% 0%, rgba(198,255,77,.14), transparent 55%), linear-gradient(135deg, var(--surface-2), var(--bg-elevated));
}
.solution-media-fallback span{ font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.flow{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem 1.4rem; margin-top: 2rem; counter-reset: none; }
.flow-step{
  display: flex; flex-direction: column; gap: .55rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1.5rem 1.6rem;
}
.flow-index{
  font-family: var(--font-mono); color: var(--accent); font-size: .78rem; letter-spacing: .04em;
}
.flow-step h3{ font-size: .98rem; margin-bottom: 0; }
.flow-step p{ font-size: .86rem; margin: 0; }

/* 10. Projects -------------------------------------------------------------*/
.projects-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 2rem; }
.project-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.project-media{ aspect-ratio: 3/2; background: var(--surface-2); overflow: hidden; }
.project-media img{ width: 100%; height: 100%; object-fit: cover; }
.project-card > *:not(.project-media){ padding-left: 1.5rem; padding-right: 1.5rem; }
.project-category{ font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-top: 1.4rem; margin-bottom: .4rem; }
.project-card h3{ font-size: 1.05rem; margin-bottom: .6em; }
.project-card p{ font-size: .85rem; margin-bottom: .5em; }
.project-tech{ font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.project-outcome{ color: var(--text-primary); font-weight: 500; }
.project-link{ display: inline-block; font-size: .88rem; font-weight: 600; color: var(--accent); margin: .3rem 0 1.5rem; }
.project-link:hover{ text-decoration: underline; }

/* 11. Skills ---------------------------------------------------------------*/
.skills-groups{ display: flex; flex-direction: column; gap: .9rem; margin-top: 2rem; }
.skills-group{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0 1.5rem;
}
.skills-group summary{
  cursor: pointer; list-style: none; padding: 1.2rem 0; font-family: var(--font-display);
  font-weight: 600; font-size: 1.02rem; display: flex; align-items: center; justify-content: space-between;
}
.skills-group summary::-webkit-details-marker{ display: none; }
.skills-group summary::after{
  content: "+"; font-family: var(--font-mono); font-size: 1.2rem; color: var(--accent); transition: transform .2s var(--ease);
}
.skills-group[open] summary::after{ content: "–"; }
.skills-pills{ display: flex; flex-wrap: wrap; gap: .55rem; padding-bottom: 1.4rem; }
.skills-pills li{
  font-size: .82rem; font-family: var(--font-mono); border: 1px solid var(--border);
  border-radius: 999px; padding: .4rem .85rem; color: var(--text-secondary);
}

/* 12. Process ----------------------------------------------------------- */
.process-list{ display: flex; flex-direction: column; gap: 0; margin-top: 2rem; }
.process-step{
  display: grid; grid-template-columns: 70px 1fr; gap: 1.4rem; padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.process-step:last-child{ border-bottom: 1px solid var(--border); }
.process-index{ font-family: var(--font-mono); color: var(--accent); font-size: 1.3rem; }
.process-step h3{ font-size: 1.05rem; margin-bottom: .3em; }
.process-step p{ margin: 0; font-size: .92rem; max-width: 60ch; }

/* 13. Why / Testimonials ----------------------------------------------- */
.why{ background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 2rem; }
.why-item{ padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.why-item h3{ font-size: .98rem; margin-bottom: .4em; }
.why-item p{ font-size: .86rem; margin: 0; }

.testimonials-head{ display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.testimonials-nav{ display: flex; gap: .6rem; margin-bottom: .3rem; }
.testimonials-arrow{
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-primary); display: flex; align-items: center;
  justify-content: center; cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.testimonials-arrow:hover{ background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.testimonials-viewport{
  margin-top: 2rem; overflow: hidden; cursor: grab;
}
.testimonials-viewport:active{ cursor: grabbing; }
.testimonials-viewport:focus-visible{ outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius-sm); }
.testimonials-track{
  display: flex; gap: 1.4rem; will-change: transform;
  transition: transform .45s var(--ease);
}
.testimonials-track.is-dragging{ transition: none; }
.testimonial-card{ flex: 0 0 min(340px, 82vw); user-select: none; }
.testimonial-avatar{
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; margin-bottom: 1rem;
  background: var(--surface-2); border: 1px solid var(--border);
}
.testimonial-avatar img{ width: 100%; height: 100%; object-fit: cover; }
.testimonial-avatar-fallback{
  width: 100%; height: 100%; align-items: center; justify-content: center; display: flex;
  font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: var(--accent);
}
.testimonial-card{
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.6rem;
}
.testimonial-card p{ font-style: italic; color: var(--text-secondary); margin-bottom: 1rem; }
.testimonial-card footer{ font-size: .85rem; color: var(--text-muted); }
.testimonial-card cite{ font-style: normal; color: var(--text-primary); font-weight: 600; }

/* 14. FAQ / Accordion ------------------------------------------------------*/
.accordion{ margin-top: 2rem; border-top: 1px solid var(--border); }
.accordion-item{ border-bottom: 1px solid var(--border); }
.accordion-item h3{ margin: 0; }
.accordion-trigger{
  width: 100%; text-align: left; background: transparent; border: none; color: var(--text-primary);
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; padding: 1.3rem .2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer;
}
.accordion-trigger::after{
  content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 1.3rem; flex: none;
  transition: transform .2s var(--ease);
}
.accordion-trigger[aria-expanded="true"]::after{ transform: rotate(45deg); }
.accordion-panel{
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .32s var(--ease), opacity .28s var(--ease);
}
.accordion-panel.is-open{ opacity: 1; }
.accordion-panel-inner{ padding: 0 .2rem 1.4rem; }
.accordion-panel p{ margin: 0; font-size: .95rem; }

/* 15. Final CTA ----------------------------------------------------------- */
.final-cta{
  padding: clamp(3.5rem, 3rem + 3vw, 6rem) 0;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg));
  border-top: 1px solid var(--border);
}
.final-cta-inner{ text-align: center; max-width: 640px; }
.final-cta h2{ font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); }
.final-cta .hero-actions{ justify-content: center; }

/* 16. Contact / Form -------------------------------------------------------*/
.contact-grid{ display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 3vw, 4rem); align-items: start; }
.contact-info{ position: sticky; top: 100px; }
.contact-details{ margin: 1.6rem 0; display: flex; flex-direction: column; gap: .6rem; font-size: .95rem; }
.contact-details a{ color: var(--accent); }
.contact-details a:hover{ text-decoration: underline; }
.social-list{ display: flex; flex-direction: row; flex-wrap: wrap; gap: .6rem; }
.social-list li{ display: contents; }
.social-list a{
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--text-secondary);
  transition: border-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease), background .15s var(--ease);
}
.social-list a:hover{ border-color: var(--accent); color: var(--accent); background: var(--surface-2); transform: translateY(-2px); }
.footer-grid .social-list{ flex-direction: row; margin-top: 1.1rem; }

.contact-form{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.form-row{ margin-bottom: .7rem; }
.form-row legend{ display: block; font-size: .88rem; font-weight: 600; margin-bottom: .5rem; color: var(--text-primary); }

/* Modern floating-label fields: the label sits inside the field like a
   placeholder, then rises to sit on the top border once the field is
   focused or filled — so the form reads clean and minimal at rest but
   stays fully labeled, with the border appearing to run behind it. */
.field-float{ position: relative; }
.field-float input,
.field-float textarea,
.field-float select{
  width: 100%; padding: 1.05rem .95rem; background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: inherit; font-size: .95rem;
  line-height: 1.4;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field-float input,
.field-float select{ height: 3.35rem; display: flex; align-items: center; }
.field-float textarea{ resize: vertical; min-height: 96px; padding-top: 1.6rem; padding-bottom: 1rem; }
.field-float select{ cursor: pointer; }
.field-float input:focus,
.field-float textarea:focus,
.field-float select:focus{
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198,255,77,.12); outline: none;
}
.field-float label{
  position: absolute; left: .8rem; top: 1.675rem; transform: translateY(-50%);
  font-size: .95rem; color: var(--text-muted); pointer-events: none;
  padding: 0 .35rem; margin-left: -.35rem; background: transparent; border-radius: 4px;
  max-width: calc(100% - 1.5rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: top .16s var(--ease), font-size .16s var(--ease), color .16s var(--ease), background-color .16s var(--ease);
}
.field-float textarea + label{ top: 1.5rem; }
.field-float input:focus + label,
.field-float input:not(:placeholder-shown) + label,
.field-float textarea:focus + label,
.field-float textarea:not(:placeholder-shown) + label,
.field-float-select select:focus + label,
.field-float-select select:valid + label{
  top: 0; font-size: .72rem; letter-spacing: .01em; color: var(--accent);
  background: var(--surface);
}

.radio-group{ display: flex; flex-wrap: wrap; gap: 1.2rem; }
.radio-group label{ display: flex; align-items: center; gap: .5rem; font-weight: 400; font-size: .9rem; margin: 0; }
.form-row-checkbox label{ display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; font-size: .9rem; }
.form-error{ color: #FF8A80; font-size: .8rem; margin: .25rem 0 0; }
.form-error:empty{ margin: 0; display: none; }
.field-float input.is-invalid,
.field-float textarea.is-invalid,
.field-float select.is-invalid{
  border-color: #FF8A80; box-shadow: 0 0 0 3px rgba(255,138,128,.12);
}
.field-float input.is-valid,
.field-float textarea.is-valid,
.field-float select.is-valid{
  border-color: var(--accent-dim);
}
.form-status{ margin-top: .8rem; font-size: .9rem; text-align: center; color: var(--accent); min-height: 1.2em; }
fieldset.form-row{ border: none; padding: 0; margin: 0 0 .7rem; }

/* 17. Footer / back-to-top --------------------------------------------------*/
.site-footer{ border-top: 1px solid var(--border); padding: 3.5rem 0 0; background: var(--bg-elevated); }
.footer-grid{ display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand{ font-size: 1.15rem; margin-bottom: .6rem; }
.footer-grid h3{ font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 1rem; }
.footer-grid ul{ display: flex; flex-direction: column; gap: .6rem; }
.footer-grid a{ color: var(--text-secondary); font-size: .9rem; }
.footer-grid a:hover{ color: var(--accent); }
.footer-contact{ margin-bottom: 1rem; }
.footer-bottom{
  border-top: 1px solid var(--border); padding: 1.4rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--text-muted);
}
.footer-bottom ul{ display: flex; gap: 1.2rem; }
.footer-bottom a{ color: var(--text-muted); }
.footer-bottom a:hover{ color: var(--accent); }

.back-to-top{
  position: fixed; right: 1.5rem; bottom: 1.5rem; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); border: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(10px); transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 90;
}
.back-to-top.is-visible{ opacity: 1; transform: translateY(0); }
.back-to-top[hidden]{ display: none; }

/* 18. Reveal animations ------------------------------------------------- */
.reveal{ opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* 19. Responsive ---------------------------------------------------------- */
@media (max-width: 1080px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .flow{ grid-template-columns: repeat(2, 1fr); }
  .why-grid{ grid-template-columns: repeat(2, 1fr); }
  .projects-grid{ grid-template-columns: repeat(2, 1fr); }
  .outcomes-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px){
  .nav-desktop, .btn-header-cta{ display: none; }
  .menu-toggle{ display: flex; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-visual{ order: -1; max-width: 320px; margin: 0 auto 1rem; }
  .about-grid{ grid-template-columns: 1fr; }
  .about-media{ position: static; max-width: 320px; margin: 0 auto; aspect-ratio: 4/3; }
  .contact-grid{ grid-template-columns: 1fr; }
  .contact-info{ position: static; }
  .footer-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px){
  .services-grid, .flow, .why-grid, .projects-grid, .outcomes-grid{ grid-template-columns: 1fr; }
  .process-step{ grid-template-columns: 44px 1fr; }
  .solution-media{ aspect-ratio: 4/3; }
  .footer-grid{ grid-template-columns: 1fr; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; }
  .hero-tag{ display: none; }
}

/* 20. Case Study Page ------------------------------------------------------ */
.case-study-hero{
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16/8; background: var(--surface); display: flex; align-items: center; justify-content: center;
  margin-bottom: 2.6rem; color: var(--text-muted);
}
.case-study-hero img{ width: 100%; height: 100%; object-fit: cover; }
.case-study-meta{ display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 0; }
.case-study-meta .tag-list{ margin: 0; }
.glance-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin: 0 0 3rem; }
.glance-card{ background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.6rem; }
.glance-card h3{ font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-family: var(--font-mono); margin-bottom: .7em; }
.glance-card p{ font-size: .95rem; color: var(--text-primary); margin: 0; }
.case-study-body h2{ font-size: 1.5rem; margin: 2.6rem 0 1rem; }
.case-study-body > .container > p{ max-width: 68ch; }
.case-study-section-sub{ max-width: 68ch; }
.case-study-tech{ margin: 1.6rem 0 .5rem; }
.related-heading{ margin-top: 0; }
#related-projects{ padding-top: clamp(2rem, 1.5rem + 1.5vw, 3rem); border-top: 1px solid var(--border); }
@media (max-width: 860px){
  .glance-grid{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   20. Page loader
   ========================================================================== */
.page-loader{
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}
.page-loader.is-hidden{ opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner{ position: relative; display: flex; align-items: center; justify-content: center; }
.loader-ring{ animation: loader-spin 1.1s linear infinite; }
.loader-ring-arc{ stroke-dasharray: 110; stroke-dashoffset: 80; transform-origin: center; }
.loader-mark{
  position: absolute; font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  color: var(--accent); letter-spacing: -.02em;
}
@keyframes loader-spin{ to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .loader-ring{ animation: none; }
}

/* ==========================================================================
   21. Scroll progress bar
   ========================================================================== */
.scroll-progress{
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  z-index: 200; transition: width .1s linear;
}

/* ==========================================================================
   22. Ambient background decoration
   ========================================================================== */
.bg-decor{
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.bg-decor::before, .bg-decor::after{
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .18;
}
.bg-decor::before{
  width: 620px; height: 620px; background: var(--accent); top: -220px; right: -160px;
  animation: drift-a 22s ease-in-out infinite;
}
.bg-decor::after{
  width: 520px; height: 520px; background: #3D7CFF; bottom: -200px; left: -180px;
  animation: drift-b 26s ease-in-out infinite;
}
@keyframes drift-a{
  0%, 100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-40px, 60px) scale(1.08); }
}
@keyframes drift-b{
  0%, 100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(50px, -40px) scale(1.05); }
}
.grid-overlay{
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%);
  opacity: .35;
}
@media (prefers-reduced-motion: reduce){
  .bg-decor::before, .bg-decor::after{ animation: none; }
}

/* ==========================================================================
   23. Hero polish: glow ring, floating tags, marquee
   ========================================================================== */
.portrait-frame{ position: relative; }
.portrait-frame::before{
  content: ""; position: absolute; inset: -14px; border-radius: calc(var(--radius-lg) + 14px);
  background: conic-gradient(from 0deg, var(--accent), transparent 30%, transparent 70%, var(--accent));
  opacity: .55; filter: blur(2px); z-index: -1;
  animation: ring-rotate 8s linear infinite;
}
@keyframes ring-rotate{ to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .portrait-frame::before{ animation: none; } }

.hero-tag{ animation: float-tag 5s ease-in-out infinite; }
.hero-tag-1{ animation-delay: 0s; }
.hero-tag-2{ animation-delay: 1.2s; }
.hero-tag-3{ animation-delay: 2.4s; }
@keyframes float-tag{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce){ .hero-tag{ animation: none; } }

.marquee{
  margin-top: 3rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 1.1rem 0; overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track{ display: inline-flex; gap: 2.6rem; animation: marquee-scroll 26s linear infinite; }
.marquee-track span{
  font-family: var(--font-mono); font-size: .82rem; color: var(--text-muted); letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: .5rem;
}
.marquee-track span::before{ content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
@keyframes marquee-scroll{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .marquee-track{ animation: none; } }

/* ==========================================================================
   24. Card hover polish (services, projects, why, testimonials, flow)
   ========================================================================== */
.service-card{ position: relative; overflow: hidden; }
.service-card::before{
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(280px circle at var(--mx,50%) var(--my,0%), rgba(198,255,77,.14), transparent 70%);
  transition: opacity .3s var(--ease);
}
.service-card:hover::before{ opacity: 1; }
.service-card:hover{ box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.service-card:hover .service-icon{ background: var(--accent); color: var(--accent-ink); transform: scale(1.08) rotate(-6deg); }
.service-icon{ transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease); }
.service-cta{ display: inline-flex; align-items: center; gap: .35rem; }
.service-cta span{ transition: transform .2s var(--ease); display: inline-block; }
.service-card:hover .service-cta span{ transform: translateX(4px); }

.project-card{ transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.project-card:hover{ transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 20px 44px rgba(0,0,0,.4); }
.project-media{ position: relative; }
.project-media img{ transition: transform .5s var(--ease); }
.project-card:hover .project-media img{ transform: scale(1.06); }
.project-media-fallback{
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(198,255,77,.16), transparent 55%),
    linear-gradient(135deg, var(--surface-2), var(--bg-elevated));
}
.project-media-fallback svg{ color: var(--accent); opacity: .8; }
.project-link{ display: inline-flex; align-items: center; gap: .35rem; }
.project-link span{ transition: transform .2s var(--ease); display: inline-block; }
.project-card:hover .project-link span{ transform: translateX(4px); }

.why-item{ transition: transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease); }
.why-item:hover{ transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.why-icon{
  width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: .9rem;
  transition: transform .22s var(--ease);
}
.why-item:hover .why-icon{ transform: scale(1.1) rotate(-5deg); }

.testimonial-card{ transition: transform .22s var(--ease), border-color .22s var(--ease); }
.testimonial-card:hover{ transform: translateY(-4px); border-color: var(--border-strong); }

.flow-step{ transition: border-color .22s var(--ease), transform .22s var(--ease); }
.flow-step:hover{ border-color: var(--border-strong); transform: translateY(-3px); }
.flow-step:hover .flow-index{ color: var(--accent-dim); }
.flow-index{ transition: color .2s var(--ease); }

.outcome{ position: relative; padding-left: 2.6rem; }
.outcome-icon{
  position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface-2); color: var(--accent); display: flex; align-items: center; justify-content: center;
}

.skills-group{ transition: border-color .2s var(--ease); }
.skills-group:hover{ border-color: var(--border-strong); }
.skills-pills li{ transition: border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.skills-pills li:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.process-step{ transition: padding-left .25s var(--ease); }
.process-step:hover{ padding-left: .6rem; }
.process-step:hover .process-index{ color: var(--accent-ink); background: var(--accent); }
.process-index{ transition: background .2s var(--ease), color .2s var(--ease); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border-strong); }

.social-list a, .tag-list li{ transition: transform .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.social-list a:hover, .tag-list li:hover{ transform: translateY(-2px); border-color: var(--accent); }

.btn-accent{ position: relative; overflow: hidden; }
.btn-accent::after{
  content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent, rgba(255,255,255,.5), transparent);
  transform: translateX(-120%); transition: transform .5s var(--ease);
}
.btn-accent:hover::after{ transform: translateX(120%); }

/* ==========================================================================
   25. Stagger reveal variants
   ========================================================================== */
.reveal{ transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-up{ transform: translateY(24px); }
.reveal-left{ transform: translateX(-24px); }
.reveal-right{ transform: translateX(24px); }
.reveal-scale{ transform: scale(.92); }
.reveal.is-visible{ opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce){
  .reveal{ transition: none !important; }
}

/* ==========================================================================
   26. Section bands — alternating backgrounds so each section reads distinctly
   ========================================================================== */
.about{ background: var(--bg); position: relative; }
.services{ background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.solution{ background: var(--bg); border-top: none; border-bottom: 1px solid var(--border); }
.skills{ background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.projects{ background: var(--bg); }
.process{ background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why{ background: var(--bg); border-top: none; }
.testimonials{ background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.faq{ background: var(--bg); }
.contact{ background: var(--bg-elevated); border-top: 1px solid var(--border); }
.site-footer{ border-top: 1px solid var(--border); }

/* ==========================================================================
   27. Page banner — top-of-page header used on every sub-page (not Home)
   ========================================================================== */
.page-banner{
  padding: clamp(3.5rem, 2.8rem + 3.5vw, 6rem) 0 clamp(2.4rem, 1.8rem + 2vw, 3.4rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: relative; overflow: hidden;
}
.page-banner::before{
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 100% at 15% 0%, #000 30%, transparent 75%);
  opacity: .5;
}
.page-banner::after{
  content: ""; position: absolute; pointer-events: none;
  width: 460px; height: 460px; top: -220px; right: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(198,255,77,.16), transparent 70%);
  filter: blur(10px);
}
.page-banner .container{ position: relative; }
.page-banner .breadcrumb{
  display: inline-flex; padding: .4rem .9rem; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
}
.page-banner .eyebrow{ display: flex; align-items: center; gap: .6rem; }
.page-banner .eyebrow::before{ content: ""; width: 1.6rem; height: 2px; background: var(--accent); display: inline-block; }
.breadcrumb{
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted);
  margin: 0 0 1.1rem; position: relative;
}
.breadcrumb a{ color: var(--text-secondary); transition: color .15s var(--ease); }
.breadcrumb a:hover{ color: var(--accent); }
.breadcrumb .sep{ color: var(--text-muted); }
.breadcrumb .current{ color: var(--text-primary); }
.page-banner-title{
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem); letter-spacing: -.02em;
  margin-bottom: .5em; position: relative; max-width: 34ch;
}
.page-banner-sub{ max-width: 56ch; font-size: 1.08rem; margin: 0; position: relative; }
