/* =========================================================
   Subhakrit Rajbhandari — Portfolio
   Static stylesheet — dark premium cybersecurity theme
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — dark premium charcoal */
  --ink-950: #06090d;
  --ink-900: #0b0f14;
  --ink-850: #0e141c;
  --ink-800: #111827;
  --ink-700: #1a2432;
  --ink-600: #263247;

  /* Soft blue / cyan accents */
  --accent-300: #7dd3fc;
  --accent-400: #38bdf8;
  --accent-500: #0ea5e9;
  --accent-600: #0284c7;
  --glow: #22d3ee;

  /* Neutrals */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;

  /* Typography */
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Elevation */
  --shadow-soft: 0 10px 40px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 40px -8px rgba(56, 189, 248, 0.35);
  --shadow-card: 0 1px 0 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 40px -16px rgba(0, 0, 0, 0.6);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--slate-200);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  line-height: 1.5;
}

body.is-loading {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: rgba(56, 189, 248, 0.25);
  color: #f0f9ff;
}

/* Slim, subtle scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--ink-900);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--ink-600), var(--ink-700));
  border-radius: 9999px;
  border: 2px solid var(--ink-900);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-600);
}

/* ---------- Utilities ---------- */
.text-gradient {
  background-image: linear-gradient(92deg, #7dd3fc 0%, #38bdf8 45%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.text-gradient {
  background-size: 200% auto;
  animation: gradient-shift 8s var(--ease) infinite;
}

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.glass-strong {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.85), rgba(11, 15, 20, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.card-surface {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.border-gradient {
  background:
    linear-gradient(var(--ink-850), var(--ink-850)) padding-box,
    linear-gradient(
        140deg,
        rgba(125, 211, 252, 0.55),
        rgba(59, 130, 246, 0.12) 40%,
        rgba(255, 255, 255, 0.05) 70%
      )
      border-box;
  border: 1px solid transparent;
}

.mask-fade-b {
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}

/* ---------- Fixed ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 20% 8%, rgba(14, 165, 233, 0.1), transparent 42%),
    radial-gradient(circle at 85% 30%, rgba(34, 211, 238, 0.06), transparent 42%),
    radial-gradient(circle at 50% 92%, rgba(2, 132, 199, 0.08), transparent 46%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(125, 211, 252, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 72%);
  animation: grid-pan 18s linear infinite;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

@keyframes grid-pan {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 56px 56px;
  }
}

/* ---------- Loading screen ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink-900);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.loader.is-done {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.loader__mark {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--slate-100);
  box-shadow: var(--shadow-glow);
  animation: loader-in 0.55s var(--ease) both;
}

@keyframes loader-in {
  from {
    opacity: 0;
    transform: scale(0.85) rotate(-6deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.loader__bar {
  position: relative;
  margin-top: 1.75rem;
  width: 11rem;
  height: 2px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: loader-fade 0.4s ease 0.25s both;
}

.loader__bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--accent-500), var(--accent-400), var(--glow));
  animation: bar 1.1s ease-in-out infinite;
}

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

@keyframes bar {
  0% {
    transform: translateX(-150%);
  }
  100% {
    transform: translateX(350%);
  }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 60;
  background: linear-gradient(to right, var(--accent-500), var(--accent-400), var(--glow));
  transition: width 0.1s linear;
}

/* ---------- Custom cursor (fine-pointer devices only) ---------- */
html.has-cursor,
html.has-cursor * {
  cursor: none !important;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-400);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
}

.cursor-ring.is-active {
  width: 56px;
  height: 56px;
  border-color: rgba(56, 189, 248, 0.9);
}

html.has-cursor .cursor-dot,
html.has-cursor .cursor-ring {
  opacity: 1;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  position: relative;
  padding-block: clamp(2rem, 4vw, 3.25rem);
  scroll-margin-top: 6rem;
}

.section--compact {
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
}

/* ---------- Section heading ---------- */
.section-heading__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-heading__eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: linear-gradient(to right, var(--accent-400), transparent);
}

.section-heading__eyebrow span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-400);
}

.section-heading h2 {
  margin: 1rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--slate-100);
}

.section-heading p {
  margin: 1.25rem 0 0;
  max-width: 42rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  color: var(--slate-400);
}

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  border-radius: 0.75rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, var(--accent-500), var(--accent-600));
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--slate-200);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--slate-100);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(14, 165, 233, 0.12);
  box-shadow: var(--shadow-glow);
}

.btn-text {
  color: var(--slate-400);
}

.btn-text:hover {
  transform: translateY(-2px);
  color: var(--accent-400);
}

.btn .arrow {
  transition: transform 0.3s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.btn:hover .send {
  transform: translate(2px, -2px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent-300);
  border-radius: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  transform: translateY(-2px);
  background: rgba(14, 165, 233, 0.2);
  color: var(--accent-200);
}

.btn-accent svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.btn-accent:hover svg {
  transform: translateX(3px) translateY(-1px);
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: all 0.5s ease;
}

.nav.is-scrolled {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.85), rgba(11, 15, 20, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.nav__inner {
  max-width: 72rem;
  margin-inline: auto;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo__mark {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  color: var(--accent-400);
  box-shadow: var(--shadow-glow);
}

.logo__mark svg {
  width: 18px;
  height: 18px;
}

.logo__text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-200);
}

.nav__links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  position: relative;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--slate-400);
  transition: color 0.3s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--slate-100);
}

.nav__link .pill {
  position: absolute;
  inset: 0;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav__link.is-active .pill {
  opacity: 1;
}

.nav__link .label {
  position: relative;
}

.nav__burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--slate-200);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav__burger svg {
  width: 20px;
  height: 20px;
}

.nav__mobile {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.92), rgba(11, 15, 20, 0.95));
  backdrop-filter: blur(18px);
}

.nav__mobile.is-open {
  display: block;
  animation: nav-drop 0.3s var(--ease) both;
}

@keyframes nav-drop {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 24rem;
  }
}

.nav__mobile .nav__mobile-inner {
  padding: 1rem 1.25rem;
}

.nav__mobile a.nav__mobile-link {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--slate-300);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav__mobile a.nav__mobile-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }
  .nav__burger {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nav__link {
    padding: 0.5rem 0.5rem;
    font-size: 0.8125rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero__grid {
  max-width: 72rem;
  margin-inline: auto;
  padding: 8rem clamp(1.25rem, 4vw, 2rem) 4rem;
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    padding-top: 10rem;
  }
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pulse {
  position: relative;
  width: 10px;
  height: 10px;
  flex: none;
}

.pulse i {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--emerald-400);
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse i.solid {
  animation: none;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.hero__role-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.hero__role-tag--cmd {
  display: inline-flex;
  align-items: center;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--slate-200);
  font-size: 0.75rem;
  font-weight: 400;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}

.hero__role-tag--cmd .prompt {
  color: var(--slate-200);
  margin-right: 0.4rem;
}

.hero__role-tag--cmd::after {
  content: "";
  align-self: flex-end;
  width: 0.6em;
  height: 0.12em;
  margin-left: 0.25em;
  margin-bottom: 0.1em;
  border-radius: 999px;
  background: currentColor;
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.hero__name {
  margin: 1.5rem 0 0;
  font-size: clamp(1.5rem, 6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--slate-50);
}

.hero__title {
  margin: 1.25rem 0 0;
  font-family: var(--font-mono);
  font-size: clamp(0.875rem, 2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-400);
}

.hero__intro {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  text-align: justify;
  hyphens: none;
  color: var(--slate-400);
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.hero__stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
}

.stat {
  min-width: 0;
  background: rgba(11, 15, 20, 0.9);
  padding: 1.25rem 1rem;
  text-align: center;
}

.stat dd,
.stat dt {
  margin: 0;
}

.stat__value {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--slate-100);
}

.stat__label {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--slate-500);
}

/* Hero visual */
.hero__visual {
  position: relative;
  margin-inline: auto;
  width: fit-content;
}

.hero__glow {
  position: absolute;
  inset: -2rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.1);
  filter: blur(48px);
}

.avatar-frame {
  position: relative;
  padding: 8px;
  border-radius: 2rem;
  box-shadow: var(--shadow-glow);
}

.avatar-frame img {
  border-radius: 1.5rem;
  background: var(--ink-900);
  width: 300px;
  height: 300px;
  object-fit: cover;
}

@media (min-width: 640px) {
  .avatar-frame img {
    width: 380px;
    height: 380px;
  }
}

.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  box-shadow: var(--shadow-soft);
  animation: chip-float 6s var(--ease) infinite;
}

.chip--tl {
  top: 2rem;
  right: -0.75rem;
  animation-delay: 0s;
}

.chip--bl {
  bottom: 2.5rem;
  left: -0.75rem;
  animation-delay: 3s;
}

@keyframes chip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (min-width: 640px) {
  .chip--tl {
    right: -1.5rem;
  }
  .chip--bl {
    left: -1.5rem;
  }
}

.chip__icon {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-400);
}

.chip__icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.chip__title {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--slate-100);
}

.hero__manual {
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 20, 28, 0.8);
  border-radius: 999px;
  padding: 0.375rem 1rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-400);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.hero__manual svg {
  width: 14px;
  height: 14px;
  color: var(--accent-400);
}

.hero__manual .accent {
  color: var(--accent-400);
}

/* ---------- Mono title ---------- */
.mono-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-400);
}

/* ---------- Tags / pills ---------- */
.tag-pill {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tag-pill--accent {
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-300);
}

.tag-pill--mono {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--slate-400);
}

/* ---------- Expertise ---------- */
.expertise__grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .expertise__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .expertise__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.expertise-card {
  position: relative;
  overflow: hidden;
  height: 100%;
  padding: 1.5rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.expertise-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-glow);
}

.expertise-card .glow-dot {
  position: absolute;
  top: -2.5rem;
  right: -2.5rem;
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0);
  filter: blur(32px);
  transition: background 0.5s ease;
  pointer-events: none;
}

.expertise-card:hover .glow-dot {
  background: rgba(14, 165, 233, 0.15);
}

.expertise-card__icon {
  position: relative;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent-400);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.expertise-card:hover .expertise-card__icon {
  transform: scale(1.1);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.12);
}

.expertise-card__icon svg {
  width: 22px;
  height: 22px;
}

.expertise-card h3 {
  position: relative;
  margin: 1.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--slate-100);
}

.expertise-card p {
  position: relative;
  margin: 0.625rem 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--slate-400);
}

/* ---------- Experience ---------- */
.experience__track {
  position: relative;
  margin-top: 3rem;
}

.experience__line {
  position: absolute;
  left: 19px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, rgba(14, 165, 233, 0.5), rgba(255, 255, 255, 0.1), transparent);
}

@media (min-width: 640px) {
  .experience__line {
    left: 23px;
  }
}

.experience__items {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.exp-item {
  position: relative;
  padding-left: 3.5rem;
}

@media (min-width: 640px) {
  .exp-item {
    padding-left: 5rem;
  }
}

.exp-item__marker {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: var(--ink-850);
  color: var(--accent-400);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-glow);
}

@media (min-width: 640px) {
  .exp-item__marker {
    width: 3rem;
    height: 3rem;
  }
}

.exp-item__marker svg {
  width: 18px;
  height: 18px;
}

@media (min-width: 640px) {
  .exp-item__marker svg {
    width: 20px;
    height: 20px;
  }
}

.exp-card {
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

@media (min-width: 640px) {
  .exp-card {
    padding: 2rem;
  }
}

.exp-card:hover {
  border-color: rgba(56, 189, 248, 0.2);
}

.exp-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.exp-card h3 {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--slate-100);
}

.exp-card__period {
  margin-left: auto;
}

.exp-card__org {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-400);
}

.exp-card__summary {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--slate-400);
}

@media (min-width: 640px) {
  .exp-card__summary {
    font-size: 1rem;
  }
}

.exp-card__body {
  margin-top: 1.5rem;
}

.exp-list {
  display: grid;
  gap: 0.625rem;
  list-style: none;
  padding: 0;
}

@media (min-width: 640px) {
  .exp-list {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
  }
}

.exp-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-300);
}

.exp-list li svg {
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  flex: none;
  color: var(--accent-400);
}

.exp-card__resp {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-card__resp .exp-card__resp-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--slate-200);
}

.resp-tags {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.resp-tag {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--slate-300);
  transition: all 0.3s ease;
}

.resp-tag:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.1);
  color: var(--slate-100);
}

/* ---------- Education ---------- */
.education__grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .education__grid {
    grid-template-columns: 1fr;
  }
}

.edu-card {
  height: 100%;
  padding: 2rem;
  border-radius: 1.5rem;
}

@media (min-width: 640px) {
  .edu-card {
    padding: 2.5rem 2.75rem;
  }
}

.edu-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.edu-card__head .mono-title {
  margin: 0;
}

.edu-line {
  position: absolute;
  left: 21px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, rgba(14, 165, 233, 0.45), rgba(255, 255, 255, 0.06), transparent);
}

@media (min-width: 768px) {
  .edu-line {
    left: 22px;
  }
}

.edu-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.edu-stage {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.edu-stage__body {
  flex: 1;
  min-width: 0;
}

.edu-stage__marker {
  position: relative;
  z-index: 1;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: var(--ink-850);
  color: var(--accent-400);
  border-radius: 0.875rem;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, color 0.3s ease;
}

.edu-stage:hover .edu-stage__marker {
  transform: scale(1.08) rotate(-3deg);
  border-color: rgba(56, 189, 248, 0.55);
  color: var(--accent-300);
}

.edu-stage__marker svg {
  width: 20px;
  height: 20px;
}

.edu-stage .badge-level {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.edu-stage h3 {
  margin: 0.625rem 0 0;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--slate-100);
}

.edu-stage__field {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--accent-400);
}

/* ---------- Skills ---------- */
.skills__grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skill-card {
  height: 100%;
  padding: 1.5rem;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.skill-card:hover {
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: var(--shadow-glow);
}

.skill-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-400);
}

.skill-card__icon svg {
  width: 18px;
  height: 18px;
}

.skill-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--slate-100);
}

.skill-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.skill__row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.skill__name {
  color: var(--slate-300);
}

.skill__level {
  font-family: var(--font-mono);
  color: var(--slate-500);
}

.skill__track {
  margin-top: 0.5rem;
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.skill__fill {
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--accent-600), var(--accent-400), var(--glow));
  transition: width 1.1s var(--ease);
}

/* ---------- Certifications ---------- */
.certs__grid {
  margin-top: 3rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .certs__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cert-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.75rem 2rem;
  border-radius: 1.5rem;
  transition: all 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-glow);
}

.cert-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cert-card__icon {
  width: 3rem;
  height: 3rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-400);
  box-shadow: var(--shadow-glow);
}

.cert-card__icon svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s var(--ease);
}

.cert-card:hover .cert-card__icon svg {
  transform: scale(1.12) rotate(-3deg);
}

.cert-card__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--slate-100);
}

.cert-card__title svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: var(--accent-400);
}

.cert-card__org {
  margin-top: 0.125rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--accent-400);
}

.cert-card .text {
  margin: 1.25rem 0 0;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--slate-400);
}

.cert-card__foot {
  margin-top: 1.5rem;
}

/* ---------- Contact ---------- */
.contact__grid {
  margin-top: 3rem;
  display: grid;
  gap: 2rem;
}

.channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .channels {
    grid-template-columns: repeat(4, 1fr);
  }
}

.channel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1.25rem 1rem;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.channel:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: var(--shadow-glow);
}

.channel__icon {
  width: 3.25rem;
  height: 3.25rem;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent-400);
  transition: transform 0.3s ease;
}

.channel:hover .channel__icon {
  transform: scale(1.05);
}

.channel__icon svg {
  width: 26px;
  height: 26px;
}

.channel__body {
  min-width: 0;
}

.channel__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-300);
}

@media (min-width: 640px) {
  .channels {
    gap: 1rem;
  }
}

.form-intro {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.form-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 1.75rem 2.25rem;
  background: rgba(14, 20, 28, 0.8);
}

.form-wrap .glow-deco {
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 10rem;
  height: 10rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.1);
  filter: blur(48px);
  pointer-events: none;
}

.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-400);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--slate-100);
  outline: none;
  transition: all 0.3s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--slate-500);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.field textarea {
  resize: none;
}

.form-success {
  display: none;
  min-height: 340px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.form-success.is-visible {
  display: flex;
}

.form-success__icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald-400);
  box-shadow: var(--shadow-glow);
  animation: pop 0.5s var(--ease) both;
}

.form-success__icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.form-success h3 {
  margin: 1.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--slate-100);
}

.form-success p {
  margin: 0.5rem 0 0;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--slate-400);
}

@keyframes pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.btn-send {
  align-self: flex-start;
}

.btn-send:disabled {
  opacity: 0.7;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0;
}

.footer__inner {
  max-width: 72rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.footer__bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 20, 28, 0.8);
  color: var(--slate-300);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: all 0.5s ease;
}

.back-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-top:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-400);
}

.back-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- Hidden SVG sprite ---------- */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Subtle ambient animations ---------- */
@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.hero__glow {
  animation: float-y 9s ease-in-out infinite;
}

.expertise-card .glow-dot {
  animation: breathe 6s ease-in-out infinite;
}

/* ---------- Small screens ---------- */
@media (max-width: 379px) {
  .avatar-frame img {
    width: 260px;
    height: 260px;
  }

  .chip--tl {
    right: -0.25rem;
    top: 1.25rem;
  }

  .chip--bl {
    left: -0.25rem;
    bottom: 2rem;
  }

  .stat {
    padding: 1rem 0.75rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
