/* ==========================================================================
   Mahanth Perla — Portfolio v2
   Awwwards-style: big type, acid lime, grain, custom cursor, hover everything
   ========================================================================== */

:root {
  --bg: #0b0c10;
  --bg-soft: #131419;
  --surface: rgba(255, 255, 255, 0.035);
  --line: rgba(242, 240, 234, 0.12);
  --text: #f2f0ea;
  --muted: #9aa0b4;
  --lime: #d4ff3f;
  --violet: #a78bfa;
  --pink: #ff6ec7;
  --radius: 20px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1); /* expo-out: fast start, long silky settle */
}

/* Lenis smooth-scroll housekeeping */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; }

a { color: inherit; }

::selection { background: var(--lime); color: #0b0c10; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23263a; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime); }

/* ============ Preloader ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: transform 0.7s var(--ease), visibility 0.7s;
}
.preloader.done { transform: translateY(-101%); visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  display: block;
}
.preloader-logo span { color: var(--lime); }
.preloader-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin: 14px 0 12px;
}
.preloader-bar {
  width: 180px;
  height: 2px;
  background: var(--line);
  margin: 0 auto;
  border-radius: 2px;
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lime);
  transition: width 0.1s linear;
}

/* ============ Cursor ============ */
@media (pointer: fine) {
  body { cursor: none; }
  body a, body button, body [data-cursor] { cursor: none; }
}
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
/* the "packet" — a glowing data unit that points where it travels */
.cursor-dot {
  width: 14px; height: 10px;
  background: var(--lime);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(212, 255, 63, 0.8), 0 0 30px rgba(212, 255, 63, 0.3);
}
.cursor-dot::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid var(--lime);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
/* trail of packets behind the cursor */
.cursor-trail {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  background: var(--lime);
  border-radius: 2px;
  transform: translate(-50%, -50%);
}
/* click = ping */
.cursor-ping {
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  width: 14px; height: 14px;
  border: 1.5px solid var(--lime);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pingOut 0.7s var(--ease) forwards;
}
.cursor-ping::after {
  content: 'ping';
  position: absolute;
  top: -20px; left: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--lime);
  animation: pingFade 0.7s ease-out forwards;
}
@keyframes pingOut {
  from { opacity: 0.9; scale: 1; }
  to { opacity: 0; scale: 5; }
}
@keyframes pingFade {
  from { opacity: 1; }
  to { opacity: 0; }
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(212, 255, 63, 0.55);
  border-radius: 50%;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  background: rgba(212, 255, 63, 0.12);
  border-color: var(--lime);
}
.cursor-ring.is-view {
  width: 86px; height: 86px;
  background: rgba(212, 255, 63, 0.95);
  border-color: transparent;
  mix-blend-mode: difference;
}
.cursor-ring.is-view::after {
  content: 'VIEW';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: #0b0c10;
}
@media (pointer: coarse) { .cursor-dot, .cursor-ring, .cursor-trail, .cursor-ping { display: none; } }

/* ============ Grain + blobs ============ */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-30px, 20px); }
  50% { transform: translate(20px, -30px); }
  75% { transform: translate(-20px, -10px); }
  100% { transform: translate(0, 0); }
}
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.blob-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(212, 255, 63, 0.35), transparent 70%);
  top: -120px; right: -100px;
  animation: drift 16s ease-in-out infinite alternate;
}
.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.4), transparent 70%);
  bottom: -140px; left: -120px;
  animation: drift 20s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 50px) scale(1.15); }
}

/* ============ Layout helpers ============ */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 3; }

.outline, .outline-text {
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}

/* ============ Navbar ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(11, 12, 16, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-star { color: var(--lime); animation: spin 6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo-ccie {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
}
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  position: relative;
  transition: color 0.3s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.nav-link-cta {
  color: #0b0c10 !important;
  background: var(--lime);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  margin-left: 10px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-link-cta::after { display: none; }
.nav-link-cta:hover {
  transform: translateY(-2px) rotate(-2deg);
  box-shadow: 0 10px 30px rgba(212, 255, 63, 0.35);
  background: #e6ff70;
}
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; }

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 3;
  padding: 130px 28px 60px;
  overflow: hidden;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 3;
}

/* --- real photo as duotone backdrop --- */
.hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 58%;
  z-index: 1;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 8%;
  filter: grayscale(18%) contrast(1.05) brightness(0.85) saturate(0.9);
  transform: scale(1.08);
  will-change: transform;
}
.hero-bg-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(212, 255, 63, 0.16), rgba(167, 139, 250, 0.14) 65%, transparent);
  mix-blend-mode: overlay;
}
.hero-bg-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(11, 12, 16, 0.85) 18%, rgba(11, 12, 16, 0.25) 45%, transparent 70%),
    linear-gradient(to top, var(--bg) 2%, transparent 30%),
    linear-gradient(to bottom, rgba(11, 12, 16, 0.7) 0%, transparent 20%);
}

/* entrance animation — staggered blur-in */
.anim-up {
  opacity: 0;
  transform: translateY(46px);
  filter: blur(10px);
  animation: animUp 1.15s var(--ease) forwards;
}
.d1 { animation-delay: 0.1s; } .d2 { animation-delay: 0.22s; } .d3 { animation-delay: 0.36s; }
.d4 { animation-delay: 0.5s; } .d5 { animation-delay: 0.64s; } .d6 { animation-delay: 0.78s; }
@keyframes animUp { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 26px;
}
.pulse-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 255, 63, 0.55); }
  50% { box-shadow: 0 0 0 10px rgba(212, 255, 63, 0); }
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  max-width: 60%;
}
.hero-name .line { display: block; }
.hero-name .outline { -webkit-text-stroke: 2.5px var(--lime); }

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  margin-bottom: 20px;
  min-height: 1.8em;
}
.role-prefix { color: var(--violet); margin-right: 10px; }
#typed-text { color: var(--text); }

.hero-tagline { color: var(--muted); max-width: 480px; margin-bottom: 34px; }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn span, .btn i { position: relative; z-index: 1; transition: color 0.35s var(--ease); }
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.4s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn-primary { background: var(--lime); color: #0b0c10; }
.btn-primary:hover { box-shadow: 0 14px 38px rgba(212, 255, 63, 0.3); }
.btn-primary:hover span, .btn-primary:hover i { color: #0b0c10; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover span { color: #0b0c10; }

.hero-socials { display: flex; gap: 12px; }
.hero-socials a {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.35s var(--ease);
}
.hero-socials a:hover {
  background: var(--lime);
  color: #0b0c10;
  border-color: var(--lime);
  transform: translateY(-5px) rotate(8deg);
  box-shadow: 0 12px 26px rgba(212, 255, 63, 0.3);
}

/* --- floating badge + stickers over the photo --- */
.badge-spin {
  position: absolute;
  top: 16%; right: 6%;
  width: 132px; height: 132px;
  z-index: 2;
  pointer-events: none;
}
.badge-spin svg { width: 100%; height: 100%; animation: spin 14s linear infinite; }
.badge-spin text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 2.5px;
  fill: var(--lime);
}
.badge-star {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--lime);
}
.photo-sticker {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--text);
  color: #0b0c10;
  padding: 9px 16px;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.sticker-1 { top: 52%; right: 24%; --rot: 8deg; background: var(--lime); }
.sticker-2 { top: 70%; right: 6%; --rot: -7deg; background: var(--violet); }

.float-a { animation: floaty 6s ease-in-out infinite; }
.float-b { animation: floaty 5s ease-in-out infinite 0.7s; }
.float-c { animation: floaty 7s ease-in-out infinite 1.3s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-16px) rotate(var(--rot, 0deg)); }
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.scroll-hint span { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ============ Marquee ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: var(--bg-soft);
  position: relative;
  z-index: 3;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}
.marquee-item:hover { color: var(--lime); }
.marquee-sep { color: var(--lime); font-size: 1rem; }
.marquee-footer { border-bottom: none; }
.marquee-footer .marquee-item { font-size: 2rem; }
.marquee-footer .marquee-track { animation-duration: 50s; animation-direction: reverse; }

/* ============ Sections ============ */
.section { padding: 120px 0; position: relative; z-index: 3; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 22px;
  margin-bottom: 60px;
}
.section-index {
  font-family: var(--font-mono);
  color: var(--lime);
  font-size: 0.95rem;
}
.section-title {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  transition: letter-spacing 0.45s var(--ease), transform 0.45s var(--ease);
}
.section-title:hover { letter-spacing: 0.03em; transform: skewX(-4deg); }
.title-dot { color: var(--lime); }

/* Scroll reveal — blur-in for a softer, more premium entrance */
.reveal {
  opacity: 0;
  transform: translateY(52px) scale(0.985);
  filter: blur(12px);
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease),
    filter 1.1s var(--ease);
  will-change: opacity, transform, filter;
}
.reveal.visible { opacity: 1; transform: none; filter: none; }
.skills-grid .reveal:nth-child(2), .cert-grid .reveal:nth-child(2), .stats-row .reveal:nth-child(2) { transition-delay: 0.08s; }
.skills-grid .reveal:nth-child(3), .cert-grid .reveal:nth-child(3), .stats-row .reveal:nth-child(3) { transition-delay: 0.16s; }
.skills-grid .reveal:nth-child(4), .cert-grid .reveal:nth-child(4), .stats-row .reveal:nth-child(4) { transition-delay: 0.24s; }
.skills-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.skills-grid .reveal:nth-child(6) { transition-delay: 0.4s; }

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 54px;
  align-items: center;
  margin-bottom: 70px;
}
.about-text p { color: var(--muted); margin-bottom: 20px; font-size: 1.05rem; }
.about-text p:first-child { color: var(--text); font-size: 1.18rem; }

/* "live feed" — animated illustration with CRT treatment */
.work-scene {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 14px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  transform: rotate(-1.5deg);
}
.work-scene:hover {
  transform: rotate(0deg) translateY(-8px);
  border-color: rgba(212, 255, 63, 0.5);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 255, 63, 0.08);
}
.scene-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.scene-frame img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(1.1) contrast(1.04);
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}
.work-scene:hover .scene-frame img {
  transform: scale(1.05);
  filter: saturate(1.35) contrast(1.08);
}
/* scanlines + travelling refresh band */
.scene-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply;
}
.scene-scan::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 26%;
  background: linear-gradient(180deg, transparent, rgba(212, 255, 63, 0.09), transparent);
  animation: scanBand 4.5s linear infinite;
}
@keyframes scanBand {
  from { top: -30%; }
  to { top: 110%; }
}
.scene-rec {
  position: absolute;
  top: 12px; left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: #fff;
  background: rgba(11, 12, 16, 0.65);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.rec-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ff4d4d;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.scene-cam {
  position: absolute;
  bottom: 12px; right: 12px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(11, 12, 16, 0.65);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.scene-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 12px 6px 4px;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 255, 63, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.stat-card:hover { transform: translateY(-8px) rotate(-1deg); border-color: var(--lime); }
.stat-card:hover::before { opacity: 1; }
.stat-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--lime);
  position: relative;
}
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 6px; position: relative; }

/* ============ Skills ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.skill-card::after {
  content: '';
  position: absolute;
  top: 0; left: -110%;
  width: 90%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(212, 255, 63, 0.07), transparent);
  transform: skewX(-18deg);
  transition: left 0.65s var(--ease);
}
.skill-card:hover::after { left: 120%; }
.skill-card:hover {
  transform: translateY(-10px);
  border-color: rgba(212, 255, 63, 0.55);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}
.skill-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.skill-icon {
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(212, 255, 63, 0.1);
  color: var(--lime);
  font-size: 1.2rem;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.skill-card:hover .skill-icon {
  transform: rotate(-10deg) scale(1.12);
  background: var(--lime);
  color: #0b0c10;
}
.skill-num { font-family: var(--font-mono); color: var(--line); font-size: 1.6rem; font-weight: 600; transition: color 0.4s var(--ease); }
.skill-card:hover .skill-num { color: var(--lime); }
.skill-card h3 { font-size: 1.12rem; margin-bottom: 14px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}
.tag:hover {
  background: var(--lime);
  color: #0b0c10;
  border-color: var(--lime);
  transform: translateY(-2px) rotate(-1.5deg);
}
.tag-lime { color: var(--lime); border-color: rgba(212, 255, 63, 0.4); }

/* ============ Experience ============ */
.job { margin-bottom: 60px; }
.job-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.job-role { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 700; }
.job-company { color: var(--lime); font-family: var(--font-mono); font-size: 0.88rem; margin-top: 6px; }
.job-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.job-summary {
  color: var(--text);
  max-width: 760px;
  border-left: 3px solid var(--lime);
  padding-left: 18px;
  margin-bottom: 36px;
}

.job-list { list-style: none; border-top: 1px solid var(--line); margin-bottom: 30px; }
.job-row {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: padding-left 0.4s var(--ease);
}
.job-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(212, 255, 63, 0.09), transparent 70%);
  transform: translateX(-101%);
  transition: transform 0.45s var(--ease);
}
.job-row:hover { padding-left: 30px; }
.job-row:hover::before { transform: translateX(0); }
.job-row-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lime);
  flex-shrink: 0;
  position: relative;
}
.job-row-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}
.job-row-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  transition: color 0.4s var(--ease), letter-spacing 0.4s var(--ease);
}
.job-row:hover .job-row-lead { color: var(--lime); letter-spacing: 0.035em; }
.job-row-text { color: var(--muted); font-size: 0.93rem; position: relative; transition: color 0.4s var(--ease); }
.job-row:hover .job-row-text { color: var(--text); }
.job-row-arrow {
  color: var(--lime);
  font-size: 1.1rem;
  opacity: 0;
  transform: translate(-12px, 8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  position: relative;
}
.job-row:hover .job-row-arrow { opacity: 1; transform: translate(0, 0); }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============ Certifications ============ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}
/* 3D flip cards: front = badge, back = stylized certificate */
.cert-card {
  position: relative;
  height: 340px;
  perspective: 1300px;
}
.cert-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease);
}
.cert-card:hover .cert-inner,
.cert-card.flipped .cert-inner { transform: rotateY(180deg); }

.cert-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 20px;
  overflow: hidden;
}
.cert-front { background: var(--surface); }
.cert-icon {
  width: 56px; height: 56px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.13);
  color: var(--violet);
  font-size: 1.35rem;
}
.cert-front h3 { font-size: 0.95rem; margin-bottom: 8px; }
.cert-front p { font-size: 0.8rem; color: var(--muted); }
.cert-flip-hint {
  position: absolute;
  bottom: 13px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}
.cert-featured .cert-front { border-color: rgba(212, 255, 63, 0.5); }
.cert-featured .cert-icon { background: rgba(212, 255, 63, 0.14); color: var(--lime); }
.cert-badge {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0b0c10;
  background: var(--lime);
  padding: 5px 13px;
  border-radius: 999px;
}

/* the certificate side */
.cert-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 80% 12%, rgba(212, 255, 63, 0.1), transparent 45%),
    linear-gradient(165deg, #181a22, #0e0f14);
  border-color: rgba(212, 255, 63, 0.6);
  gap: 6px;
}
.cert-back::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(212, 255, 63, 0.45);
  border-radius: 13px;
  pointer-events: none;
}
.cert-issuer {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
  color: var(--lime);
}
.cert-word {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.cert-back h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  line-height: 1.3;
  margin: 8px 0 4px;
}
.cert-to { font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted); }
.cert-holder {
  font-family: 'Caveat', cursive;
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  border-bottom: 1px solid rgba(242, 240, 234, 0.25);
  padding: 0 14px 6px;
}
.cert-detail {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--lime);
  margin-top: 6px;
}
.cert-seal {
  position: absolute;
  bottom: 18px; right: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #0b0c10;
  background: conic-gradient(from 0deg, var(--lime), #8ab82e, var(--lime), #e6ff70, var(--lime));
  box-shadow: 0 0 20px rgba(212, 255, 63, 0.4);
  animation: spin 12s linear infinite;
}

/* Education rows */
.edu-list { border-top: 1px solid var(--line); }
.edu-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px 14px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease), background 0.4s var(--ease);
}
.edu-row:hover { padding-left: 30px; background: rgba(212, 255, 63, 0.04); }
.edu-degree { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.edu-school { color: var(--muted); font-size: 0.88rem; }
.edu-period { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

/* ============ Contact ============ */
.section-contact { padding-bottom: 100px; }
.contact-big { text-align: center; padding: 30px 0 10px; }
.contact-giant {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 11rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.5s var(--ease);
}
.contact-giant .outline {
  -webkit-text-stroke: 3px var(--lime);
  transition: color 0.45s var(--ease);
}
.contact-giant:hover { transform: scale(1.03) rotate(-1deg); }
.contact-giant:hover .outline { color: var(--lime); }
.contact-arrow {
  display: inline-block;
  color: var(--lime);
  transition: transform 0.45s var(--ease);
}
.contact-giant:hover .contact-arrow { transform: translate(14px, -14px) rotate(8deg); }
.contact-sub { color: var(--muted); font-family: var(--font-mono); font-size: 0.85rem; margin: 26px 0 34px; }
.contact-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.contact-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 14px 26px;
  border-radius: 999px;
  transition: all 0.35s var(--ease);
}
.contact-link:hover {
  background: var(--lime);
  color: #0b0c10;
  border-color: var(--lime);
  transform: translateY(-4px) rotate(-1.5deg);
  box-shadow: 0 14px 32px rgba(212, 255, 63, 0.28);
}

/* Honeypot — off-screen, never visible to real visitors */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form {
  max-width: 640px;
  margin: 60px auto 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-row input,
.form-row textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(212, 255, 63, 0.15);
}
.cf-turnstile { display: flex; justify-content: center; }
.form-footer { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.form-status { font-family: var(--font-mono); font-size: 0.85rem; min-height: 1.2em; }
.form-status.ok { color: var(--lime); }
.form-status.err { color: var(--pink); }

/* ============ 3D world canvas (fixed behind everything) ============ */
#world3d {
  position: fixed;
  top: 0; left: 0;
  z-index: 1;
  pointer-events: none;
}

/* ============ Outro video (bonus footage) ============ */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.outro {
  position: relative;
  max-width: 780px;
  margin: 100px auto 0;
}
/* dotted topology glow behind the frame */
.outro-glow {
  position: absolute;
  inset: -70px -90px;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at center, rgba(212, 255, 63, 0.09), rgba(167, 139, 250, 0.05) 45%, transparent 70%),
    radial-gradient(rgba(242, 240, 234, 0.1) 1px, transparent 1.5px);
  background-size: 100% 100%, 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 72%);
}
/* travelling light running around the border */
.outro-border {
  position: relative;
  padding: 2px;
  border-radius: 24px;
  background:
    conic-gradient(from var(--angle),
      transparent 0%,
      rgba(212, 255, 63, 0.9) 8%,
      rgba(167, 139, 250, 0.7) 16%,
      transparent 26%,
      transparent 50%,
      rgba(167, 139, 250, 0.5) 58%,
      rgba(212, 255, 63, 0.7) 66%,
      transparent 76%);
  animation: borderSpin 5.5s linear infinite;
  transform: rotate(-1deg);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
@keyframes borderSpin { to { --angle: 360deg; } }
.outro:hover .outro-border {
  transform: rotate(0deg) translateY(-8px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 50px rgba(212, 255, 63, 0.12);
}
.outro-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-soft);
}
.outro-frame video {
  width: 100%;
  display: block;
}
/* HUD corner brackets */
.hud {
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid var(--lime);
  z-index: 2;
  pointer-events: none;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  opacity: 0.85;
}
.hud-tl { top: -12px; left: -12px; border-right: none; border-bottom: none; }
.hud-tr { top: -12px; right: -12px; border-left: none; border-bottom: none; }
.hud-bl { bottom: 26px; left: -12px; border-right: none; border-top: none; }
.hud-br { bottom: 26px; right: -12px; border-left: none; border-top: none; }
.outro:hover .hud { opacity: 1; }
.outro:hover .hud-tl { transform: translate(-6px, -6px); }
.outro:hover .hud-tr { transform: translate(6px, -6px); }
.outro:hover .hud-bl { transform: translate(-6px, 6px); }
.outro:hover .hud-br { transform: translate(6px, 6px); }

/* ============ Footer ============ */
.footer {
  padding: 30px 0 36px;
  text-align: center;
  position: relative;
  z-index: 3;
}
.footer p { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.footer .fa-python { color: var(--lime); }

/* ============ Responsive ============ */
@media (max-width: 1020px) {
  .hero-bg { width: 100%; opacity: 0.3; }
  .hero-name { max-width: none; }
  .badge-spin { top: 13%; right: 5%; width: 104px; height: 104px; }
  .sticker-1 { top: 24%; right: 10%; }
  .sticker-2 { top: 78%; right: 8%; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 78px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(11, 12, 16, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px;
    transform: translateY(-130%);
    transition: transform 0.45s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link-cta { margin: 10px 0 0; text-align: center; }
  .logo-ccie { display: none; }
  .skills-grid, .cert-grid { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
  .edu-row { grid-template-columns: 1fr; gap: 4px; }
  .badge-spin { width: 84px; height: 84px; }
  .photo-sticker { display: none; }
  .job-row { gap: 14px; }
  .marquee-footer .marquee-item { font-size: 1.3rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .anim-up { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  body, body a, body button, body [data-cursor] { cursor: auto; }
  .cursor-dot, .cursor-ring, .cursor-trail, .cursor-ping { display: none; }
}
