/* ============================================================
   SOHAG GAIN — Portfolio
   Design system: dark graphite "automation canvas" theme.
   Display: Space Grotesk | Body: Inter | Utility/labels: JetBrains Mono
   ============================================================ */

:root{
  --ink:        #0B1F3A;
  --panel:      #102845;
  --panel-2:    #14304F;
  --line:       #2A3F5C;
  --line-soft:  #1C3050;
  --text:       #F7F5F0;
  --muted:      #B8C0CC;
  --muted-2:    #8894A8;
  --teal:       #C9A227;
  --teal-dim:   #8A6F1C;
  --amber:      #E8C766;
  --red-soft:   #E5675A;

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

  --container: 1120px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.22,.9,.32,1);
}

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

body{
  margin:0;
  background:var(--ink);
  color:var(--text);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

::selection{ background:var(--teal); color:var(--ink); }

/* Focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline:2px solid var(--teal);
  outline-offset:3px;
  border-radius:4px;
}

.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 24px;
}

/* -------------------- Typography -------------------- */
h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:600;
  line-height:1.15;
  letter-spacing:-0.01em;
  margin:0;
  color:var(--text);
}
h1{ font-size:clamp(2.4rem, 5vw, 4.2rem); }
.gradient-text{
  background:linear-gradient(100deg, var(--text) 30%, var(--teal) 50%, var(--text) 70%);
  background-size:200% auto;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  animation:gradient-sweep 6s ease-in-out infinite;
}
@keyframes gradient-sweep{
  0%{ background-position:200% center; }
  100%{ background-position:-200% center; }
}
@media (prefers-reduced-motion: reduce){ .gradient-text{ animation:none; background:none; color:var(--text); } }
h2{ font-size:clamp(1.8rem, 3.2vw, 2.6rem); }
h3{ font-size:1.25rem; }
p{ margin:0; color:var(--muted); }

.eyebrow{
  font-family:var(--font-mono);
  font-size:0.78rem;
  letter-spacing:0.06em;
  color:var(--teal);
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
}
.eyebrow::before{
  content:"";
  width:6px; height:6px;
  border-radius:50%;
  background:var(--teal);
  box-shadow:0 0 0 3px rgba(201,162,39,.18);
}

.section{ padding:96px 0; border-bottom:1px solid var(--line-soft); }
.section-head{ max-width:640px; margin-bottom:48px; }
.section-head p{ margin-top:14px; font-size:1.05rem; }

/* -------------------- Buttons -------------------- */
.btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--font-mono);
  font-size:0.85rem;
  letter-spacing:0.02em;
  padding:13px 22px;
  border-radius:var(--radius-sm);
  border:1px solid var(--line);
  cursor:pointer;
  transition:transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  white-space:nowrap;
}
.btn-primary{
  background:var(--teal);
  color:var(--ink);
  border-color:var(--teal);
  font-weight:600;
}
.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px -8px rgba(201,162,39,.45);
}
.btn-outline{
  background:transparent;
  color:var(--text);
}
.btn-outline:hover{
  border-color:var(--amber);
  color:var(--amber);
  transform:translateY(-2px);
}
.btn-amber{
  background:var(--amber);
  border-color:var(--amber);
  color:var(--ink);
  font-weight:600;
}
.btn-amber:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px -8px rgba(232,199,102,.45);
}
.btn[disabled]{ opacity:.5; cursor:not-allowed; transform:none !important; box-shadow:none !important; }

/* -------------------- Header / Nav -------------------- */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(10,14,19,0.82);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line-soft);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 0;
}
.brand{
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.15rem;
  display:flex; align-items:center; gap:10px;
}
.brand-mark{
  width:34px; height:34px;
  border-radius:8px;
  background:linear-gradient(135deg, var(--teal), var(--teal-dim));
  color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-mono); font-weight:700; font-size:0.85rem;
}
.nav-links{ display:flex; align-items:center; gap:34px; }
.nav-links a{
  position:relative;
  font-family:var(--font-mono);
  font-size:0.85rem;
  color:var(--muted);
  padding:4px 0;
  transition:color .2s var(--ease);
}
.nav-links a::after{
  content:"";
  position:absolute; left:0; bottom:-2px;
  width:0; height:1px;
  background:var(--teal);
  transition:width .28s var(--ease);
}
.nav-links a:hover{ color:var(--text); }
.nav-links a:hover::after{ width:100%; }
.nav-links a.active{ color:var(--teal); }
.nav-cta{ display:flex; align-items:center; gap:14px; }

.nav-toggle{
  display:none;
  background:none; border:1px solid var(--line); border-radius:6px;
  width:40px; height:40px; color:var(--text); cursor:pointer;
  align-items:center; justify-content:center;
}

@media (max-width: 860px){
  .nav-links{
    position:fixed; inset:66px 0 0 0;
    background:var(--ink);
    flex-direction:column; align-items:flex-start;
    padding:32px 24px; gap:22px;
    transform:translateY(-12px);
    opacity:0; pointer-events:none;
    transition:opacity .25s var(--ease), transform .25s var(--ease);
    border-top:1px solid var(--line-soft);
  }
  .nav-links.open{ opacity:1; pointer-events:auto; transform:translateY(0); }
  .nav-toggle{ display:flex; }
  .nav-cta .btn-outline{ display:none; }
}

/* -------------------- Hero -------------------- */
.hero{
  padding:100px 0 80px;
  position:relative;
  overflow:hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.1fr 0.9fr;
  gap:56px;
  align-items:center;
}
@media (max-width:920px){ .hero-grid{ grid-template-columns:1fr; } }

.hero h1{ margin-bottom:22px; }
.hero-intro{ display:flex; align-items:center; gap:16px; margin-bottom:26px; }
.hero .lede{ font-size:1.15rem; max-width:520px; margin-bottom:34px; }
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom:34px; }

.status-pill{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--font-mono); font-size:0.78rem; color:var(--muted);
  border:1px solid var(--line); border-radius:999px;
  padding:8px 16px;
}
.status-pill .dot{
  width:7px; height:7px; border-radius:50%; background:var(--teal);
  animation:pulse 2s infinite;
}
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(201,162,39,.5); }
  70%{ box-shadow:0 0 0 8px rgba(201,162,39,0); }
  100%{ box-shadow:0 0 0 0 rgba(201,162,39,0); }
}

/* ---- Signature element: animated workflow diagram ---- */
.flow{
  position:relative;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px 22px;
}
.flow-label{
  font-family:var(--font-mono); font-size:0.72rem; color:var(--muted-2);
  margin-bottom:18px; display:flex; justify-content:space-between;
}
.flow svg{ width:100%; height:auto; display:block; }
.flow-node-label{
  font-family:var(--font-mono); font-size:11px; fill:var(--muted);
}
.flow-node-title{
  font-family:var(--font-body); font-size:12.5px; fill:var(--text); font-weight:600;
}
.flow-path{
  fill:none; stroke:var(--line); stroke-width:2;
}
.flow-path-active{
  fill:none; stroke:var(--teal); stroke-width:2;
  stroke-dasharray:6 8;
  animation:dash 1.4s linear infinite;
}
@keyframes dash{ to{ stroke-dashoffset:-28; } }
.flow-node circle{
  fill:var(--panel-2); stroke:var(--line); stroke-width:1.5;
  transition:stroke .3s var(--ease), fill .3s var(--ease);
}
.flow-node.on circle{
  stroke:var(--teal); fill:#241d08;
  filter:drop-shadow(0 0 6px rgba(201,162,39,.7));
  animation:node-pulse 1.1s var(--ease);
}
@keyframes node-pulse{
  0%{ filter:drop-shadow(0 0 0 rgba(201,162,39,0)); }
  30%{ filter:drop-shadow(0 0 9px rgba(201,162,39,.85)); }
  100%{ filter:drop-shadow(0 0 6px rgba(201,162,39,.7)); }
}
.flow-node:hover circle{ stroke:var(--amber); }

.flow-particle{
  fill:var(--teal);
  filter:drop-shadow(0 0 5px rgba(201,162,39,.9));
}
@media (prefers-reduced-motion: reduce){
  .flow-particle{ display:none; }
  .flow-node.on circle{ animation:none; }
}

/* -------------------- Stack strip -------------------- */
.stack-strip{
  display:flex; flex-wrap:wrap; gap:12px;
  padding:28px 0 0;
}
.chip{
  font-family:var(--font-mono); font-size:0.8rem; color:var(--muted);
  border:1px solid var(--line); border-radius:999px;
  padding:8px 16px;
  transition:border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.chip:hover{ border-color:var(--teal); color:var(--teal); transform:translateY(-2px); }

/* -------------------- Video embeds (responsive 16:9) -------------------- */
.video-frame{
  position:relative;
  width:100%;
  padding-top:56.25%;
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--panel);
  transition:border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.video-frame:hover{
  border-color:var(--teal-dim);
  box-shadow:0 20px 40px -20px rgba(0,0,0,.55);
  transform:translateY(-4px);
}
.video-frame iframe{
  position:absolute;
  top:0; left:0;
  width:100%; height:100%;
  border:0;
}

/* -------------------- Cards / Projects -------------------- */
.grid{ display:grid; gap:24px; }
.grid-3{ grid-template-columns:repeat(3, 1fr); }
.grid-2{ grid-template-columns:repeat(2, 1fr); }
.about-grid{ grid-template-columns:0.85fr 1.15fr; gap:48px; align-items:start; }
@media (max-width:900px){ .grid-3, .grid-2, .about-grid{ grid-template-columns:1fr; } }

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  transition:transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover{
  transform:translateY(-6px);
  border-color:var(--teal-dim);
  box-shadow:0 20px 40px -20px rgba(0,0,0,.55);
}
.card .tag-row{ display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 18px; }
.tag{
  font-family:var(--font-mono); font-size:0.72rem; color:var(--muted);
  background:var(--panel-2); border:1px solid var(--line);
  padding:5px 10px; border-radius:5px;
}
.card h3{ margin-bottom:10px; }
.card p{ font-size:0.95rem; }
.solution-problem{
  font-style:italic;
  color:var(--muted-2);
  font-size:0.9rem;
  margin-bottom:14px;
  padding-bottom:14px;
  border-bottom:1px dashed var(--line-soft);
}

/* -------------------- Portfolio filter row -------------------- */
.filter-row{
  display:flex; flex-wrap:wrap; gap:10px;
  padding-bottom:8px;
}
.filter-btn{
  font-family:var(--font-mono);
  font-size:0.8rem;
  color:var(--muted);
  background:transparent;
  border:1px solid var(--line);
  border-radius:999px;
  padding:9px 18px;
  cursor:pointer;
  white-space:nowrap;
  flex-shrink:0;
  transition:all .25s var(--ease);
}
.filter-btn:hover{ border-color:var(--teal-dim); color:var(--text); }
.filter-btn.active{ background:var(--teal); border-color:var(--teal); color:var(--ink); font-weight:600; }
.portfolio-category.filtered-out{ display:none; }

/* -------------------- Principle list (About > How I Think) -------------------- */
.principle-list{
  list-style:none;
  margin:0; padding:0;
  display:flex; flex-direction:column; gap:10px;
}
.principle-list li{
  position:relative;
  padding-left:26px;
  color:var(--muted);
  font-size:0.95rem;
}
.principle-list li::before{
  content:"→";
  position:absolute;
  left:0; top:0;
  color:var(--teal);
  font-family:var(--font-mono);
}
.card-link{
  margin-top:18px;
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:0.82rem; color:var(--teal);
}
.card-link svg{ width:14px; height:14px; transition:transform .25s var(--ease); }
.card:hover .card-link svg{ transform:translate(3px,-3px); }

/* -------------------- Timeline (Experience) -------------------- */
.timeline{ display:flex; flex-direction:column; }
.timeline-item{
  display:grid; grid-template-columns:160px 1fr; gap:28px;
  padding:28px 0; border-top:1px solid var(--line-soft);
}
.timeline-item:first-child{ border-top:none; }
.timeline-date{ font-family:var(--font-mono); font-size:0.8rem; color:var(--muted-2); }
.timeline-item h3{ margin-bottom:6px; }
.timeline-item .role-co{ font-family:var(--font-mono); font-size:0.82rem; color:var(--teal); margin-bottom:10px; display:block; }
@media (max-width:640px){ .timeline-item{ grid-template-columns:1fr; gap:8px; } }

/* -------------------- Skills -------------------- */
.skill-group{ margin-bottom:28px; }
.skill-group-title{ font-family:var(--font-mono); font-size:0.8rem; color:var(--muted-2); margin-bottom:14px; text-transform:uppercase; letter-spacing:.04em; }
.skill-chips{ display:flex; flex-wrap:wrap; gap:10px; }

/* -------------------- Forms -------------------- */
.form{ display:grid; gap:20px; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width:640px){ .form-row{ grid-template-columns:1fr; } }
label{ font-family:var(--font-mono); font-size:0.78rem; color:var(--muted); margin-bottom:8px; display:block; }
input, textarea, select{
  width:100%;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:13px 14px;
  color:var(--text);
  font-family:var(--font-body);
  font-size:0.95rem;
  transition:border-color .25s var(--ease);
}
input:hover, textarea:hover, select:hover{ border-color:var(--muted-2); }
input:focus, textarea:focus, select:focus{ border-color:var(--teal); outline:none; }
textarea{ resize:vertical; min-height:140px; }
.field{ display:flex; flex-direction:column; }
.honeypot{ position:absolute; left:-9999px; opacity:0; height:0; }
#form-status{ font-family:var(--font-mono); font-size:0.85rem; padding:12px 0; }
#form-status.ok{ color:var(--teal); }
#form-status.err{ color:var(--red-soft); }

/* -------------------- Contact info list -------------------- */
.info-list{ display:flex; flex-direction:column; gap:18px; }
.info-item{ display:flex; gap:14px; align-items:flex-start; }
.info-item .ic{
  width:38px; height:38px; border-radius:8px; background:var(--panel-2);
  border:1px solid var(--line); display:flex; align-items:center; justify-content:center;
  flex-shrink:0; color:var(--teal);
}
.info-item a:hover, .info-item span.hoverable:hover{ color:var(--teal); }

/* -------------------- CTA band -------------------- */
.cta-band{
  position:relative;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:56px;
  overflow:hidden;
  display:flex; align-items:center; justify-content:space-between; gap:32px;
  flex-wrap:wrap;
}
.cta-band::before{
  content:"";
  position:absolute;
  width:420px; height:420px;
  top:-220px; right:-160px;
  background:radial-gradient(circle, rgba(201,162,39,.14) 0%, transparent 70%);
  animation:cta-glow-move 9s ease-in-out infinite;
  pointer-events:none;
}
@keyframes cta-glow-move{
  0%, 100%{ transform:translate(0,0) scale(1); }
  50%{ transform:translate(-40px,30px) scale(1.15); }
}
@media (prefers-reduced-motion: reduce){ .cta-band::before{ animation:none; } }
.cta-band > *{ position:relative; z-index:1; }
.cta-band h2{ margin-bottom:10px; }

/* -------------------- Footer -------------------- */
.site-footer{ padding:56px 0 40px; }
.footer-grid{
  display:grid;
  grid-template-columns:1fr auto;
  gap:40px;
  align-items:start;
  margin-bottom:40px;
}
.footer-col-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:22px;
}
@media (max-width:760px){
  .footer-grid{ grid-template-columns:1fr; }
  .footer-col-right{ align-items:flex-start; }
}
.footer-links{ display:flex; gap:24px; flex-wrap:wrap; justify-content:flex-end; }
.footer-links a{
  font-family:var(--font-mono); font-size:0.82rem; color:var(--muted);
  transition:color .2s var(--ease);
}
.footer-links a:hover{ color:var(--teal); }
.footer-bottom{
  border-top:1px solid var(--line-soft);
  padding-top:24px;
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  font-family:var(--font-mono); font-size:0.76rem; color:var(--muted-2);
}
.social-row{ display:flex; gap:12px; flex-wrap:wrap; max-width:280px; }
.social-row a{
  width:38px; height:38px; border-radius:8px;
  border:1px solid var(--line); display:flex; align-items:center; justify-content:center;
  color:var(--muted); transition:all .25s var(--ease);
}
.social-row a:hover{ color:var(--ink); background:var(--teal); border-color:var(--teal); transform:translateY(-3px); }

/* -------------------- Hexagon seal motif (signature brand shape) -------------------- */
.hex-frame{
  --hex: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
  clip-path: var(--hex);
  -webkit-clip-path: var(--hex);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display:block;
  width:100%;
}
.hex-wrap{
  position:relative;
  display:inline-flex;
  width:220px;
  flex-shrink:0;
  padding:5px;
  background:linear-gradient(135deg, var(--teal), var(--teal-dim));
  clip-path: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
  -webkit-clip-path: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
}
.hex-ring{
  position:absolute;
  inset:-12px;
  border:1.5px solid var(--teal);
  opacity:.4;
  clip-path: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
  -webkit-clip-path: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
  animation: hex-spin 16s linear infinite;
  pointer-events:none;
}
@keyframes hex-spin{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}
@media (prefers-reduced-motion: reduce){ .hex-ring{ animation:none; } }

/* Hexagon watermark, used as a faint background accent */
.hex-watermark{
  position:absolute;
  pointer-events:none;
  opacity:.06;
  border:2px solid var(--teal);
  clip-path: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
  -webkit-clip-path: polygon(92.97% 50%, 71.48% 87.3%, 28.52% 87.3%, 7.03% 50%, 28.52% 12.7%, 71.48% 12.7%);
}

/* -------------------- Case study modal -------------------- */
.case-modal{
  position:fixed; inset:0; z-index:200;
  display:none;
  align-items:flex-start;
  justify-content:center;
  padding:60px 20px;
  overflow-y:auto;
}
.case-modal.open{ display:flex; }
.case-modal-backdrop{
  position:fixed; inset:0;
  background:rgba(5,10,20,0.75);
  backdrop-filter:blur(4px);
}
.case-modal-panel{
  position:relative;
  z-index:1;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  max-width:640px;
  width:100%;
  padding:40px;
  box-shadow:0 30px 60px -20px rgba(0,0,0,.6);
}
.case-modal-close{
  position:absolute; top:18px; right:18px;
  width:34px; height:34px;
  border-radius:8px;
  background:var(--panel-2);
  border:1px solid var(--line);
  color:var(--muted);
  cursor:pointer;
  font-size:1rem;
  transition:all .2s var(--ease);
}
.case-modal-close:hover{ color:var(--text); border-color:var(--teal-dim); }
.case-modal-body .cm-eyebrow{ font-family:var(--font-mono); font-size:0.78rem; color:var(--teal); margin-bottom:6px; }
.case-modal-body h2{ font-size:1.5rem; margin-bottom:6px; }
.case-modal-body .cm-stack{ font-family:var(--font-mono); font-size:0.8rem; color:var(--muted-2); margin-bottom:24px; }
.case-modal-body h4{ font-family:var(--font-mono); font-size:0.78rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-2); margin:24px 0 10px; }
.case-modal-body h4:first-of-type{ margin-top:0; }
.case-modal-body p{ color:var(--muted); font-size:0.95rem; }
.case-modal-body ol{ margin:0; padding-left:20px; color:var(--muted); font-size:0.92rem; }
.case-modal-body ol li{ margin-bottom:6px; }
.case-modal-body ul.cm-capabilities{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.case-modal-body ul.cm-capabilities li{
  font-family:var(--font-mono); font-size:0.76rem; color:var(--muted);
  background:var(--panel-2); border:1px solid var(--line);
  padding:6px 12px; border-radius:6px;
}
.case-modal-body .cm-github{
  display:inline-flex; align-items:center; gap:8px;
  margin-top:28px;
  font-family:var(--font-mono); font-size:0.85rem; color:var(--ink);
  background:var(--teal); padding:11px 20px; border-radius:6px; font-weight:600;
}
@media (max-width:640px){ .case-modal-panel{ padding:28px 22px; } }

/* -------------------- Glossary term tooltips -------------------- */
.term{
  position:relative;
  border-bottom:1px dotted var(--teal);
  cursor:help;
  color:var(--text);
}
.term::after{
  content:attr(data-tooltip);
  position:absolute;
  bottom:calc(100% + 10px);
  left:50%;
  transform:translateX(-50%);
  width:240px;
  background:var(--panel-2);
  border:1px solid var(--teal-dim);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  font-family:var(--font-body);
  font-size:0.82rem;
  font-style:normal;
  font-weight:400;
  color:var(--text);
  line-height:1.4;
  text-align:left;
  white-space:normal;
  display:none;
  z-index:20;
  box-shadow:0 12px 24px -8px rgba(0,0,0,.5);
}
.term:hover::after,
.term:focus-visible::after,
.term.tooltip-open::after{
  display:block;
}
@media (max-width:520px){
  .term::after{ width:190px; left:0; transform:translateX(0); }
}

/* -------------------- RAG demo: ingestion row + answer reveal -------------------- */
.rag-ingest-row{
  display:flex; align-items:center; justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:26px;
  padding-bottom:26px;
  border-bottom:1px dashed var(--line-soft);
}
.rag-ingest-node{
  font-family:var(--font-mono);
  font-size:0.8rem;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 16px;
  background:var(--panel-2);
}
.rag-ingest-arrow{ color:var(--teal-dim); font-size:0.9rem; }

.rag-answer{
  max-height:0;
  overflow:hidden;
  opacity:0;
  transition:max-height .5s var(--ease), opacity .5s var(--ease), margin .5s var(--ease);
  background:var(--panel-2);
  border:1px solid var(--teal-dim);
  border-radius:var(--radius-sm);
  padding:0 18px;
  margin-bottom:0;
}
.rag-answer.show{
  max-height:220px;
  opacity:1;
  padding:16px 18px;
  margin-bottom:24px;
}
.rag-answer p{ color:var(--text); font-style:italic; font-size:0.95rem; margin-top:8px; }
.rag-answer-tag{
  display:inline-block;
  margin-top:12px;
  font-family:var(--font-mono);
  font-size:0.72rem;
  color:var(--teal);
}

/* -------------------- Interactive AI Agent demo -------------------- */
.agent-demo{
  max-width:640px;
  margin:0 auto;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--panel);
  padding:32px;
}
.agent-demo-badge{
  display:inline-block;
  font-family:var(--font-mono);
  font-size:0.72rem;
  color:var(--muted-2);
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 14px;
  margin-bottom:22px;
}
.agent-demo-request{
  background:var(--panel-2);
  border:1px solid var(--line-soft);
  border-radius:var(--radius-sm);
  padding:16px 18px;
  margin-bottom:24px;
}
.agent-demo-label{ font-family:var(--font-mono); font-size:0.72rem; color:var(--teal); display:block; margin-bottom:8px; }
.agent-demo-request p{ color:var(--text); font-style:italic; font-size:0.98rem; }

.agent-demo-steps{ display:flex; flex-direction:column; gap:4px; margin-bottom:24px; }
.agent-step{
  display:flex; align-items:center; gap:12px;
  padding:10px 12px;
  border-radius:var(--radius-sm);
  color:var(--muted-2);
  font-size:0.92rem;
  transition:color .3s var(--ease), background .3s var(--ease);
}
.agent-step-mark{
  width:20px; height:20px;
  border-radius:50%;
  border:1.5px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size:0.7rem;
  flex-shrink:0;
  transition:all .3s var(--ease);
}
.agent-step.active{ color:var(--text); background:var(--panel-2); }
.agent-step.active .agent-step-mark{
  border-color:var(--teal); color:var(--ink); background:var(--teal);
  animation:node-pulse 1s var(--ease);
}
.agent-step.done{ color:var(--muted); }
.agent-step.done .agent-step-mark{ border-color:var(--teal-dim); color:var(--teal); background:transparent; }
#run-agent-demo:disabled{ opacity:.6; cursor:not-allowed; }

/* -------------------- GoHighLevel interactive pipeline (accordion) -------------------- */
.ghl-pipeline{
  max-width:680px;
  margin:0 auto;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--panel);
}
.ghl-step{
  width:100%;
  display:flex;
  align-items:center;
  gap:16px;
  padding:18px 22px;
  background:transparent;
  border:none;
  border-bottom:1px solid var(--line-soft);
  cursor:pointer;
  text-align:left;
  font-family:var(--font-body);
  transition:background .25s var(--ease);
}
.ghl-pipeline > *:last-child.ghl-step, .ghl-step:last-of-type{ border-bottom:none; }
.ghl-step:hover{ background:var(--panel-2); }
.ghl-step-icon{
  font-size:1.2rem;
  color:var(--teal);
  flex-shrink:0;
  width:28px;
  text-align:center;
}
.ghl-step-title{
  flex:1;
  font-weight:600;
  color:var(--text);
  font-size:0.98rem;
}
.ghl-step-chevron{
  color:var(--muted-2);
  transition:transform .3s var(--ease);
  flex-shrink:0;
}
.ghl-step[aria-expanded="true"] .ghl-step-chevron{ transform:rotate(180deg); color:var(--teal); }
.ghl-step[aria-expanded="true"]{ background:var(--panel-2); }
.ghl-step-panel{
  max-height:0;
  overflow:hidden;
  transition:max-height .35s var(--ease);
  background:var(--panel-2);
}
.ghl-step-panel.open{ max-height:120px; }
.ghl-step-panel p{
  padding:0 22px 20px 66px;
  font-size:0.92rem;
  color:var(--muted);
}

/* -------------------- Why Hire Me differentiators -------------------- */
.why-item{
  display:flex;
  gap:22px;
  padding:8px 0;
}
.why-num{
  font-family:var(--font-mono);
  font-size:1.6rem;
  font-weight:700;
  color:var(--teal-dim);
  flex-shrink:0;
  line-height:1;
  min-width:48px;
}
.why-item:hover .why-num{ color:var(--teal); }
.why-num{ transition:color .3s var(--ease); }

/* -------------------- Simple / Technical view toggle -------------------- */
.view-toggle{
  display:inline-flex;
  gap:2px;
  padding:4px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:999px;
  margin-bottom:36px;
}
.view-toggle-btn{
  font-family:var(--font-mono);
  font-size:0.8rem;
  color:var(--muted);
  background:transparent;
  border:none;
  border-radius:999px;
  padding:9px 20px;
  cursor:pointer;
  transition:all .25s var(--ease);
}
.view-toggle-btn.active{ background:var(--teal); color:var(--ink); font-weight:600; }
.view-toggle-btn:not(.active):hover{ color:var(--text); }

.view-technical{ display:none; }
.arch-stack.show-technical .view-simple{ display:none; }
.arch-stack.show-technical .view-technical{ display:block; }

/* -------------------- Architecture stack (vertical layered pipeline) -------------------- */
.arch-stack{
  max-width:640px;
  margin:0 auto;
  position:relative;
}
.arch-stack::before{
  content:"";
  position:absolute;
  left:27px; top:28px; bottom:28px;
  width:1px;
  background:repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 4px, transparent 4px, transparent 9px);
}
.arch-layer{
  display:flex;
  align-items:flex-start;
  gap:22px;
  padding:18px 0;
  position:relative;
}
.arch-icon{
  flex-shrink:0;
  width:56px; height:56px;
  border-radius:14px;
  background:var(--panel);
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size:1.4rem;
  color:var(--teal);
  position:relative; z-index:1;
  transition:border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.arch-layer:hover .arch-icon{
  border-color:var(--teal);
  transform:scale(1.08);
  box-shadow:0 0 16px rgba(201,162,39,.25);
}
.arch-layer-final .arch-icon{
  background:var(--teal); color:var(--ink); border-color:var(--teal);
}
.arch-body h3{ font-size:1.1rem; }
.arch-body p{ max-width:460px; }

/* -------------------- Before / After transformation cards -------------------- */
.before-after-card{
  border-radius:var(--radius);
  padding:32px 28px;
  height:100%;
  border:1px solid var(--line);
}
.before-card{ background:var(--panel); }
.after-card{ background:var(--panel); border-color:var(--teal-dim); }
.ba-label{
  font-family:var(--font-mono);
  font-size:0.78rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  margin-bottom:18px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line-soft);
}
.before-card .ba-label{ color:var(--muted-2); }
.after-card .ba-label{ color:var(--teal); }
.ba-step{
  font-size:0.95rem;
  color:var(--muted);
  padding:2px 0;
}
.before-card .ba-step{ color:var(--muted-2); }
.after-card .ba-step{ color:var(--text); }
.ba-arrow{
  color:var(--line);
  font-size:0.9rem;
  padding:2px 0;
}
.after-card .ba-arrow{ color:var(--teal-dim); }
.ba-final{
  font-weight:600;
  margin-top:2px;
}
.before-card .ba-final{ color:var(--red-soft); }
.after-card .ba-final{ color:var(--teal); }
.guardrail-card .ba-final{ color:var(--teal); }
.guardrail-card{ height:100%; }

@media (max-width:640px){
  .arch-icon{ width:44px; height:44px; font-size:1.1rem; }
  .arch-stack::before{ left:21px; }
  .arch-layer{ gap:16px; }
}

/* -------------------- Mouse-follow ambient glow -------------------- */
.cursor-glow{
  position:fixed;
  top:0; left:0;
  width:520px; height:520px;
  pointer-events:none;
  z-index:1;
  transform:translate(calc(var(--mx, 50vw) - 260px), calc(var(--my, 40vh) - 260px));
  background:radial-gradient(circle, rgba(201,162,39,0.10) 0%, rgba(201,162,39,0.04) 40%, transparent 70%);
  opacity:0;
  transition:opacity .4s var(--ease);
  will-change:transform;
}
.js .cursor-glow.active{ opacity:1; }
@media (max-width:860px){ .cursor-glow{ display:none; } }

/* -------------------- Card tilt (mouse-driven, JS sets the vars) -------------------- */
.tilt{
  transform:perspective(800px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateZ(0);
  transition:transform .12s ease-out, border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.tilt:hover{ transition:transform .05s linear, border-color .3s var(--ease), box-shadow .3s var(--ease); }

/* -------------------- Reveal on scroll --------------------
   Only hides content once JS confirms it can reveal it again
   (class "js" is added by main.js). Without JS, everything is
   visible by default — no broken/invisible content. */
.js .reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in{ opacity:1; transform:translateY(0); }
.grid.grid-2 .reveal:nth-child(2), .grid.grid-3 .reveal:nth-child(2){ transition-delay:.08s; }
.grid.grid-2 .reveal:nth-child(3), .grid.grid-3 .reveal:nth-child(3){ transition-delay:.16s; }
.grid.grid-2 .reveal:nth-child(4){ transition-delay:.24s; }

/* -------------------- Page hero (inner pages) -------------------- */
.page-hero{
  padding:76px 0 48px;
  position:relative;
  background-image:radial-gradient(var(--line-soft) 1px, transparent 1px);
  background-size:26px 26px;
  -webkit-mask-image:linear-gradient(to bottom, black 0%, transparent 100%);
  mask-image:linear-gradient(to bottom, black 0%, transparent 100%);
}
.page-hero .container{ position:relative; }
.page-hero h1{ font-size:clamp(2rem, 4vw, 3rem); }
.page-hero p{ max-width:600px; margin-top:16px; font-size:1.05rem; }

/* -------------------- Misc -------------------- */
.divider{ height:1px; background:var(--line-soft); border:none; margin:0; }
.center{ text-align:center; }
.mt-8{ margin-top:8px; } .mt-16{ margin-top:16px; } .mt-24{ margin-top:24px; } .mt-40{ margin-top:40px; }
