/* ══════════════════════════════════════
   POLAS HOSSAIN PORTFOLIO — STYLESHEET
   style.css
══════════════════════════════════════ */

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

/* ═══════════════════════════
   DARK THEME (default)
═══════════════════════════ */
:root {
  --bg: #020508;
  --bg2: #040a12;
  --surface: #070e1c;
  --surface2: #0b1525;
  --cyan: #00d4ff;
  --green: #00ff88;
  --blue: #1a8fff;
  --purple: #8b5cf6;
  --cyan-dim: rgba(0, 212, 255, .1);
  --cyan-glow: rgba(0, 212, 255, .22);
  --text: #f0f6ff;
  --muted: #8aa1c2;
  --border: rgba(0, 212, 255, .13);
  --nav-bg: rgba(2, 5, 8, .94);
  --scanline: rgba(0, 212, 255, .007);
}

/* ═══════════════════════════
   LIGHT THEME
═══════════════════════════ */
[data-theme="light"] {
  --bg: #f0f6ff;
  --bg2: #e2eeff;
  --surface: #ffffff;
  --surface2: #eaf2ff;
  --cyan: #0088bb;
  --green: #00995e;
  --blue: #1055bb;
  --purple: #6d28d9;
  --cyan-dim: rgba(0, 130, 190, .15);
  --cyan-glow: rgba(0, 130, 190, .35);
  --text: #0d1b35;
  --muted: #4a6080;
  --border: rgba(0, 120, 180, .2);
  --nav-bg: rgba(240, 246, 255, .96);
  --scanline: rgba(0, 80, 150, .003);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  transition: background .35s, color .35s;
}



/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyan), var(--green));
}

/* ── GLOBAL SCANLINES ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px,
      var(--scanline) 3px, var(--scanline) 4px);
}



/* ══════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════ */
.theme-toggle {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--cyan);

  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color .3s, box-shadow .3s, transform .2s, background .3s;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 18px var(--cyan-glow);
  transform: translateY(-2px);
  cursor: pointer;
}

.theme-toggle .t-icon {
  display: block;
  transition: transform .4s, opacity .3s;
  pointer-events: none;
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 18px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .35s, border-color .35s;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 4px;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow);
}

.nav-logo span {
  color: var(--green);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .3s, text-shadow .3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width .3s;
  box-shadow: 0 0 8px var(--cyan);
}

.nav-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cv {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .64rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #020508;
  background: var(--cyan);
  padding: 9px 20px;
  text-decoration: none;

  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: box-shadow .3s, transform .2s;
  font-weight: 700;
}

.nav-cv:hover {
  box-shadow: 0 4px 32px var(--cyan-glow);
  transform: translateY(-2px);
  cursor: pointer;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px 64px 80px;
  position: relative;
  overflow: hidden;
}

#hero canvas {
  position: absolute;
  inset: 0;
  display: block;
}

#plasmaCanvas {
  z-index: 0;
}

#matrixCanvas {
  z-index: 1;
  opacity: .2;
}

#networkCanvas {
  z-index: 2;
  opacity: .6;
}

[data-theme="light"] #matrixCanvas {
  opacity: .05;
}

[data-theme="light"] #matrixCanvas {
  display: none;
}

[data-theme="light"] #networkCanvas {
  opacity: .9;
}

[data-theme="light"] #plasmaCanvas {
  opacity: .8;
}


.h-grid {
  display: none !important;
}

.h-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 85% at 50% 50%, transparent 40%, var(--bg) 100%);
  opacity: .5;
}

/* Aurora shafts */
.aurora-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.shaft {
  position: absolute;
  width: 1.5px;
  top: -20%;
  height: 140%;
  filter: blur(.5px);
  animation: shaftAnim linear infinite;
  transform-origin: top center;
}

.shaft:nth-child(1) {
  left: 12%;
  background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, .22), rgba(0, 212, 255, .06), transparent);
  animation-duration: 14s;
  animation-delay: 0s;
  transform: rotate(6deg);
}

.shaft:nth-child(2) {
  left: 28%;
  background: linear-gradient(to bottom, transparent, rgba(0, 255, 136, .16), transparent);
  animation-duration: 20s;
  animation-delay: -5s;
  transform: rotate(-4deg);
}

.shaft:nth-child(3) {
  left: 50%;
  background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, .18), rgba(139, 92, 246, .1), transparent);
  animation-duration: 17s;
  animation-delay: -9s;
  transform: rotate(10deg);
}

.shaft:nth-child(4) {
  left: 70%;
  background: linear-gradient(to bottom, transparent, rgba(0, 255, 136, .14), transparent);
  animation-duration: 22s;
  animation-delay: -3s;
  transform: rotate(-7deg);
}

.shaft:nth-child(5) {
  left: 88%;
  background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, .2), transparent);
  animation-duration: 16s;
  animation-delay: -11s;
  transform: rotate(4deg);
}

/* Glow orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  filter: blur(70px);
  animation: orbPulse ease-in-out infinite alternate;
}

.orb-a {
  width: 560px;
  height: 560px;
  top: -10%;
  left: -8%;
  background: radial-gradient(circle, rgba(0, 212, 255, .11), transparent 70%);
  animation-duration: 8s;
}

.orb-b {
  width: 420px;
  height: 420px;
  bottom: -18%;
  right: 2%;
  background: radial-gradient(circle, rgba(0, 255, 136, .09), transparent 70%);
  animation-duration: 10s;
  animation-delay: -4s;
}

.orb-c {
  width: 320px;
  height: 320px;
  top: 25%;
  right: 20%;
  background: radial-gradient(circle, rgba(139, 92, 246, .08), transparent 70%);
  animation-duration: 12s;
  animation-delay: -6s;
}

[data-theme="light"] .orb-a {
  background: radial-gradient(circle, rgba(0, 140, 210, .25), transparent 70%);
}

[data-theme="light"] .orb-b {
  background: radial-gradient(circle, rgba(0, 160, 90, .22), transparent 70%);
}

[data-theme="light"] .orb-c {
  background: radial-gradient(circle, rgba(100, 50, 210, .2), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 72px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── PHOTO ── */
.photo-card {
  flex-shrink: 0;
  opacity: 0;
  animation: fadeUp .9s ease forwards .4s;
  position: relative;
}

.photo-frame {
  width: 340px;
  height: 442px;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
  filter: grayscale(22%) contrast(1.1) brightness(.87) hue-rotate(185deg) saturate(.6);
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.8s ease;
}

.photo-card:hover .photo-frame img,
.photo-card:active .photo-frame img,
.photo-card:focus .photo-frame img {
  transform: scale(1.06);
  filter: grayscale(0%) contrast(1.02) brightness(1.02) hue-rotate(0deg) saturate(1.05);
}

[data-theme="light"] .photo-frame img {
  filter: grayscale(5%) contrast(1.05) brightness(1.0) hue-rotate(185deg) saturate(.85);
}

[data-theme="light"] .photo-card:hover .photo-frame img,
[data-theme="light"] .photo-card:active .photo-frame img,
[data-theme="light"] .photo-card:focus .photo-frame img {
  filter: grayscale(0%) contrast(1.08) brightness(1.05) hue-rotate(0deg) saturate(1.05);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 5, 8, .75) 0%, transparent 55%),
    linear-gradient(135deg, rgba(0, 212, 255, .08) 0%, transparent 55%);
}

[data-theme="light"] .photo-overlay {
  background: linear-gradient(to top, rgba(15, 40, 80, .5) 0%, transparent 55%),
    linear-gradient(135deg, rgba(0, 110, 180, .06) 0%, transparent 55%);
}

.photo-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent, transparent 3px, rgba(0, 212, 255, .07) 3px, rgba(0, 212, 255, .07) 4px);
  animation: scanMove 8s linear infinite;
}

.pc {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--cyan);
  border-style: solid;
  transition: width .3s, height .3s, box-shadow .3s;
}

.pc-tl {
  top: -5px;
  left: -5px;
  border-width: 2px 0 0 2px;
}

.pc-tr {
  top: -5px;
  right: -5px;
  border-width: 2px 2px 0 0;
}

.pc-bl {
  bottom: 18px;
  left: -5px;
  border-width: 0 0 2px 2px;
}

.pc-br {
  bottom: 18px;
  right: -5px;
  border-width: 0 2px 2px 0;
}

.photo-card:hover .pc,
.photo-card:active .pc,
.photo-card:focus .pc {
  width: 26px;
  height: 26px;
  box-shadow: 0 0 12px var(--cyan);
}

.photo-deco {
  position: absolute;
  border: 1px solid rgba(0, 212, 255, .3);
  width: 340px;
  height: 442px;
  top: 9px;
  left: 9px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  pointer-events: none;
  animation: decoPulse 3s ease-in-out infinite alternate;
}

.photo-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 9px;
  background: var(--cyan);
  color: #020508;
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 7px 14px;
  font-weight: 700;
}

/* ── HERO TEXT ── */
.hero-text {
  flex: 1;
}

.hero-eyebrow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp .8s ease forwards .55s;
}

.he-location {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--cyan);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 0 15px var(--cyan-glow);
  white-space: nowrap;
}

.he-typing {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--green);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 0 16px rgba(0, 255, 136, .5);
}

.he-prompt {
  color: var(--muted);
  margin-right: 8px;
  font-weight: bold;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: .9em;
  background: var(--green);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink .8s step-end infinite;
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4.5rem, 8.5vw, 8.5rem);
  line-height: .88;
  opacity: 0;
  animation: fadeUp .8s ease forwards .7s;
}

.hero-name .solid {
  display: block;
  background: linear-gradient(135deg, #fff 0%, rgba(180, 230, 255, .9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, .3));
}

[data-theme="light"] .hero-name .solid {
  background: linear-gradient(135deg, #0d1b35 0%, #1a3a6b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(0, 100, 200, .15));
}

.hero-name .outline {
  display: block;
  -webkit-text-stroke: 2px var(--cyan);
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px var(--cyan-glow));
  animation: glitch 8s infinite;
}

.hero-subtitle {
  font-size: .98rem;
  font-weight: 300;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.85;
  max-width: 490px;
  opacity: 0;
  animation: fadeUp .8s ease forwards .85s;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle strong {
  color: var(--text);
  font-weight: 500;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  opacity: 0;
  animation: fadeUp .8s ease forwards .97s;
}

.role-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  letter-spacing: 1.5px;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  padding: 5px 13px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}

.role-badge::before {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(0, 212, 255, .12), transparent);
  transition: left .4s;
}

.role-badge:hover::before {
  left: 100%;
}

.role-badge:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
  transform: translateY(-2px);
}

.rb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: blink 1.8s infinite;
  box-shadow: 0 0 8px var(--green);
}

.hero-stats {
  display: flex;
  gap: 0;
  margin-top: 34px;
  border: 1px solid var(--border);
  width: fit-content;
  opacity: 0;
  animation: fadeUp .8s ease forwards 1.08s;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 30px var(--cyan-glow), inset 0 0 30px rgba(0, 212, 255, .02);
}

.hero-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(0, 212, 255, .07), transparent);
  animation: statsGleam 4s ease-in-out infinite;
}

.hstat {
  padding: 16px 26px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.hstat:last-child {
  border-right: none;
}

.hstat-n {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 22px var(--cyan-glow);
}

.hstat-l {
  font-family: 'JetBrains Mono', monospace;
  font-size: .54rem;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s ease forwards 1.18s;
}

.btn-p {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020508;
  padding: 13px 24px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;

  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .3s, transform .2s;
}

.btn-p::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .25), transparent);
  transition: left .45s;
}

.btn-p:hover::before {
  left: 100%;
}

.btn-p:hover {
  box-shadow: 0 10px 44px var(--cyan-glow);
  transform: translateY(-3px);
  cursor: pointer;
}

.btn-s {
  background: transparent;
  color: var(--cyan);
  padding: 12px 24px;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--border);

  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color .3s, box-shadow .3s, transform .2s;
}

.btn-s:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 28px var(--cyan-glow);
  transform: translateY(-3px);
  cursor: pointer;
}

.btn-cv {
  background: transparent;
  color: var(--green);
  padding: 12px 24px;
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(0, 255, 136, .22);

  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color .3s, box-shadow .3s, transform .2s;
}

.btn-cv:hover {
  border-color: var(--green);
  box-shadow: 0 0 28px rgba(0, 255, 136, .22);
  transform: translateY(-3px);
  cursor: pointer;
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 64px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: 2px;
  opacity: 0;
  animation: fadeUp .8s ease forwards 1.55s;
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: var(--cyan);
  animation: lineGrow 2.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--cyan);
}

/* ══════════════════════════════════════
   SECTIONS — SHARED
══════════════════════════════════════ */
section {
  padding: 110px 64px;
}

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

.sec-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  color: var(--cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 0 14px var(--cyan-glow);
}

.sec-label::before {
  content: '> ';
  color: var(--green);
}

.sec-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1;
  margin-bottom: 60px;
}

/* ══ ABOUT ══ */
#about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-p {
  font-size: .96rem;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 18px;
}

.about-p strong {
  color: var(--cyan);
  font-weight: 500;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--surface2);
  transition: border-color .3s, transform .22s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}

.c-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: rgba(0, 212, 255, .05);
  transition: width .3s;
}

.c-item:hover::before {
  width: 100%;
}

.c-item:hover {
  border-color: var(--cyan);
  transform: translateX(5px);
  box-shadow: 0 0 20px var(--cyan-glow);
}

.c-icon {
  font-size: .82rem;
  color: var(--cyan);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.c-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: .74rem;
  color: var(--text);
  word-break: break-all;
  position: relative;
  z-index: 1;
}

.c-val a {
  color: var(--text);
  text-decoration: none;
  transition: color .3s;
}

.c-val a:hover {
  color: var(--cyan);
}

/* ══ SKILLS ══ */
#skills {
  background: var(--bg);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.sk-card {
  background: var(--surface);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: background .3s;
}

.sk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  transition: transform .5s;
}

.sk-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, var(--cyan), var(--green));
  transition: width .5s ease;
  box-shadow: 0 0 10px var(--cyan);
}

.sk-card:hover {
  background: var(--surface2);
}

.sk-card:hover::before {
  transform: scaleX(1);
}

.sk-card:hover::after {
  width: 100%;
}

.sk-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  color: var(--cyan);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
  text-shadow: 0 0 10px var(--cyan-glow);
}

.sk-cat::before {
  content: '[ ';
  color: var(--green);
}

.sk-cat::after {
  content: ' ]';
  color: var(--green);
}

.sk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sk-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  padding: 5px 12px;
  transition: all .22s;
}

.sk-tag:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
  transform: translateY(-2px);
  background: rgba(0, 212, 255, .1);
}

/* ══ EXPERIENCE ══ */
#experience {
  background: var(--surface);
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  /* Starts perfectly within the first diamond square */
  bottom: 24px;
  /* Cuts the timeline short so it doesn't look excessively long */
  width: 1px;
  background: var(--border);
  /* Gray background line */
}

/* Timeline Terminator Square */
.timeline::after {
  content: '';
  position: absolute;
  left: -4.5px;
  /* Exactly center a 10px box on a 1px line */
  bottom: 19.5px;
  /* Centers cleanly on the 24px bottom boundary (24 - 4.5 = 19.5) */
  width: 10px;
  height: 10px;
  background: var(--purple);
  /* Matches the line's gradient end color perfectly */
  border-radius: 1px;
  box-shadow: 0 0 16px var(--purple), 0 0 4px var(--bg) inset;
  /* Gorgeous terminal block glow */
  z-index: 10;
}

.timeline-line {
  position: absolute;
  left: 0;
  top: 12px;
  /* Matches background line start */
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan) 0%, var(--green) 70%, var(--purple) 100%);
  box-shadow: 0 0 12px rgba(0, 212, 255, .6);
  z-index: 1;
  border-radius: 2px;
  max-height: calc(100% - 36px);
  /* Prevents the animated JS line from overshooting the new shorter boundary (12px top + 24px bottom = 36px offset) */
  height: 0%;
}

.t-item {
  padding-bottom: 64px;
  position: relative;
}

.t-card {
  position: relative;
}

.t-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  mix-blend-mode: color-dodge;
}

.t-item:last-child {
  padding-bottom: 0;
}

.t-dot {
  position: absolute;
  left: -37px;
  top: 7px;
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 1px;
  transform: rotate(45deg);
  animation: dotGlow 3s ease-in-out infinite;
}

.t-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: .63rem;
  color: var(--green);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(0, 255, 136, .3);
}

.t-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.t-company {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  color: var(--cyan);
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 0 22px var(--cyan-glow);
}

.t-company a {
  color: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
}

.t-company a:hover {
  color: var(--green);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
  transform: translateY(-2px);
}

.t-role-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, .25);
  padding: 3px 10px;
  white-space: nowrap;
}

.t-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 300;
}

.proj-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.proj {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 20px 22px;
  transition: border-color .3s, transform .28s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}

.proj::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(to bottom, var(--cyan), var(--green));
  transition: height .45s;
}

.proj::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cyan-dim), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.proj:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px var(--cyan-glow);
}

.proj:hover::before {
  height: 100%;
}

.proj:hover::after {
  opacity: 1;
}

.proj-n {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.proj-d {
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

/* ══ EDUCATION ══ */
#education {
  background: var(--bg);
}

/* ══ TRAINING ══ */
#training {
  background: var(--surface);
}

.edu-flex {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.edu-card {
  flex: 1;
  min-width: 260px;
  border: 1px solid var(--border);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .3s, transform .28s, box-shadow .3s;
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  transition: transform .5s;
}

.edu-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--green), transparent);
  transform: scaleX(0);
  transition: transform .5s;
}

.edu-card:hover {
  border-color: var(--cyan);
  transform: translateY(-5px);
  box-shadow: 0 18px 52px var(--cyan-glow);
}

.edu-card:hover::before,
.edu-card:hover::after {
  transform: scaleX(1);
}

.edu-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 5.5rem;
  color: var(--cyan-dim);
  line-height: 1;
  position: absolute;
  top: 12px;
  right: 20px;
  opacity: .4;
}

.edu-deg {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  margin-bottom: 4px;
  color: var(--text);
}

.edu-inst {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
}

.edu-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edu-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  padding: 4px 12px;
}

/* ══ FUTURE HORIZON / SOP ══ */
#sop {
  background: var(--bg);
}

/* ══ CONTACT ══ */
#contact {
  background: var(--surface);
  text-align: center;
  padding: 130px 64px;
}

#contact .sec-title {
  margin-bottom: 16px;
}

#contact .sec-title .outline {
  -webkit-text-stroke: 2px var(--cyan);
  -webkit-text-fill-color: transparent;
  display: block;
  filter: drop-shadow(0 0 22px var(--cyan-glow));
}

.contact-sub {
  font-size: .82rem;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 48px;
  line-height: 1.8;
  font-family: 'JetBrains Mono', monospace;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cv-download-bar {
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 580px;
  margin: 48px auto 0;
  position: relative;
  overflow: hidden;
}

.cv-download-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 70%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  animation: scanLine 3s linear infinite;
}

.cv-download-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -100%;
  width: 70%;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--green), transparent);
  animation: scanLine2 3.5s linear infinite;
}

.cv-info-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 4px;
}

.cv-info-sub {
  font-size: .8rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.btn-dl {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #020508;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 24px;
  text-decoration: none;

  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: box-shadow .3s, transform .2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-dl::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .22), transparent);
  transition: left .4s;
}

.btn-dl:hover::before {
  left: 100%;
}

.btn-dl:hover {
  box-shadow: 0 8px 36px var(--cyan-glow);
  transform: translateY(-2px);
  cursor: pointer;
}

.contact-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 60px;
}

.cr {
  text-align: left;
}

.cr-l {
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.cr-v {
  font-size: .88rem;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}

.cr-v a {
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 10px var(--cyan-glow);
}

.cr-v a:hover {
  cursor: pointer;
}

.avail-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 7px;
  animation: blink 1.6s infinite;
  box-shadow: 0 0 10px rgba(0, 255, 136, .7);
  vertical-align: middle;
}

/* ══ FOOTER ══ */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 24px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .35s;
}

.f-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem;
  color: var(--cyan);
  letter-spacing: 3px;
  text-shadow: 0 0 14px var(--cyan-glow);
}

.f-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-align: center;
}

.f-links {
  display: flex;
  gap: 24px;
}

.f-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color .3s, text-shadow .3s;
}

.f-links a:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
}

/* ══════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(36px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .08;
  }
}

@keyframes gridDrift {
  to {
    background-position: 56px 56px;
  }
}

@keyframes orbPulse {
  from {
    transform: scale(1) translate(0, 0);
    opacity: .7;
  }

  to {
    transform: scale(1.25) translate(18px, -28px);
    opacity: 1;
  }
}

@keyframes decoPulse {
  from {
    border-color: rgba(0, 212, 255, .2);
  }

  to {
    border-color: rgba(0, 212, 255, .55);
  }
}

@keyframes scanMove {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 0 100px;
  }
}

@keyframes scanLine {
  from {
    left: -100%;
  }

  to {
    left: 200%;
  }
}

@keyframes scanLine2 {
  from {
    right: -100%;
  }

  to {
    right: 200%;
  }
}

@keyframes lineGrow {

  0%,
  100% {
    width: 32px;
    opacity: .4;
  }

  50% {
    width: 64px;
    opacity: 1;
  }
}

@keyframes statsGleam {
  0% {
    left: -100%;
  }

  100% {
    left: 250%;
  }
}

@keyframes dotGlow {

  0%,
  100% {
    box-shadow: 0 0 12px var(--cyan), 0 0 3px var(--bg) inset;
    background: var(--cyan);
  }

  50% {
    box-shadow: 0 0 24px rgba(0, 212, 255, .9), 0 0 45px rgba(0, 212, 255, .4), 0 0 1px var(--cyan) inset;
    background: #80eaff;
  }
}

@keyframes glitch {

  0%,
  93%,
  100% {
    transform: none;
    clip-path: none;
    -webkit-text-stroke-color: var(--cyan);
    filter: drop-shadow(0 0 18px var(--cyan-glow));
  }

  94% {
    transform: translateX(-6px) skewX(-2deg);
    clip-path: rect(0px 9999px 24px 0);
    -webkit-text-stroke-color: #f0f;
  }

  95% {
    transform: translateX(6px) skewX(2deg);
    clip-path: rect(32px 9999px 64px 0);
  }

  96% {
    transform: translateX(-3px);
    clip-path: rect(10px 9999px 44px 0);
  }

  97% {
    transform: translateX(4px) skewX(-1deg);
    clip-path: none;
    -webkit-text-stroke-color: var(--green);
  }

  98% {
    transform: none;
    -webkit-text-stroke-color: var(--cyan);
  }
}

@keyframes shaftAnim {
  0% {
    opacity: 0;
    transform: rotate(var(--r, 6deg)) translateX(-40px);
  }

  15% {
    opacity: 1;
  }

  50% {
    opacity: .55;
    transform: rotate(var(--r, 6deg)) translateX(40px);
  }

  85% {
    opacity: .3;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--r, 6deg)) translateX(-20px);
  }
}

/* ══ SCROLL REVEAL ══ */
.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1);
}

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

.d1 {
  transition-delay: .1s;
}

.d2 {
  transition-delay: .22s;
}

.d3 {
  transition-delay: .34s;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 960px) {
  nav {
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
  }

  .nav-cv {
    font-size: .6rem;
    padding: 7px 12px;
  }

  #hero {
    padding: 100px 24px 80px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 36px;
  }

  .hero-eyebrow {
    align-items: center;
  }

  .hero-roles,
  .hero-stats,
  .hero-cta {
    justify-content: center;
  }

  .photo-frame,
  .photo-deco {
    width: 240px;
    height: 312px;
  }

  section {
    padding: 80px 24px;
  }

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

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

  .proj-list {
    grid-template-columns: 1fr;
  }

  .edu-flex {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 20px 24px;
  }

  .f-links {
    justify-content: center;
  }

  .cv-download-bar {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-name {
    font-size: 4.2rem;
  }

  .photo-frame,
  .photo-deco {
    width: 210px;
    height: 273px;
  }

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

  .hero-stats {
    width: 100%;
    max-width: 500px;
    margin: 34px auto 0;
  }

  .hstat {
    flex: 1;
    min-width: 0;
    padding: 12px 6px;
  }

  .hstat-n {
    font-size: 1.5rem;
  }

  .hstat-l {
    font-size: 0.5rem;
  }
}

@media (max-width: 480px) {
  #hero {
    padding: 80px 16px 60px;
  }

  .hero-inner {
    gap: 24px;
  }

  .hero-name {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: .9rem;
  }

  .hero-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 24px auto 0;
  }

  .hstat {
    flex: none;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .hstat:last-child {
    border-bottom: none;
  }

  .hstat-n {
    font-size: 1.5rem;
  }

  .hstat-l {
    font-size: 0.54rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .btn-p,
  .btn-s,
  .btn-cv {
    justify-content: center;
    padding: 12px 20px;
  }

  .photo-frame {
    width: 170px;
    height: 221px;
  }

  .photo-deco {
    width: 170px;
    height: 221px;
  }

  .photo-tag {
    font-size: .5rem;
    padding: 6px 12px;
  }
}

/* ══════════════════════════════════════
   MODERN CV TEMPLATE (PDF Generation)
══════════════════════════════════════ */
#cv-template {
  background: white;
  width: 794px;
  /* A4 width */
  min-height: 1123px;
  /* A4 height */
  font-family: 'Outfit', sans-serif;
  color: #334155;
  box-sizing: border-box;
  margin: 0;
  position: relative;
}

.cv-page {
  padding: 0;
  height: 100%;
}

.cv-header {
  background: #0f172a;
  color: #f8fafc;
  padding: 40px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cv-header-left {
  flex: 1;
}

.cv-name {
  font-size: 38px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.cv-title {
  font-size: 16px;
  font-weight: 400;
  color: #38bdf8;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
}

.cv-header-right {
  text-align: right;
  font-size: 13px;
  line-height: 1.6;
}

.cv-contact-item {
  color: #cbd5e1;
}

.cv-contact-item span {
  color: #38bdf8;
  margin-right: 6px;
  font-family: sans-serif;
}

.cv-body {
  padding: 35px 50px;
}

.cv-sec {
  margin-bottom: 25px;
}

.cv-sec-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 5px;
  margin: 0 0 15px 0;
}

.cv-text {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.cv-text strong {
  color: #0f172a;
}

.cv-two-col {
  display: flex;
  gap: 35px;
}

.cv-col-main {
  flex: 1.8;
}

.cv-col-side {
  flex: 1;
}

.cv-job {
  margin-bottom: 22px;
}

.cv-job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.cv-job-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.cv-job-company {
  font-weight: 500;
  color: #0284c7;
}

.cv-job-date {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
}

.cv-job-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
}

.cv-job-list li {
  margin-bottom: 6px;
}

.cv-job-list strong {
  color: #1e293b;
}

.cv-skill-group {
  margin-bottom: 16px;
}

.cv-skill-group h4 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.cv-skill-group p {
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.cv-edu {
  margin-bottom: 15px;
}

.cv-edu-deg {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.cv-edu-inst {
  font-size: 13px;
  color: #475569;
  margin: 2px 0;
}

.cv-edu-date {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #0284c7;
  font-weight: 500;
}

/* ══════════════════════════════════════
   ROLE BOX
══════════════════════════════════════ */
.role-box {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 212, 255, 0.05);
  border-left: 3px solid var(--cyan);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 14px;
  border-radius: 0 4px 4px 0;
  box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.02);
}

[data-theme="light"] .role-box {
  background: rgba(0, 136, 187, 0.05);
  box-shadow: inset 0 0 10px rgba(0, 136, 187, 0.02);
}

/* ══════════════════════════════════════
   SCROLL TO TOP BUTTON
══════════════════════════════════════ */
#scrollTopBtn {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 45px;
  height: 45px;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100px) rotate(0deg);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#scrollTopBtn::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
  z-index: -1;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
  animation: rocketLanding 2.5s ease-in-out forwards;
}

#scrollTopBtn.show::after {
  animation: wavePulse 2s infinite ease-out;
}

#scrollTopBtn:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  box-shadow: 0 0 15px var(--cyan-glow);
}

@keyframes wavePulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes rocketLanding {
  0% {
    opacity: 0;
    transform: translateY(calc(-100vh + 90px)) rotate(180deg);
  }

  10% {
    opacity: 1;
  }

  /* 70% of the time: falls straight down, head pointing down */
  70% {
    transform: translateY(-60px) rotate(180deg);
  }

  /* Remaining 30%: Rotates slowly while continuing to fall, then bounces */
  85% {
    transform: translateY(10px) rotate(-12deg);
  }

  90% {
    /* Bounce 1 */
    transform: translateY(-6px) rotate(8deg);
  }

  95% {
    /* Bounce 2 */
    transform: translateY(3px) rotate(-4deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

#scrollTopBtn.auto-launch {
  visibility: visible;
  opacity: 1;
  animation: rocketAutoLaunch 2.5s ease-in-out forwards;
}

@keyframes rocketAutoLaunch {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  80% {
    transform: translateY(-120vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) rotate(0deg);
    opacity: 0;
  }
}

#scrollTopBtn.launching {
  visibility: visible !important;
  opacity: 1 !important;
  transition: none !important;
  pointer-events: none;
  animation: none !important;
}

@media (max-width: 768px) {
  #scrollTopBtn {
    bottom: 50px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ── LANGUAGE BADGES ── */
.lang-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: help;
  display: inline-block;
  transition: all 0.2s;
}

.lang-bangla {
  background: rgba(0, 212, 255, 0.12);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.25);
}
[data-theme="light"] .lang-bangla {
  background: rgba(0, 136, 187, 0.08);
  color: #006699;
  border: 1px solid rgba(0, 136, 187, 0.2);
}

.lang-english {
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.25);
}
[data-theme="light"] .lang-english {
  background: rgba(0, 153, 94, 0.08);
  color: #00774c;
  border: 1px solid rgba(0, 153, 94, 0.2);
}

.lang-hindi {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}
[data-theme="light"] .lang-hindi {
  background: rgba(109, 40, 217, 0.08);
  color: #5b21b6;
  border: 1px solid rgba(109, 40, 217, 0.2);
}

.lang-arabic {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
[data-theme="light"] .lang-arabic {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

/* ── SOP CONTAINER & READER ── */
.sop-text-content::-webkit-scrollbar {
  width: 4px;
}
.sop-text-content::-webkit-scrollbar-track {
  background: var(--surface);
}
.sop-text-content::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 2px;
}

@media (max-width: 992px) {
  .sop-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}