/* =========================================================
   RAGHANSH GULATI PORTFOLIO — style.css
   Elite Cybersecurity — Enhanced Dark Theme v2
   ========================================================= */

/* ---------- CUSTOM PROPERTIES ---------- */
:root {
  --bg:          #05080f;
  --bg-alt:      #070d18;
  --surface:     #0c1220;
  --surface-2:   #10192a;
  --surface-3:   #141f30;
  --border:      #182030;
  --border-2:    #1e2a3d;
  --border-3:    #243347;

  --cyan:        #00d9f5;
  --cyan-dim:    rgba(0, 217, 245, 0.08);
  --cyan-mid:    rgba(0, 217, 245, 0.18);
  --cyan-glow:   rgba(0, 217, 245, 0.28);
  --purple:      #8b5cf6;
  --purple-dim:  rgba(139, 92, 246, 0.1);
  --purple-glow: rgba(139, 92, 246, 0.25);
  --green:       #10d9a0;
  --green-dim:   rgba(16, 217, 160, 0.08);
  --green-glow:  rgba(16, 217, 160, 0.2);
  --red:         #ff3d6a;
  --red-dim:     rgba(255, 61, 106, 0.08);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245, 158, 11, 0.08);

  --text:        #8baac6;
  --text-muted:  #3d5370;
  --text-bright: #d0e4ff;
  --text-faint:  #1e2e42;

  --ff-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --ff-body:  'Inter', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --ease:      0.22s ease;
  --ease-out:  0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --max-w:     1100px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 68px;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; }
/* Faster tap response + remove tap flash on mobile */
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- BASE ---------- */
body {
  font-family: var(--ff-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle, rgba(0, 217, 245, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(0, 217, 245, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 245, 0.016) 1px, transparent 1px);
  background-size: 48px 48px, 96px 96px, 96px 96px;
  background-position: 24px 24px, 0 0, 0 0;
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
}

/* Section alt areas override bg */
.section--alt { background: var(--bg-alt); }

/* Custom scrollbar */
::-webkit-scrollbar            { width: 4px; }
::-webkit-scrollbar-track      { background: var(--bg); }
::-webkit-scrollbar-thumb      { background: linear-gradient(var(--cyan), var(--purple)); border-radius: 2px; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- TYPOGRAPHY HELPERS ---------- */
strong { color: var(--text-bright); }
em     { color: var(--cyan); font-style: normal; }
.highlight {
  font-family: var(--ff-mono);
  font-size: 0.9em;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.15em 0.5em;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--cyan);
}
.inline-link {
  color: var(--cyan);
  border-bottom: 1px solid rgba(0, 217, 245, 0.35);
  transition: border-color var(--ease), color var(--ease);
}
.inline-link:hover {
  color: #fff;
  border-color: var(--cyan);
}

/* ---------- BLINK ---------- */
.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- GLITCH ---------- */
.glitch { position: relative; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  left: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--cyan);
}
.glitch::before {
  animation: glitchTop 4.5s infinite linear;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-2px, -2px);
  color: var(--purple);
  opacity: 0.7;
}
.glitch::after {
  animation: glitchBottom 4.5s infinite linear;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(2px, 2px);
  color: var(--cyan);
  opacity: 0.6;
}
@keyframes glitchTop {
  0%, 88%, 100% { transform: translate(-2px, -2px); opacity: 0; }
  90%           { transform: translate(-5px, -2px) skewX(2deg); opacity: 0.8; }
  92%           { transform: translate(5px, -2px);  opacity: 0.7; }
  94%           { transform: translate(-2px, -2px); opacity: 0; }
}
@keyframes glitchBottom {
  0%, 86%, 100% { transform: translate(2px, 2px);  opacity: 0; }
  88%           { transform: translate(5px, 2px) skewX(-2deg); opacity: 0.7; }
  91%           { transform: translate(-5px, 2px);  opacity: 0.6; }
  93%           { transform: translate(2px, 2px);   opacity: 0; }
}

/* =========================================================
   SCROLL PROGRESS BAR
   ========================================================= */
.nav__progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px var(--cyan-glow), 0 0 24px rgba(0, 217, 245, 0.1);
  transition: width 0.1s linear;
  z-index: 10;
  border-radius: 0 2px 2px 0;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease), border-color var(--ease);
}
.nav.scrolled {
  background: rgba(5, 8, 15, 0.95);
  border-color: var(--border-2);
}

.nav__logo {
  font-family: var(--ff-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.1em;
  transition: opacity var(--ease), text-shadow var(--ease);
}
.nav__logo:hover {
  opacity: 0.85;
  text-shadow: 0 0 20px var(--cyan-glow);
}

.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color var(--ease);
  position: relative;
  padding-bottom: 2px;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  transition: width var(--ease-out);
}
.nav__links a:hover { color: var(--text-bright); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.active {
  color: var(--cyan);
}
.nav__links a.active::after { width: 100%; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all var(--ease);
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

/* Matrix canvas */
.hero__matrix {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
}

/* Ambient glow blobs — upgraded */
.hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero__glow--cyan {
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(0, 217, 245, 0.09) 0%, transparent 70%);
  filter: blur(60px);
  animation: glowPulse 6s ease-in-out infinite;
}
.hero__glow--purple {
  bottom: 0%;
  right: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  animation: glowPulse 8s ease-in-out infinite 2s;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

/* Scanlines overlay — CRT feel */
.hero__scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
}

/* Horizontal scan sweep on load */
.hero::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  animation: heroScan 0.8s ease-out 0.3s forwards;
  pointer-events: none;
}
@keyframes heroScan {
  0%   { top: 0; opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

.hero__content { position: relative; z-index: 1; }

/* Hero status badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(16, 217, 160, 0.25);
  background: rgba(16, 217, 160, 0.06);
  padding: 0.38rem 0.95rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 217, 160, 0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(16, 217, 160, 0); }
}

.hero__terminal {
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
  min-height: 1.4em;
  margin-bottom: 1.8rem;
  opacity: 0.9;
}

.hero__name {
  font-family: var(--ff-mono);
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
}
.hero__name--white {
  display: block;
  color: var(--text-bright);
  text-shadow: 0 0 60px rgba(208, 228, 255, 0.1);
}
.hero__name--cyan {
  display: block;
  color: var(--cyan);
  text-shadow: 0 0 50px rgba(0, 217, 245, 0.4), 0 0 100px rgba(0, 217, 245, 0.15);
}

.hero__tagline {
  font-family: var(--ff-mono);
  font-size: clamp(0.68rem, 1.6vw, 0.88rem);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 2.8rem;
}
.tag-dot { color: var(--cyan); margin: 0 0.45rem; opacity: 0.6; }

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}

.hero__socials {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
}
.hero__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--ease-out);
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  font-weight: 700;
}
.hero__social-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 16px var(--cyan-glow);
}
.hero__social-link--thm {
  color: var(--green);
  border-color: rgba(16, 217, 160, 0.25);
}
.hero__social-link--thm:hover {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 16px var(--green-glow);
}

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity var(--ease);
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll-arrow { animation: scrollBounce 2s ease-in-out infinite; }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  transition: all var(--ease-out);
  border: 1px solid transparent;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn:hover::before { transform: translateX(100%); }

.btn--primary {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
  font-weight: 700;
}
.btn--primary:hover {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 30px rgba(0, 217, 245, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--cyan);
  border-color: rgba(0, 217, 245, 0.4);
}
.btn--ghost:hover {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 217, 245, 0.2), inset 0 0 20px var(--cyan-dim);
  transform: translateY(-2px);
}
.btn--full { width: 100%; }
.btn--success {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: var(--bg) !important;
}
.btn--error {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}

/* =========================================================
   SECTIONS — COMMON
   ========================================================= */
.section { padding: 7rem 2rem; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
  opacity: 0.85;
}
.section__eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.5;
}

.section__title {
  font-family: var(--ff-mono);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 3.5rem;
  position: relative;
  letter-spacing: -0.02em;
}
.section__title::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  margin-top: 0.7rem;
  border-radius: 1px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 10px var(--cyan-glow);
}
.section__title.title-animated::after { width: 60px; }

/* =========================================================
   TERMINAL WINDOW COMPONENT
   ========================================================= */
.terminal-window {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.6rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border);
}
.tw-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.tw-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tw-dot--r { background: #ff5f57; box-shadow: 0 0 5px rgba(255,95,87,0.4); }
.tw-dot--y { background: #febc2e; box-shadow: 0 0 5px rgba(254,188,46,0.4); }
.tw-dot--g { background: #28c840; box-shadow: 0 0 5px rgba(40,200,64,0.4); }
.tw-title {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 0.4rem;
  flex: 1;
  text-align: center;
}
.tw-body {
  padding: 1.6rem 1.8rem;
}
.tw-body p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1.2rem;
  line-height: 1.9;
}
.tw-body p:last-child { margin-bottom: 0; }
.tw-body p::before {
  content: '> ';
  color: var(--cyan);
  opacity: 0.5;
  font-family: var(--ff-mono);
  font-size: 0.8em;
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Avatar */
.avatar-wrap { text-align: center; margin-bottom: 2rem; }
.avatar-ring {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--cyan), var(--purple), var(--green), var(--cyan));
  margin: 0 auto;
  animation: ringRotate 6s linear infinite, ringPulse 3s ease-in-out infinite;
}
@keyframes ringRotate {
  to { filter: hue-rotate(360deg); }
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 217, 245, 0.2); }
  50%       { box-shadow: 0 0 60px rgba(0, 217, 245, 0.35), 0 0 100px rgba(139, 92, 246, 0.15); }
}
.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

/* Stats */
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: all var(--ease-out);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cyan-dim), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}
.stat-card:hover {
  border-color: rgba(0, 217, 245, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 217, 245, 0.1);
}
.stat-card:hover::before { opacity: 1; }
.stat-card__num {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
  position: relative;
}
.stat-card__label {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
  position: relative;
}

/* About text */
.about__right p {
  font-size: 0.97rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.85;
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.about__tags span {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 217, 245, 0.18);
  padding: 0.32rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
  cursor: default;
}
.about__tags span:hover {
  background: var(--cyan-mid);
  border-color: rgba(0, 217, 245, 0.4);
  transform: translateY(-1px);
}

/* =========================================================
   SKILLS
   ========================================================= */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}
.skills__col-title {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 1.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-bars { display: flex; flex-direction: column; gap: 1.2rem; }

.skill-bar-item__meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  align-items: baseline;
}
.skill-bar-item__name {
  font-family: var(--ff-mono);
  font-size: 0.76rem;
  color: var(--text);
  letter-spacing: 0.03em;
}
.skill-bar-item__pct {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.skill-bar-item__track {
  height: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: visible;
  position: relative;
}
.skill-bar-item__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--purple) 100%);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(0, 217, 245, 0.4), 0 0 24px rgba(0, 217, 245, 0.15);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.skill-bar-item__fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -2px;
  width: 3px;
  height: calc(100% + 4px);
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
  opacity: 0.8;
}
.skills__col:nth-child(2) .skill-bar-item__fill {
  background: linear-gradient(90deg, var(--purple) 0%, var(--cyan) 100%);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4), 0 0 24px rgba(139, 92, 246, 0.15);
}
.skills__col:nth-child(2) .skill-bar-item__fill::after {
  box-shadow: 0 0 8px var(--purple);
}

/* Tools */
.tools-section { margin-top: 0.5rem; }
.tools-section__title {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  color: var(--text-bright);
  margin-bottom: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.tools-section__title::before {
  content: '$';
  color: var(--cyan);
  opacity: 0.7;
}
.tools-section__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.tools-section__tags span {
  font-family: var(--ff-mono);
  font-size: 0.73rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--ease-out);
  cursor: default;
}
.tools-section__tags span:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.4rem;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  transition: all var(--ease-out);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Top gradient line */
.proj-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}

/* Scan animation layer */
.proj-card__scan {
  position: absolute;
  inset: -100% 0 auto 0;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 217, 245, 0.04) 40%,
    rgba(0, 217, 245, 0.08) 50%,
    rgba(0, 217, 245, 0.04) 60%,
    transparent 100%
  );
  transition: inset 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}
.proj-card:hover .proj-card__scan { inset: 100% 0 auto 0; }

.proj-card > *:not(.proj-card__scan) { position: relative; z-index: 1; }

.proj-card:hover {
  border-color: rgba(0, 217, 245, 0.35);
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 217, 245, 0.1),
    0 0 30px rgba(0, 217, 245, 0.05);
}
.proj-card:hover::before { opacity: 1; }

/* Featured card */
.proj-card--featured {
  border-color: rgba(0, 217, 245, 0.2);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(0, 217, 245, 0.04) 100%);
}
.proj-card--featured::after {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--cyan), transparent);
  opacity: 0.3;
}
.proj-card--featured:hover { border-color: rgba(0, 217, 245, 0.5); }

.proj-card__badge {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  font-family: var(--ff-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--cyan);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.proj-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.proj-card__emoji { font-size: 1.7rem; }
.proj-card__links { display: flex; gap: 0.8rem; }
.proj-card__links a {
  color: var(--text-muted);
  transition: all var(--ease);
  display: flex;
  align-items: center;
}
.proj-card__links a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.proj-card__title {
  font-family: var(--ff-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}
.proj-card__desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.78;
  margin-bottom: 1.3rem;
}
.proj-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.proj-card__tags span {
  font-family: var(--ff-mono);
  font-size: 0.67rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 217, 245, 0.18);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.certs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.cert-card {
  display: flex;
  gap: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: all var(--ease-out);
  position: relative;
  overflow: hidden;
}
.cert-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}
.cert-card:hover {
  border-color: rgba(0, 217, 245, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 217, 245, 0.08);
}
.cert-card:hover::before { opacity: 1; }

.cert-card__icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 217, 245, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  transition: all var(--ease);
}
.cert-card:hover .cert-card__icon {
  box-shadow: 0 0 20px var(--cyan-glow);
}
.cert-card__icon--purple {
  background: var(--purple-dim);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--purple);
}
.cert-card:hover .cert-card__icon--purple {
  box-shadow: 0 0 20px var(--purple-glow);
}
.cert-card__icon--green {
  background: var(--green-dim);
  border-color: rgba(16, 217, 160, 0.2);
  color: var(--green);
}
.cert-card:hover .cert-card__icon--green {
  box-shadow: 0 0 20px var(--green-glow);
}

.cert-card__body { flex: 1; }
.cert-card__title {
  font-family: var(--ff-mono);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.25rem;
}
.cert-card__issuer {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--cyan);
  margin-bottom: 0.7rem;
  opacity: 0.85;
}
.cert-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.9rem;
}
.cert-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cert-card__tags span {
  font-family: var(--ff-mono);
  font-size: 0.63rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
}

/* Platforms row */
.platforms-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--ease-out);
  flex: 1;
  min-width: 200px;
}
.platform-badge:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.platform-badge__icon { font-size: 1.1rem; }
.platform-badge__label {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-bright);
}
.platform-badge__handle {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  flex: 1;
}
.platform-badge__arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--ease), color var(--ease);
}
.platform-badge:hover .platform-badge__arrow { transform: translateX(4px); color: var(--cyan); }

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 2.2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan) 0%, rgba(0, 217, 245, 0.2) 60%, transparent 100%);
}

.timeline__item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -2.52rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--cyan), 0 0 15px var(--cyan-glow);
  animation: dotPulse 3s ease-in-out infinite;
}
.timeline__item:nth-child(2) .timeline__dot { animation-delay: 0.7s; }
.timeline__item:nth-child(3) .timeline__dot { animation-delay: 1.4s; }
.timeline__item:nth-child(4) .timeline__dot { animation-delay: 2.1s; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--cyan), 0 0 15px rgba(0, 217, 245, 0.3); }
  50%       { box-shadow: 0 0 0 4px rgba(0, 217, 245, 0.2), 0 0 25px rgba(0, 217, 245, 0.5); }
}

.timeline__date {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.35rem;
  opacity: 0.9;
}
.timeline__heading {
  font-family: var(--ff-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.22rem;
  letter-spacing: -0.01em;
}
.timeline__org {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--purple);
  margin-bottom: 0.65rem;
  opacity: 0.85;
}
.timeline__desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.82;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

.contact__intro {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.87;
  margin-bottom: 2rem;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-mono);
  font-size: 0.88rem;
  color: var(--cyan);
  margin-bottom: 2rem;
  padding: 0.65rem 1rem;
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 217, 245, 0.2);
  border-radius: var(--radius);
  transition: all var(--ease);
  width: 100%;
}
.contact__email:hover {
  background: var(--cyan-mid);
  border-color: rgba(0, 217, 245, 0.4);
  transform: translateX(3px);
}

.contact__socials { display: flex; flex-direction: column; gap: 0.65rem; }

.social-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.87rem;
  transition: all var(--ease-out);
}
.social-row:hover {
  border-color: rgba(0, 217, 245, 0.35);
  color: var(--cyan);
  background: var(--cyan-dim);
  transform: translateX(5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.social-row__icon { color: var(--cyan); display: flex; align-items: center; }
.social-row__label { flex: 1; font-family: var(--ff-mono); font-size: 0.78rem; }
.social-row__arrow { font-size: 0.9rem; opacity: 0.4; transition: all var(--ease); }
.social-row:hover .social-row__arrow { opacity: 1; transform: translateX(3px); }

/* Form */
.contact__form { display: flex; flex-direction: column; gap: 1.2rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field__label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.field__label::before {
  content: '//';
  color: var(--cyan);
  opacity: 0.4;
  font-size: 0.75em;
}
.field__input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-bright);
  padding: 0.8rem 1rem;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  transition: all var(--ease);
  outline: none;
  width: 100%;
}
.field__input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-dim), 0 0 15px rgba(0, 217, 245, 0.1);
  background: var(--surface-2);
}
.field__input::placeholder { color: var(--text-muted); opacity: 0.7; }
.field__textarea { resize: vertical; min-height: 140px; font-family: var(--ff-body); }

.form__status {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  text-align: center;
  min-height: 1.2em;
  transition: color var(--ease);
}
.form__status--ok  { color: var(--green); }
.form__status--err { color: var(--red); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 3.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0 10% auto 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  opacity: 0.3;
  top: 0;
}
.footer__inner { max-width: var(--max-w); margin: 0 auto; }
.footer__name {
  font-family: var(--ff-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 20px var(--cyan-glow);
}
.footer__tagline {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}
.footer__socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}
.footer__socials a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: all var(--ease);
}
.footer__socials a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
  box-shadow: 0 0 12px var(--cyan-glow);
  transform: translateY(-2px);
}
.footer__divider {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
  opacity: 0.5;
}
.footer__line {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.footer__copy {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* ---------- Tablet (≤ 900px) ---------- */
@media (max-width: 900px) {
  .about__grid   { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills__grid  { grid-template-columns: 1fr; gap: 3rem; }
  .contact__grid { grid-template-columns: 1fr; gap: 3rem; }
  .nav           { padding: 1rem 1.5rem; }
  .platforms-row { flex-direction: column; }
  .platform-badge { min-width: unset; }
}

/* ---------- Mobile (≤ 768px) ---------- */
@media (max-width: 768px) {
  /* ---- Navigation ---- */
  .nav { padding: 0 1.25rem; height: 60px; }

  .nav__toggle {
    display: flex;
    padding: 8px;
    margin-right: -4px;
  }
  .nav__toggle span { width: 24px; height: 2px; }

  /* Full-height overlay menu */
  .nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    min-height: calc(100vh - 60px);
    background: rgba(5, 8, 15, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border);
    border-bottom: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 2rem 2rem 6rem;
  }
  .nav__links.open { display: flex; }
  .nav__links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    width: 100%;
    max-width: 300px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all var(--ease-out);
  }
  .nav__links a.active,
  .nav__links a:hover {
    color: var(--cyan);
    border-color: rgba(0, 217, 245, 0.4);
    background: var(--cyan-dim);
  }
  .nav__links a::after { display: none; }

  /* ---- Hero ---- */
  .hero { padding: 5.5rem 1.3rem 5rem; }
  .hero__social-link { width: 44px; height: 44px; }
  .hero__scroll { bottom: 1.8rem; }

  /* ---- Sections ---- */
  .section { padding: 5rem 1.4rem; }

  /* ---- About ---- */
  .about__grid { gap: 2rem; }
  .avatar-ring { width: 150px; height: 150px; }
  .avatar-inner { font-size: 2.2rem; }

  /* ---- Certs ---- */
  .certs__grid { grid-template-columns: 1fr; }
  .cert-card { flex-direction: column; gap: 0.8rem; }

  /* ---- Terminal ---- */
  .tw-body { padding: 1.2rem; }
  .tw-body p { font-size: 0.9rem; }

  /* ---- Contact ---- */
  .contact__grid { gap: 2.5rem; }
}

/* ---------- Small Mobile (≤ 480px) ---------- */
@media (max-width: 480px) {
  /* ---- Hero ---- */
  .hero { padding: 5rem 1rem 4.5rem; }
  .hero__badge { font-size: 0.56rem; padding: 0.3rem 0.7rem; gap: 0.45rem; }
  .hero__terminal { font-size: 0.75rem; margin-bottom: 1.4rem; }
  .hero__name {
    font-size: clamp(2.4rem, 15vw, 3.8rem);
    letter-spacing: -0.04em;
    margin-bottom: 1.2rem;
  }
  /* Show tagline compactly (previously hidden) */
  .hero__tagline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    line-height: 2.2;
  }
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    margin-bottom: 2rem;
  }
  .hero__actions .btn { width: 100%; }
  .hero__socials { gap: 0.45rem; }
  /* 46px min touch target */
  .hero__social-link { width: 46px; height: 46px; }

  /* ---- Nav overlay ---- */
  .nav__links a { font-size: 0.92rem; padding: 0.9rem 2rem; }

  /* ---- Sections ---- */
  .section { padding: 4rem 1rem; }
  .section__title { font-size: clamp(1.6rem, 7vw, 2rem); margin-bottom: 2.5rem; }

  /* ---- About ---- */
  .avatar-ring { width: 130px; height: 130px; }
  .avatar-inner { font-size: 2rem; }
  .about__stats { grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
  .stat-card { padding: 0.65rem 0.3rem; }
  .stat-card__num { font-size: 0.82rem; }
  .stat-card__label { font-size: 0.55rem; }

  /* ---- Skills ---- */
  .skill-bar-item__name { font-size: 0.72rem; }
  .skills__col-title { font-size: 0.82rem; }

  /* ---- Projects ---- */
  .projects__grid { grid-template-columns: 1fr; }
  .proj-card { padding: 1.3rem; }
  .proj-card__title { font-size: 0.97rem; }
  .proj-card__desc { font-size: 0.84rem; }

  /* ---- Certs ---- */
  .cert-card { padding: 1.2rem; gap: 0.65rem; }
  .cert-card__title { font-size: 0.88rem; }

  /* ---- Tags ---- */
  .tools-section__tags span,
  .about__tags span { font-size: 0.7rem; }

  /* ---- Contact ---- */
  /* font-size: 1rem prevents iOS auto-zoom on input focus */
  .field__input { font-size: 1rem; padding: 0.85rem 0.9rem; }
  .field__textarea { min-height: 120px; }
  .contact__email { font-size: 0.82rem; }

  /* ---- Timeline ---- */
  .timeline { padding-left: 1.8rem; }
  .timeline__heading { font-size: 0.92rem; }
  .timeline__desc { font-size: 0.86rem; }

  /* ---- Footer ---- */
  .footer { padding: 2.5rem 1rem; }
}

/* ---------- Very Small Mobile (≤ 380px) ---------- */
@media (max-width: 380px) {
  .hero__name { font-size: clamp(2rem, 17vw, 3rem); }
  .about__stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3.5rem 0.9rem; }
  .proj-card { padding: 1.1rem; }
  .nav__links a { padding: 0.85rem 1.8rem; }
}

/* ---------- iPhone notch / home indicator safe areas ---------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: max(3.5rem, calc(2rem + env(safe-area-inset-bottom))); }

  @media (max-width: 480px) {
    .footer { padding-bottom: max(2.5rem, calc(1.5rem + env(safe-area-inset-bottom))); }
  }
}
