/* ======= INTRO OVERLAY ======= */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro-overlay.dismissed {
  opacity: 0;
  transform: translateY(-24px);
  pointer-events: none;
}

.intro-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 50%,
    rgba(59, 130, 246, 0.10) 0%,
    rgba(34, 211, 238, 0.04) 50%,
    transparent 100%);
  pointer-events: none;
}

.intro-content {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  animation: fade-up 0.9s 0.15s both;
}

.intro-pre {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue2);
}

.intro-title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.intro-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.intro-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
  padding: 0.8rem 2.2rem;
  background: var(--blue1);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

.intro-enter:hover {
  background: var(--blue2);
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(59, 130, 246, 0.35);
}

.intro-enter:active {
  transform: translateY(0);
}

.intro-silent {
  position: absolute;
  bottom: 2.25rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  animation: fade-in 1.2s 1s both;
}

.intro-silent:hover {
  color: var(--text-muted);
}

/* Pause hero entrance animations while intro is showing */
.preload .hero-pre,
.preload .hero-title,
.preload .hero-sub,
.preload .hero-cta,
.preload .scroll-indicator {
  animation-play-state: paused;
}

/* ======= PARTICLE CANVAS & CURSOR GLOW ======= */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  opacity: 0;
  will-change: transform;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* ======= CSS RESET & BASE ======= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #060d1a;
  --bg2:         #0a1628;
  --bg3:         #0d1f3c;
  --surface:     rgba(13, 31, 60, 0.6);
  --surface2:    rgba(16, 38, 74, 0.8);
  --border:      rgba(59, 130, 246, 0.15);
  --border-h:    rgba(59, 130, 246, 0.4);

  --blue1:       #3b82f6;
  --blue2:       #60a5fa;
  --blue3:       #93c5fd;
  --teal:        #22d3ee;
  --indigo:      #818cf8;

  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --text-dim:    #475569;

  --radius:      14px;
  --radius-sm:   8px;
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ======= TOPBAR ======= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(6, 13, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.topbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(6, 13, 26, 0.92);
}

.topbar-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.topbar-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--blue2);
  margin-right: auto;
  cursor: pointer;
  transition: opacity var(--transition);
}
.topbar-logo:hover { opacity: 0.75; }

.topbar-links {
  display: flex;
  gap: 2.5rem;
}

.topbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.topbar-links a:hover {
  color: var(--text);
}

.sound-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem 0.35rem 0.6rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.sound-toggle:hover {
  color: var(--blue2);
  border-color: var(--border-h);
  background: rgba(59, 130, 246, 0.08);
}

.sound-toggle.active {
  color: var(--blue2);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
}

/* ======= HERO ======= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 2rem 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: orb-drift 14s ease-in-out infinite alternate;
}

.orb1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -150px;
  left: -100px;
  animation-duration: 16s;
}

.orb2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
  bottom: -100px;
  right: -80px;
  animation-duration: 20s;
  animation-delay: -6s;
  opacity: 0.12;
}

.orb3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #818cf8 0%, transparent 70%);
  top: 40%;
  left: 55%;
  animation-duration: 18s;
  animation-delay: -3s;
  opacity: 0.10;
}

@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, 20px) scale(1.05); }
  100% { transform: translate(-20px, 40px) scale(0.95); }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-pre {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue2);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fade-up 0.8s 0.2s forwards;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fade-up 0.8s 0.4s forwards;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fade-up 0.8s 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s 0.8s forwards;
}

.btn-primary {
  padding: 0.75rem 1.75rem;
  background: var(--blue1);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 0 0 rgba(59,130,246,0.4);
}

.btn-primary:hover {
  background: var(--blue2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.3);
}

.btn-ghost {
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-h);
  background: rgba(59,130,246,0.06);
  transform: translateY(-2px);
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue2) 0%, var(--teal) 50%, var(--indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fade-in 1s 1.4s forwards;
}

.scroll-indicator span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--blue1), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* ======= SECTIONS ======= */
.section {
  padding: 100px 2rem;
  position: relative;
  z-index: 2;
}

.section:nth-child(even) {
  background: var(--bg2);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue2);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 3rem;
}

/* ======= CARDS (glass morphism) ======= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-h);
  box-shadow: 0 8px 40px rgba(59, 130, 246, 0.08);
}

/* ======= ABOUT ======= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile card (replaces about-text) */
.about-profile {
  padding: 2rem;
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .about-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.profile-photo-wrap {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-h);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
  background: var(--bg3);
  position: relative;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue2);
  background: var(--bg3);
}

.profile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-body p {
  line-height: 1.8;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.btn-skills {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.55rem 1.25rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--blue2);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn-skills:hover {
  background: rgba(59,130,246,0.16);
  border-color: var(--border-h);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .btn-skills {
    align-self: center;
  }
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  height: 100%;
}

.stat-card {
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue2), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ======= SKILLS ======= */
.skills-card {
  padding: 2.5rem 2rem;
}

.skills-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue2);
  margin-bottom: 1.75rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
}

.skill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.skill-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.skill-level {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.skill-level.intermediate {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue2);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.skill-level.beginner {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.skill-track {
  height: 7px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue1), var(--teal));
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======= TOOLS (inside skills card) ======= */
.skills-divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.tool-chip {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
}

.tool-chip:hover {
  border-color: var(--border-h);
}

.tool-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.vscode-icon {
  background: rgba(0, 120, 212, 0.15);
  color: #4fc3f7;
}

.claude-icon {
  background: rgba(208, 147, 73, 0.12);
  color: #d4956a;
}

.github-tool-icon {
  background: rgba(110, 118, 129, 0.15);
  color: #adbac7;
}

.cloudflare-icon {
  background: rgba(243, 128, 32, 0.12);
  color: #f38020;
}

.kali-icon {
  background: rgba(55, 126, 240, 0.12);
  color: #5b9cf6;
}

.notion-icon {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.tool-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tool-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.tool-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ======= CERTIFICATIONS ======= */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  position: relative;
}

.cert-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cert-icon-empty {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-dim);
}

.cert-icon-progress {
  background: rgba(34, 211, 238, 0.1);
  color: var(--teal);
}

.cert-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.cert-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.cert-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.cert-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--teal);
  border: 1px solid rgba(34, 211, 238, 0.25);
  white-space: nowrap;
}

.cert-progress {
  border-color: rgba(34, 211, 238, 0.18);
}

/* ======= LINKS ======= */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  cursor: pointer;
}

.link-card:hover {
  transform: translateY(-3px);
}

.link-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.facebook-icon {
  background: rgba(24, 119, 242, 0.15);
  color: #4e9af1;
}

.linkedin-icon {
  background: rgba(10, 102, 194, 0.15);
  color: #5aa4d6;
}

.github-icon {
  background: rgba(110, 118, 129, 0.15);
  color: #adbac7;
}

.htb-icon {
  background: rgba(159, 239, 0, 0.08);
  color: #9feb00;
}

.email-icon {
  background: rgba(34, 211, 238, 0.1);
  color: #22d3ee;
}

.link-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.link-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.link-handle {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.link-arrow {
  color: var(--text-dim);
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.link-card:hover .link-arrow {
  color: var(--blue2);
  transform: translate(3px, -3px);
}

/* ======= FOOTER ======= */
.footer {
  padding: 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  position: relative;
  z-index: 2;
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-contact {
  color: var(--blue2);
  font-size: 0.82rem;
  transition: color var(--transition);
}

.footer-contact:hover {
  color: var(--teal);
}

/* ======= SCROLL REVEAL ======= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======= KEYFRAMES ======= */
@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes fade-in {
  to   { opacity: 1; }
  from { opacity: 0; }
}

/* ======= ACCESSIBILITY WIDGET ======= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--blue1);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.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;
}
.reading-ruler {
  position: fixed;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(96, 165, 250, 0.07);
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  border-bottom: 1px solid rgba(96, 165, 250, 0.18);
  pointer-events: none;
  z-index: 9990;
  display: none;
  transform: translateY(-50%);
}
body.a11y-reading-ruler .reading-ruler { display: block; }
.a11y-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 500;
}
.a11y-trigger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.a11y-trigger:hover,
.a11y-trigger[aria-expanded="true"] {
  color: var(--blue2);
  border-color: var(--border-h);
  background: rgba(59,130,246,0.1);
  transform: scale(1.08);
}
.a11y-panel {
  position: absolute;
  bottom: calc(100% + 0.65rem);
  right: 0;
  background: rgba(8, 18, 38, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 290px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.55);
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.a11y-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.a11y-panel-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue2);
}
.a11y-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  font-family: inherit;
  transition: color var(--transition);
}
.a11y-close:hover { color: var(--text); }
.a11y-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem 0 0.75rem;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(59,130,246,0.3) transparent;
}
.a11y-scroll::-webkit-scrollbar { width: 4px; }
.a11y-scroll::-webkit-scrollbar-track { background: transparent; }
.a11y-scroll::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.3); border-radius: 2px; }
.a11y-section { padding: 0.6rem 0 0.25rem; }
.a11y-section + .a11y-section { border-top: 1px solid rgba(255,255,255,0.05); }
.a11y-section-label {
  display: block;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue2);
  padding: 0.25rem 1.25rem 0.5rem;
  opacity: 0.8;
}
.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1.25rem;
  gap: 0.75rem;
  min-height: 38px;
}
.a11y-toggle-row { cursor: pointer; }
.a11y-toggle-row:hover .a11y-row-label { color: var(--text); }
.a11y-row-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.a11y-tag {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--blue2);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.04em;
}
.a11y-toggle { position: relative; flex-shrink: 0; }
.a11y-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.a11y-knob {
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.a11y-knob::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.2s, background 0.2s;
}
.a11y-toggle input:checked + .a11y-knob { background: rgba(59,130,246,0.25); border-color: var(--blue1); }
.a11y-toggle input:checked + .a11y-knob::after { transform: translateX(16px); background: var(--blue2); }
.a11y-toggle input:focus-visible + .a11y-knob { outline: 2px solid var(--blue2); outline-offset: 2px; }
.a11y-size-btns { display: flex; gap: 0.3rem; }
.a11y-size-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  min-width: 32px;
  text-align: center;
}
.a11y-size-btn:hover,
.a11y-size-btn.active {
  color: var(--blue2);
  border-color: var(--border-h);
  background: rgba(59,130,246,0.1);
}
.a11y-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  max-width: 130px;
}
.a11y-select:focus { border-color: var(--border-h); }
.a11y-select option { background: #0a1628; }
.a11y-reset {
  display: block;
  width: calc(100% - 2.5rem);
  margin: 0.75rem 1.25rem 0;
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.a11y-reset:hover { color: var(--text-muted); border-color: var(--border-h); }
/* ======= ACCESSIBILITY CLASSES ======= */
/* Text size — applied to html so rem units cascade */
html.a11y-text-large  { font-size: 18px; }
html.a11y-text-larger { font-size: 20px; }
/* High contrast */
body.a11y-high-contrast {
  --bg:         #000;
  --bg2:        #0a0a0a;
  --bg3:        #111;
  --surface:    rgba(0,0,0,0.9);
  --surface2:   rgba(10,10,10,0.95);
  --border:     rgba(255,255,255,0.3);
  --border-h:   rgba(255,255,255,0.7);
  --text:       #fff;
  --text-muted: #ddd;
  --text-dim:   #aaa;
  --blue1:      #4d9fff;
  --blue2:      #80bfff;
  --teal:       #00e5ff;
}
body.a11y-high-contrast .card { background: #0d0d0d; border-color: rgba(255,255,255,0.25); }
body.a11y-high-contrast .skill-track { background: rgba(255,255,255,0.15); }
/* Reduce motion */
body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
body.a11y-reduce-motion #particleCanvas,
body.a11y-reduce-motion .orb,
body.a11y-reduce-motion .cursor-glow { display: none; }
/* Dyslexia font — OpenDyslexic, loaded lazily by JS */
body.a11y-dyslexia,
body.a11y-dyslexia * {
  font-family: 'OpenDyslexic', sans-serif !important;
  letter-spacing: 0.07em;
  word-spacing: 0.16em;
}
/* Enhanced focus indicators */
body.a11y-focus *:focus,
body.a11y-focus *:focus-visible {
  outline: 3px solid #facc15 !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}
/* Line spacing */
body.a11y-line-spacing p,
body.a11y-line-spacing li,
body.a11y-line-spacing .profile-body p { line-height: 2.2 !important; }
/* Letter spacing */
body.a11y-letter-spacing p,
body.a11y-letter-spacing li,
body.a11y-letter-spacing .profile-body p { letter-spacing: 0.06em !important; }
/* Highlight links */
body.a11y-highlight-links a {
  text-decoration: underline !important;
  text-decoration-color: var(--teal) !important;
  text-underline-offset: 3px;
}
body.a11y-highlight-links .link-card,
body.a11y-highlight-links .btn-primary,
body.a11y-highlight-links .btn-ghost,
body.a11y-highlight-links .btn-skills { outline: 1px solid var(--teal); }
/* Grayscale & invert — managed via JS filter on <html>, no body class needed */
/* Global keyboard focus style (subtle, always-on baseline) */
:focus-visible {
  outline: 2px solid rgba(59,130,246,0.6);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (pointer: coarse) { .cursor-glow { display: none; } }

/* ======= RESPONSIVE ======= */
/* --- Tablet (≤ 768px) --- */
@media (max-width: 768px) {
  .section {
    padding: 70px 1.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(4, 1fr);
    height: auto;
  }

  .skills-card {
    padding: 1.75rem 1.25rem;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile (≤ 540px) --- */
@media (max-width: 540px) {
  :root {
    --radius: 12px;
  }

  .topbar {
    padding: 0 1rem;
    height: 54px;
  }

  .topbar-links {
    display: none;
  }

  .sound-label {
    display: none;
  }

  .sound-toggle {
    padding: 0.35rem 0.55rem;
  }

  .hero {
    padding: 80px 1.25rem 50px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .about-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  .profile-photo-wrap {
    width: 90px;
    height: 90px;
  }

  .profile-body {
    align-items: center;
  }

  .btn-skills {
    align-self: center;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 1.25rem 0.75rem;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .skill-bar {
    /* Disable transition on mobile — trigger immediately on scroll */
    transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
  }
}

/* Prevent cursor glow rendering on touch */
@media (pointer: coarse) {
  .cursor-glow {
    display: none;
  }
}
