/* ===================================================================
   TOKENS
=================================================================== */
:root{
  --bg: #0a0e14;
  --bg-alt: #0d131b;
  --surface: #121a24;
  --surface-2: #16202b;
  --border: #1f2b38;
  --text: #e7edf3;
  --text-muted: #7c8a9a;
  --accent: #00e0b8;
  --accent-dim: #00e0b833;
  --accent-2: #4c8dff;
  --danger: #ff5d5d;
  --warn: #ffb648;

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

  --container: 1140px;
  --radius: 10px;
  --transition: .25s ease;
}

*{ margin:0; padding:0; box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height:1.6;
  overflow-x:hidden;
}

.mono{ font-family: var(--font-mono); }
.accent{ color: var(--accent); }

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

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

/* subtle background grid, evokes schematic / blueprint paper */
.grid-overlay{
  position:fixed; inset:0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity:.15;
  pointer-events:none;
  z-index:0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

::selection{ background: var(--accent); color:#02110d; }

/* scrollbar */
::-webkit-scrollbar{ width:9px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: var(--border); border-radius:10px; }
::-webkit-scrollbar-thumb:hover{ background: var(--accent); }

/* ===================================================================
   BUTTONS
=================================================================== */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 13px 24px;
  font-family: var(--font-body);
  font-weight:600;
  font-size: .93rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor:pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  white-space:nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{
  background: var(--accent);
  color: #04140f;
}
.btn-primary:hover{ background:#1feccb; }
.btn-outline{
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }
.btn-sm{ padding: 8px 16px; font-size:.8rem; }
.btn-block{ width:100%; justify-content:center; }

/* ===================================================================
   HEADER
=================================================================== */
.header{
  position:fixed; top:0; left:0; right:0;
  z-index:100;
  background: rgba(10,14,20,.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.header-inner{
  max-width: var(--container);
  margin:0 auto;
  padding: 16px 24px;
  display:flex; align-items:center; justify-content:space-between;
  gap:24px;
}
.logo{
  display:flex; align-items:center; gap:10px;
  font-family: var(--font-display);
  font-weight:700;
  font-size:1.1rem;
  letter-spacing:.5px;
}
.logo-mark{
  width:34px; height:34px;
  display:flex; align-items:center; justify-content:center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius:7px;
  color: var(--accent);
  font-size:.95rem;
}
.navlist{
  display:flex; align-items:center; gap:30px;
}
.nav-link{
  font-size:.92rem;
  color: var(--text-muted);
  position:relative;
  padding: 4px 0;
  transition: color var(--transition);
}
.nav-link::after{
  content:'';
  position:absolute; left:0; bottom:-2px;
  width:0; height:2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active{ color: var(--text); }
.nav-link.active::after{ width:100%; }

.header-right{ display:flex; align-items:center; gap:16px; }

.status-pill{
  display:flex; align-items:center; gap:7px;
  padding: 6px 12px;
  border:1px solid var(--border);
  border-radius:20px;
  font-size:.72rem;
  letter-spacing:.5px;
  color: var(--accent);
}
.status-dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-dim);
  animation: pulse 2s infinite;
}
.status-dot--sm{ width:9px; height:9px; }
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(0,224,184,.5); }
  70%{ box-shadow:0 0 0 8px rgba(0,224,184,0); }
  100%{ box-shadow:0 0 0 0 rgba(0,224,184,0); }
}

.menu-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none; border:none; cursor:pointer;
  padding:6px;
}
.menu-toggle span{
  width:22px; height:2px; background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2){ opacity:0; }
.menu-toggle.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ===================================================================
   HERO
=================================================================== */
.hero{
  position:relative;
  min-height:100vh;
  display:flex; align-items:center;
  padding-top:90px;
  overflow:hidden;
}
#netCanvas{
  position:absolute; inset:0;
  width:100%; height:100%;
  z-index:0;
  opacity:.55;
}
.hero-inner{
  position:relative; z-index:1;
  max-width:760px;
}
.eyebrow{
  display:flex; align-items:center; gap:8px;
  color: var(--accent);
  font-size:.85rem;
  margin-bottom:22px;
}
.cursor-dot{
  width:8px; height:8px; border-radius:50%;
  background: var(--accent);
}
.type-cursor{
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink{ 50%{ opacity:0; } }

.hero-title{
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height:1.15;
  font-weight:700;
  margin-bottom:22px;
}
.hero-sub{
  color: var(--text-muted);
  font-size:1.05rem;
  max-width:600px;
  margin-bottom:34px;
}
.hero-actions{
  display:flex; flex-wrap:wrap; gap:16px;
  margin-bottom:56px;
}
.hero-stats{
  display:flex; gap:48px; flex-wrap:wrap;
}
.stat{ display:flex; flex-direction:column; gap:6px; }
.stat-num{
  font-family: var(--font-display);
  font-size:2rem; font-weight:700;
  color: var(--text);
}
.stat-label{
  font-size:.68rem;
  color: var(--text-muted);
  letter-spacing:.6px;
}

.scroll-hint{
  position:absolute; bottom:32px; left:50%;
  transform: translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  color: var(--text-muted);
  font-size:.68rem;
  letter-spacing:2px;
  z-index:1;
  animation: floaty 2.4s ease-in-out infinite;
}
@keyframes floaty{
  0%,100%{ transform: translate(-50%,0); }
  50%{ transform: translate(-50%,8px); }
}

/* ===================================================================
   SECTIONS (shared)
=================================================================== */
.section{
  position:relative;
  padding: 110px 0;
  z-index:1;
}
.section-alt{ background: var(--bg-alt); }
.section-tag{
  color: var(--accent);
  font-size:.82rem;
  margin-bottom:14px;
  letter-spacing:.5px;
}
.section-title{
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight:700;
  margin-bottom:16px;
}
.section-desc{
  color: var(--text-muted);
  max-width:560px;
  margin-bottom:48px;
}

.reveal{
  opacity:0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view{
  opacity:1;
  transform: translateY(0);
}

/* ===================================================================
   ABOUT
=================================================================== */
.about-grid{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:56px;
  align-items:start;
  margin-top:40px;
}
.badge-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position:relative;
}
.badge-top{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:26px;
}
.badge-id{ color: var(--text-muted); font-size:.7rem; }
.badge-avatar{
  width:72px; height:72px;
  border-radius:50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-weight:700; font-size:1.4rem;
  color:#04140f;
  margin-bottom:18px;
}
.badge-avatar-img{
  width:72px; height:72px;
  border-radius:50%;
  object-fit:cover;
  border: 2px solid var(--accent);
  margin-bottom:18px;
}
.badge-name{ font-family: var(--font-display); font-size:1.2rem; margin-bottom:4px; }
.badge-role{ color: var(--accent); font-size:.72rem; letter-spacing:.5px; margin-bottom:20px; }
.badge-divider{ height:1px; background: var(--border); margin-bottom:20px; }
.badge-meta{ display:flex; flex-direction:column; gap:12px; font-size:.75rem; }
.badge-meta li{ display:flex; justify-content:space-between; color: var(--text-muted); }

.about-content p{ color: var(--text-muted); margin-bottom:18px; }
.spec-list{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
  margin: 28px 0 32px;
  padding: 22px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
}
.spec-item{ display:flex; flex-direction:column; gap:4px; }
.spec-key{ font-size:.68rem; color: var(--accent); letter-spacing:.5px; }
.spec-val{ font-size:.9rem; }

/* ===================================================================
   SKILLS
=================================================================== */
.skills-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 40px;
}
.skill-head{
  display:flex; align-items:center; gap:12px;
  margin-bottom:10px;
}
.skill-icon{
  width:30px; height:30px;
  display:flex; align-items:center; justify-content:center;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:6px;
  color: var(--accent);
  font-size:.8rem;
  flex-shrink:0;
}
.skill-name{ flex:1; font-size:.92rem; }
.skill-pct{ color: var(--text-muted); font-size:.78rem; }
.skill-bar{
  height:8px;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:20px;
  overflow:hidden;
}
.skill-fill{
  height:100%;
  width:0%;
  border-radius:20px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ===================================================================
   SERVICES
=================================================================== */
.services-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:22px;
}
.service-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  transition: transform var(--transition), border-color var(--transition);
}
.service-card:hover{
  transform: translateY(-6px);
  border-color: var(--accent);
}
.service-icon{
  width:46px; height:46px;
  display:flex; align-items:center; justify-content:center;
  background: var(--bg);
  border:1px solid var(--border);
  border-radius:8px;
  color: var(--accent);
  font-size:1.1rem;
  margin-bottom:20px;
}
.service-card h3{ font-family: var(--font-display); font-size:1.05rem; margin-bottom:10px; }
.service-card p{ color: var(--text-muted); font-size:.88rem; }

/* ===================================================================
   CERTIFICATIONS
=================================================================== */
.cert-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:20px;
}
.cert-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition), border-color var(--transition);
  display:flex;
  flex-direction:column;
  gap:10px;
  position:relative;
}
.cert-card:hover{ transform: translateY(-6px); border-color: var(--accent); }
.cert-thumb-btn{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio: 4 / 3;
  border:1px solid var(--border);
  border-radius:8px;
  overflow:hidden;
  padding:0;
  background: var(--bg);
  cursor:pointer;
}
.cert-thumb{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
  transition: transform var(--transition);
}
.cert-thumb-overlay{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  gap:8px;
  background: rgba(10,14,20,.75);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size:.72rem;
  opacity:0;
  transition: opacity var(--transition);
}
.cert-thumb-btn:hover .cert-thumb-overlay{ opacity:1; }
.cert-thumb-btn:hover .cert-thumb{ transform: scale(1.05); }
.cert-thumb-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

/* Hover preview: a single viewport-level element, driven by JS (not a nested CSS
   :hover) so the backdrop and fixed positioning stay correct even when the card
   sits inside a container that has a transform. */
.cert-hover-preview{
  position:fixed;
  inset:0;
  background: rgba(6,9,13,.78);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:150;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition: opacity .45s cubic-bezier(.22,1,.36,1), visibility .45s;
}
.cert-hover-preview.show{
  opacity:1;
  visibility:visible;
}
.cert-hover-preview img{
  max-width:min(70vw, 640px);
  max-height:75vh;
  border-radius:10px;
  border:1px solid var(--accent);
  box-shadow: 0 25px 70px rgba(0,0,0,.6);
  transform: scale(.85) translateY(18px);
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.cert-hover-preview.show img{
  transform: scale(1) translateY(0);
}
.cert-date{
  font-size:.65rem;
  color: var(--text-muted);
  letter-spacing:.4px;
}
.cert-card h3{
  font-family: var(--font-display);
  font-size:.98rem;
  line-height:1.35;
}
.cert-issuer{
  font-size:.8rem;
  color: var(--text-muted);
  margin-top:auto;
}

/* Certifications not yet earned / planned */
.cert-card--locked{
  border-style:dashed;
}
.cert-card--locked:hover{
  transform:none;
  border-color: var(--border);
}
.cert-locked-thumb{
  position:relative;
  width:100%;
  aspect-ratio: 4 / 3;
  border:1px dashed var(--border);
  border-radius:8px;
  background: var(--bg);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  overflow:hidden;
}
.cert-locked-thumb::before{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(115deg, transparent 0%, rgba(0,224,184,.10) 45%, rgba(0,224,184,.22) 50%, rgba(0,224,184,.10) 55%, transparent 100%);
  transform: translateX(-120%);
  animation: certShimmer 3.2s ease-in-out infinite;
}
@keyframes certShimmer{
  0%{ transform: translateX(-120%); }
  55%, 100%{ transform: translateX(120%); }
}
.cert-lock-icon{
  position:relative;
  z-index:1;
  font-size:1.5rem;
  color: var(--text-muted);
  animation: certLockPulse 2.6s ease-in-out infinite;
}
@keyframes certLockPulse{
  0%, 100%{ transform: scale(1); color: var(--text-muted); }
  50%{ transform: scale(1.15); color: var(--accent); }
}
.cert-locked-label{
  position:relative;
  z-index:1;
  font-size:.62rem;
  color: var(--text-muted);
  letter-spacing:.6px;
}
.cert-card--locked h3,
.cert-card--locked .cert-issuer,
.cert-card--locked .cert-date{
  color: var(--text-muted);
}

.lightbox{
  position:fixed; inset:0;
  background: rgba(6,9,13,.92);
  backdrop-filter: blur(6px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding: 40px 20px;
  opacity:0; visibility:hidden;
  transition: opacity var(--transition), visibility var(--transition);
  z-index:200;
}
.lightbox.open{ opacity:1; visibility:visible; }
.lightbox-img{
  max-width:min(90vw, 900px);
  max-height:75vh;
  border-radius:8px;
  border:1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-title{ color: var(--accent); font-size:.85rem; letter-spacing:.4px; text-align:center; }
.lightbox-close{
  position:absolute; top:24px; right:24px;
  width:42px; height:42px;
  border-radius:50%;
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size:1.1rem;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: border-color var(--transition), color var(--transition);
}
.lightbox-close:hover{ border-color: var(--accent); color: var(--accent); }

.lightbox-nav{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:48px; height:48px;
  border-radius:50%;
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size:1.1rem;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: border-color var(--transition), color var(--transition);
}
.lightbox-nav:hover{ border-color: var(--accent); color: var(--accent); }
.lightbox-prev{ left:24px; }
.lightbox-next{ right:24px; }
.lightbox-nav.hidden{ display:none; }
.lightbox-counter{
  color: var(--text-muted);
  font-size:.72rem;
  letter-spacing:.4px;
}

/* ===================================================================
   CASE STUDY MODAL
=================================================================== */
.case-study-overlay{
  position:fixed;
  inset:0;
  background: rgba(6,9,13,.85);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 40px 20px;
  z-index:200;
  opacity:0;
  visibility:hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.case-study-overlay.open{ opacity:1; visibility:visible; }

.case-study-panel{
  position:relative;
  width:100%;
  max-width:760px;
  max-height:85vh;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  transform: translateY(18px) scale(.98);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  overflow:hidden;
}
.case-study-overlay.open .case-study-panel{ transform: translateY(0) scale(1); }

.case-study-close{
  position:absolute;
  top:18px; right:18px;
  width:38px; height:38px;
  border-radius:50%;
  border:1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size:1rem;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  z-index:5;
  transition: border-color var(--transition), color var(--transition);
}
.case-study-close:hover{ border-color: var(--accent); color: var(--accent); }

.case-study-scroll{
  max-height:85vh;
  overflow-y:auto;
  padding: 44px 44px 40px;
}

/* Header block */
.cs-eyebrow{
  color: var(--accent);
  font-size:.72rem;
  letter-spacing:.6px;
  margin-bottom:12px;
}
.cs-title{
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight:700;
  margin-bottom:16px;
  padding-right:36px;
}
.cs-tags{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:28px; }
.cs-tags span{
  font-family: var(--font-mono);
  font-size:.68rem;
  padding:4px 10px;
  background: var(--bg);
  border:1px solid var(--border);
  border-radius:20px;
  color: var(--text-muted);
}

/* Photo strip */
.cs-photo-strip{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:8px;
  margin-bottom:32px;
}
.cs-photo-strip button{
  padding:0;
  border:1px solid var(--border);
  border-radius:8px;
  overflow:hidden;
  cursor:pointer;
  aspect-ratio: 4/3;
  background:none;
}
.cs-photo-strip img{
  width:100%; height:100%;
  object-fit:cover;
  transition: transform var(--transition);
}
.cs-photo-strip button:hover img{ transform: scale(1.08); }

/* Body copy */
.cs-body h4{
  font-family: var(--font-display);
  font-size:1rem;
  color: var(--accent);
  margin: 30px 0 12px;
}
.cs-body h4:first-child{ margin-top:0; }
.cs-body p{
  color: var(--text-muted);
  font-size:.95rem;
  line-height:1.75;
  margin-bottom:16px;
}
.cs-pull-quote{
  border-left:2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  font-family: var(--font-display);
  font-size:1.05rem;
  color: var(--text);
  font-weight:500;
  line-height:1.5;
}

/* Team credit footer inside modal */
.cs-team{
  margin-top:32px;
  padding-top:24px;
  border-top:1px solid var(--border);
}
.cs-team-label{
  font-size:.68rem;
  color: var(--accent);
  letter-spacing:.5px;
  margin-bottom:12px;
}
.cs-team-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.cs-team-list span{
  font-family: var(--font-mono);
  font-size:.75rem;
  padding:6px 12px;
  background: var(--bg);
  border:1px solid var(--border);
  border-radius:20px;
  color: var(--text-muted);
}

@media (max-width: 600px){
  .case-study-scroll{ padding: 36px 22px 28px; }
  .cs-photo-strip{ grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================================
   PROJECTS
=================================================================== */
.projects-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}
.project-card{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:18px;
  transition: transform var(--transition), border-color var(--transition);
}
.project-card:hover{ transform: translateY(-6px); border-color: var(--accent-2); }
.project-top{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:12px;
}
.project-id{ color: var(--text-muted); font-size:.7rem; }
.project-tag{
  font-size:.65rem;
  padding: 4px 10px;
  border-radius:20px;
  letter-spacing:.5px;
}
.tag-deployed{ background: rgba(0,224,184,.12); color: var(--accent); }
.tag-progress{ background: rgba(255,182,72,.12); color: var(--warn); }
.tag-archived{ background: rgba(124,138,154,.15); color: var(--text-muted); }
.project-gallery-btn{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio: 16 / 7;
  border:1px solid var(--border);
  border-radius:8px;
  overflow:hidden;
  padding:0;
  margin-bottom:12px;
  background: var(--bg);
  cursor:pointer;
}
.project-gallery-thumb{
  width:100%; height:100%;
  object-fit:cover;
  display:block;
  transition: transform var(--transition);
}
.project-gallery-btn:hover .project-gallery-thumb{ transform: scale(1.05); }
.project-gallery-count{
  position:absolute;
  bottom:8px; right:8px;
  display:flex; align-items:center; gap:6px;
  padding: 4px 10px;
  background: rgba(6,9,13,.8);
  border:1px solid var(--border);
  border-radius:20px;
  color: var(--accent);
  font-size:.65rem;
}
.project-gallery-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

.project-card h3{ font-family: var(--font-display); font-size:.98rem; margin-bottom:6px; line-height:1.3; }
.project-card p{
  color: var(--text-muted);
  font-size:.82rem;
  line-height:1.5;
  margin-bottom:12px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.project-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.project-tags span{
  font-family: var(--font-mono);
  font-size:.65rem;
  padding:3px 8px;
  background: var(--bg);
  border:1px solid var(--border);
  border-radius:5px;
  color: var(--text-muted);
}

.case-study-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding:0;
  background:none;
  border:none;
  color: var(--accent);
  font-size:.75rem;
  letter-spacing:.3px;
  cursor:pointer;
  transition: gap var(--transition);
}
.case-study-btn:hover{ gap:12px; }
.case-study-btn i{ font-size:.68rem; }

/* ===================================================================
   CONTACT
=================================================================== */
.contact-grid{
  display:grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  margin-top:40px;
}
.contact-lead{ color: var(--text-muted); margin-bottom:32px; }
.contact-list{ display:flex; flex-direction:column; gap:20px; margin-bottom:36px; }
.contact-list li{ display:flex; align-items:center; gap:14px; font-size:.85rem; }
.contact-list i{
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  color: var(--accent);
}
.contact-list span{ color: var(--text-muted); min-width:56px; }
.contact-list a:hover{ color: var(--accent); }

.social-row{ display:flex; gap:12px; }
.social-row a{
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.social-row a:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

.contact-form{
  background: var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-heading{ color: var(--accent-2); font-size:.85rem; margin-bottom:16px; }
.form-group{ margin-bottom:18px; padding-left:16px; }
.form-group label{
  display:block;
  font-size:.75rem;
  color: var(--text-muted);
  margin-bottom:6px;
}
.form-group input, .form-group textarea{
  width:100%;
  background: var(--bg);
  border:1px solid var(--border);
  border-radius:6px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size:.85rem;
  resize:vertical;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus{
  outline:none;
  border-color: var(--accent);
}
.form-response{
  margin-top:16px;
  font-size:.8rem;
  min-height:1.2em;
  color: var(--accent);
}

/* ===================================================================
   FIBER SERVICE LOOP (visual interlude)
=================================================================== */
.fiber-loop-section{
  position:relative;
  padding: 50px 0 60px;
  overflow:hidden;
  z-index:1;
}
.fiber-loop-inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
}
.fiber-coil{
  width:100%;
  max-width:300px;
}
.fiber-coil-svg{
  width:100%;
  height:auto;
  display:block;
  overflow:visible;
}
.fiber-loop-caption{
  max-width:520px;
  text-align:center;
  color: var(--text-muted);
  font-size:.72rem;
  line-height:1.7;
  letter-spacing:.2px;
}

.coil-ambient{
  fill: var(--accent);
  opacity:.06;
}

.coil-cable-group{
  opacity: 1;
}

.coil-casing{
  stroke:#15171a;
  stroke-width:10.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:1000;
  stroke-dashoffset:1000;
  transition: stroke-dashoffset 2.2s cubic-bezier(.22,1,.36,1);
}
.coil-jacket{
  stroke:#b9bdc3;
  stroke-width:8.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-dasharray:1000;
  stroke-dashoffset:1000;
  transition: stroke-dashoffset 2.2s cubic-bezier(.22,1,.36,1) .1s;
}
.coil-highlight{
  stroke:#eef0f2;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.42;
  stroke-dasharray:1000;
  stroke-dashoffset:1000;
  transition: stroke-dashoffset 2.2s cubic-bezier(.22,1,.36,1) .15s;
  mix-blend-mode: screen;
}
.coil-core{
  stroke: var(--accent);
  stroke-width:1.3;
  stroke-linecap:round;
  stroke-dasharray:1000;
  stroke-dashoffset:1000;
  opacity:.6;
  filter:url(#fiberGlow);
  transition: stroke-dashoffset 1.9s cubic-bezier(.22,1,.36,1) .4s;
}

.fiber-coil.in-view .coil-casing,
.fiber-coil.in-view .coil-jacket,
.fiber-coil.in-view .coil-highlight,
.fiber-coil.in-view .coil-core{
  stroke-dashoffset:0;
}

/* RJ45 plug — fades and settles in once the cable finishes drawing */
.rj45-plug{
  opacity:0;
  transform-box: fill-box;
  transform-origin: 0px 0px;
  transition: opacity .5s ease 2.05s;
}
.fiber-coil.in-view .rj45-plug{ opacity:1; }

.rj45-boot{ fill:#b9bdc3; }
.rj45-body{ fill:#e3e9ec; fill-opacity:.92; stroke:#8f9aa3; stroke-width:.5; }
.rj45-sheen{ fill:#ffffff; fill-opacity:.4; }
.rj45-tab{ fill:#c3c8cd; }
.rj45-pin{ fill:#ecd08a; stroke:#8a6d2e; stroke-width:.15; }

.coil-end-glow,
.coil-end-dot,
.coil-pulse{
  opacity:0;
  transition: opacity .7s ease 2.1s;
}
.fiber-coil.in-view .coil-end-glow,
.fiber-coil.in-view .coil-end-dot,
.fiber-coil.in-view .coil-pulse{
  opacity:1;
}

.coil-end-glow{
  fill:url(#fiberEndGlow);
  transform-box: fill-box;
  transform-origin:center;
  animation: coilEndPulse 2.6s ease-in-out infinite;
  animation-delay:2.1s;
}
.fiber-end-glow-stop-a{ stop-color: var(--accent); stop-opacity:.55; }
.fiber-end-glow-stop-b{ stop-color: var(--accent); stop-opacity:0; }

.coil-end-dot{
  fill:#eafff5;
  filter:url(#fiberGlow);
}

.coil-pulse{
  fill:#eafff5;
  opacity:.9;
  filter:url(#fiberGlow);
}

@keyframes coilEndPulse{
  0%,100%{ transform: scale(1); opacity:.55; }
  50%{ transform: scale(1.3); opacity:.2; }
}

@media (max-width:600px){
  .fiber-loop-section{ padding: 36px 0 44px; }
  .fiber-coil{ max-width:230px; }
  .fiber-loop-caption{ font-size:.68rem; padding:0 12px; }
}

@media (prefers-reduced-motion: reduce){
  .coil-casing, .coil-jacket, .coil-highlight, .coil-core{ transition-duration:.01ms; }
  .coil-end-glow{ animation:none; opacity:.7; }
}
/* ===================================================================
   FOOTER
=================================================================== */
.footer{
  border-top:1px solid var(--border);
  padding: 40px 0 24px;
  position:relative; z-index:1;
}
.footer-inner{
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:24px;
  margin-bottom:24px;
}
.footer-nav{ display:flex; gap:22px; flex-wrap:wrap; }
.footer-nav a{ color: var(--text-muted); font-size:.85rem; }
.footer-nav a:hover{ color: var(--accent); }
.footer-copy{
  text-align:center;
  color: var(--text-muted);
  font-size:.72rem;
  letter-spacing:.3px;
}

/* ===================================================================
   BACK TO TOP
=================================================================== */
.back-to-top{
  position:fixed; bottom:28px; right:28px;
  width:44px; height:44px;
  border-radius:50%;
  background: var(--accent);
  color:#04140f;
  border:none;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  opacity:0; visibility:hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index:90;
}
.back-to-top.show{ opacity:1; visibility:visible; transform: translateY(0); }

/* ===================================================================
   RESPONSIVE
=================================================================== */
@media (max-width: 980px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .projects-grid{ grid-template-columns: repeat(2, 1fr); }
  .cert-grid{ grid-template-columns: repeat(2, 1fr); }
  .about-grid{ grid-template-columns: 1fr; }
  .badge-card{ max-width:320px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  .lightbox-nav{ width:38px; height:38px; font-size:.9rem; }
  .lightbox-prev{ left:10px; }
  .lightbox-next{ right:10px; }
  .menu-toggle{ display:flex; }
  .navlist{
    position:fixed;
    top:70px; left:0; right:0;
    background: var(--bg-alt);
    border-bottom:1px solid var(--border);
    flex-direction:column;
    align-items:flex-start;
    padding: 24px;
    gap:18px;
    transform: translateY(-130%);
    transition: transform var(--transition);
    z-index:99;
  }
  .navlist.open{ transform: translateY(0); }
  .status-pill{ display:none; }
  .services-grid{ grid-template-columns: 1fr; }
  .projects-grid{ grid-template-columns: 1fr; }
  .cert-grid{ grid-template-columns: 1fr; }
  .hero-stats{ gap:28px; }
  .header-right .btn-sm{ display:none; }
}

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