/* ============================================================
   Abobakr Ayman — Cyber-SOC Command Center Portfolio
   Dark Cyber Aesthetic · HUD Elements · 3D Motion
   ============================================================ */

:root {
  --bg: #03050c;
  --bg-elevated: #080d1c;
  --surface: rgba(10, 16, 32, 0.72);
  --line: rgba(34, 211, 238, 0.22);
  --text: #f0f6ff;
  --muted: #8b9dc3;
  --cyan: #00f5d4;
  --sky: #38bdf8;
  --emerald: #10b981;
  --purple: #8b5cf6;
  --grad: linear-gradient(135deg, #00f5d4 0%, #38bdf8 48%, #8b5cf6 100%);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  --radius: 20px;
  --header: 76px;
  --font: "Outfit", "Cairo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #edf2fc;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.85);
  --line: rgba(14, 165, 233, 0.3);
  --text: #091124;
  --muted: #475569;
  --cyan: #0284c7;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* Custom Cyber Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--purple));
  border-radius: 99px;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

/* ---------- Cyber Background Layers ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cyber-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 245, 212, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 245, 212, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, black 35%, transparent 85%);
  animation: gridPulse 8s ease-in-out infinite alternate;
}

@keyframes gridPulse {
  0% { opacity: 0.45; }
  100% { opacity: 0.9; }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 245, 212, 0.018) 4px
  );
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  box-shadow: 0 0 14px var(--cyan);
  z-index: 999;
  transition: width 0.1s linear;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 3.2rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.14em;
  margin-bottom: 0.4rem;
  opacity: 0.85;
}

.section-head h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.underline {
  display: block;
  width: 140px;
  height: 4px;
  margin: 0 auto;
  border-radius: 99px;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.6);
  position: relative;
  overflow: hidden;
}

.underline::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: #fff;
  opacity: 0.7;
  animation: laserScan 2.5s infinite linear;
}

@keyframes laserScan {
  100% { left: 200%; }
}

.underline-short {
  width: 88px;
}

/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Cyber Card & Mouse Spotlight ---------- */
.cyber-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease;
}

.cyber-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 245, 212, 0.14),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.cyber-card:hover::before {
  opacity: 1;
}

.cyber-card:hover {
  border-color: rgba(0, 245, 212, 0.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 245, 212, 0.15);
}

.cyber-card > * {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(1280px, calc(100% - 1.5rem));
  margin: 0 auto;
  min-height: var(--header);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.logo-bracket {
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan);
}

.logo-slash {
  color: var(--purple);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 0.2rem 1.15rem;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 0.4rem 0.2rem;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--grad);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.3s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--cyan);
}

.nav a:hover::after,
.nav a.is-active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--cyan);
  display: grid;
  place-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(0, 245, 212, 0.35);
}

.icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 12px;
  padding: 0.78rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-cv,
.btn-primary {
  background: var(--grad);
  color: #030712;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(0, 245, 212, 0.35);
}

.btn-primary:hover,
.btn-cv:hover {
  box-shadow: 0 0 32px rgba(0, 245, 212, 0.6);
}

.btn-outline {
  background: rgba(0, 245, 212, 0.05);
  color: var(--cyan);
  border-color: var(--cyan);
}

.btn-outline:hover {
  background: rgba(0, 245, 212, 0.14);
  box-shadow: 0 0 22px rgba(0, 245, 212, 0.3);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 11px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--cyan);
  margin: 5px 0;
  transition: 0.25s ease;
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: calc(100vh - var(--header));
  display: grid;
  align-items: center;
  padding-top: 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.soc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-bottom: 1.2rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseRadar 1.8s infinite;
}

@keyframes pulseRadar {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.mono-text {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--emerald);
  letter-spacing: 0.06em;
}

.hero-intro {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 1.05rem;
}

.terminal-prompt {
  color: var(--cyan);
  font-weight: 700;
}

.hero-name {
  margin: 0;
  font-size: clamp(3rem, 6.5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  position: relative;
}

.hero-name span {
  display: block;
}

/* Subtle Cyber Glitch on Hover */
.glitch-wrap:hover {
  animation: glitchSkew 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes glitchSkew {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); text-shadow: 2px 0 var(--cyan), -2px 0 var(--purple); }
  40% { transform: translate(3px, -2px); text-shadow: -2px 0 var(--cyan), 2px 0 var(--purple); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); text-shadow: none; }
}

.hero-role {
  margin: 1.2rem 0;
  font-family: var(--mono);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-prefix {
  color: var(--purple);
  font-weight: 700;
}

.role-swap {
  display: inline-block;
  color: var(--cyan);
  font-weight: 700;
  border-right: 2px solid var(--cyan);
  padding-right: 6px;
  animation: blink 0.85s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.hero-bio {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0 1.6rem;
}

.social-row {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--cyan);
  transition: 0.3s ease;
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

.social-btn:hover {
  transform: translateY(-4px) scale(1.06);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.45);
}

/* ---------- Hero Visual & SOC Radar ---------- */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
}

.radar-sweep {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(0, 245, 212, 0.25) 0deg,
    rgba(0, 245, 212, 0.05) 45deg,
    transparent 90deg
  );
  animation: spin 6s linear infinite;
  pointer-events: none;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(0, 245, 212, 0.35);
  animation: spin 26s linear infinite;
}

.orbit-1 {
  width: 410px;
  height: 410px;
}

.orbit-2 {
  width: 490px;
  height: 490px;
  border-style: dotted;
  border-color: rgba(139, 92, 246, 0.4);
  animation-duration: 38s;
  animation-direction: reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hud-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: rgba(5, 10, 24, 0.85);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.25);
  z-index: 3;
}

.hud-top {
  top: 12%;
  right: 6%;
  animation: float 4s ease-in-out infinite;
}

.hud-bottom {
  bottom: 12%;
  left: 4%;
  border-color: var(--purple);
  color: #c4b5fd;
  animation: float 5s ease-in-out infinite reverse;
}

.portrait-frame {
  position: relative;
  width: min(350px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 6px;
  background: var(--grad);
  box-shadow: 0 0 45px rgba(0, 245, 212, 0.3), 0 0 80px rgba(139, 92, 246, 0.25);
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}

@keyframes float {
  50% { transform: translateY(-12px); }
}

.portrait-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #0a1428;
}

.portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---------- About & Terminal Window ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.2rem;
  align-items: center;
}

.photo-card {
  padding: 12px;
}

.photo-card img {
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.terminal-window {
  padding: 0;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.1rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--line);
}

.terminal-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.terminal-body {
  padding: 1.5rem 1.6rem;
}

.terminal-body p {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 1rem;
}

.terminal-body p:last-child {
  margin-bottom: 0;
}

.terminal-body strong {
  color: var(--cyan);
}

.stats-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.stat-card {
  padding: 1.4rem 1rem;
  text-align: center;
}

.stat-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.25);
}

.stat-icon svg {
  width: 26px;
  height: 26px;
}

.stat-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.stat-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Education ---------- */
.edu-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

.badge {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--grad);
  color: #030712;
  font-weight: 800;
}

.edu-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid var(--line);
  color: var(--cyan);
}

.edu-icon svg {
  width: 34px;
  height: 34px;
}

.edu-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem;
}

.edu-grade {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fbbf24;
  font-weight: 700;
  margin: 0.4rem 0 0.8rem;
}

.edu-grade svg {
  width: 18px;
  height: 18px;
}

/* ---------- Experience Timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 1.3rem;
  padding-left: 2.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--purple));
  box-shadow: 0 0 14px var(--cyan);
}

.timeline-card {
  padding: 1.4rem 1.5rem;
  overflow: visible;
}

.timeline-card::after {
  content: "";
  position: absolute;
  left: calc(-2.2rem + 1px);
  top: 1.6rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 245, 212, 0.2), 0 0 18px var(--cyan);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.timeline-header h3 {
  margin: 0;
  font-size: 1.18rem;
}

.timeline-header time {
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.1);
  margin-bottom: 0.7rem;
}

.timeline-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.96rem;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.3rem;
}

.skill-card {
  padding: 1.5rem;
}

.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.2rem;
  font-size: 1.15rem;
}

.skill-card h3 svg {
  width: 22px;
  height: 22px;
  color: var(--cyan);
}

.skill {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.8rem;
  margin-bottom: 0.95rem;
}

.skill span {
  color: var(--text);
  font-size: 0.92rem;
}

.skill b {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--cyan);
}

.bar {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

[data-theme="light"] .bar {
  background: rgba(15, 23, 42, 0.1);
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.6);
  transition: width 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.4rem;
}

.project-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #02040a;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rec-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(3, 5, 12, 0.82);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  pointer-events: none;
}

.project-body {
  padding: 1.35rem;
}

.project-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.project-body p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.tags span {
  font-family: var(--mono);
  font-size: 0.73rem;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.25);
  color: var(--cyan);
}

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sky);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.25s ease;
}

.gh-link:hover {
  color: var(--cyan);
}

.gh-link svg {
  width: 18px;
  height: 18px;
}

/* ---------- Testimonials ---------- */
.carousel {
  max-width: 740px;
  margin: 0 auto;
}

.quote-card {
  display: none;
  padding: 2.1rem 1.8rem;
  text-align: center;
}

.quote-card.is-active {
  display: block;
  animation: fadeSlide 0.55s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
}

.stars {
  color: #fbbf24;
  letter-spacing: 0.2em;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
  margin-bottom: 0.85rem;
}

.quote-card p {
  font-style: italic;
  font-size: 1.08rem;
}

.quote-card footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.quote-card footer span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: #030712;
  font-weight: 800;
  font-family: var(--mono);
}

.dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 245, 212, 0.25);
  padding: 0;
  transition: 0.3s ease;
}

.dots button.is-active {
  width: 26px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

/* ---------- Certificates Gallery ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.service-card {
  padding: 0.65rem;
  cursor: zoom-in;
}

.cert-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #060b18;
}

.cert-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.service-card:hover .cert-img-wrap img {
  transform: scale(1.07);
}

/* Certificate Lightbox Modal */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(3, 5, 12, 0.92);
  backdrop-filter: blur(12px);
  display: none;
  place-items: center;
  padding: 2rem;
}

.cert-modal.is-open {
  display: grid;
}

.cert-modal img {
  max-height: 86vh;
  max-width: 90vw;
  border-radius: 14px;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 40px rgba(0, 245, 212, 0.35);
}

.cert-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 2.6rem;
  line-height: 1;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}

.contact-card {
  text-align: center;
  padding: 2.3rem 1.5rem;
}

.contact-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.25);
}

.contact-icon svg {
  width: 30px;
  height: 30px;
}

.contact-card p {
  color: var(--muted);
  margin: 0.3rem 0 1.2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 3rem 1rem 1.8rem;
  border-top: 1px solid var(--line);
}

.slogan {
  font-style: italic;
  color: var(--muted);
  margin: 0.8rem 0 1.2rem;
}

.site-footer .social-row {
  justify-content: center;
}

.copy {
  margin: 1.5rem 0 0;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    flex-direction: column;
    padding: 1.2rem 1.5rem 1.6rem;
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open { display: flex; }
  .nav-toggle { display: inline-block; }
  .header-inner { grid-template-columns: auto 1fr; }
  .header-actions { justify-self: end; }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual {
    order: -1;
    min-height: 340px;
  }

  .orbit-1, .radar-sweep { width: 310px; height: 310px; }
  .orbit-2 { width: 370px; height: 370px; }
}

@media (max-width: 640px) {
  .section { padding: 4.2rem 0; }
  .stats-grid, .services-grid { grid-template-columns: 1fr; }
  .btn-cv span { display: none; }
  .portrait-frame { width: min(260px, 76vw); }
  .hud-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .role-swap, .orbit, .radar-sweep, .portrait-frame {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}