/*
  Personal Page Styles
  - Responsive layout
  - Animated background system (mesh / waves / particles) - using particles globally
  - Scroll reveal + hover tilt
  - Prefers-reduced-motion respected
*/

:root {
  --bg: #05080f;
  --bg-elev: #0b142a;
  --text: #eef4ff;
  --muted: #a7b8e6;
  --accent-1: #00e5ff;
  --accent-2: #00ffb0;
  --accent-3: #4f7bff;
  --card: rgba(12, 20, 40, 0.72);
  --border: rgba(0,229,255,0.2);
  --shadow: rgba(3, 8, 20, 0.7);
  --grid: rgba(0, 229, 255, 0.05);
  --surface-1: rgba(12, 20, 40, 0.72);
  --surface-2: rgba(10, 22, 44, 0.9);
  --surface-3: rgba(9, 18, 36, 0.95);
  --glow: rgba(0, 229, 255, 0.22);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(1000px 600px at 80% -10%, #0e1a36 0%, var(--bg) 60%),
    radial-gradient(900px 700px at 10% 110%, rgba(0, 229, 255, 0.08), transparent 65%);
  background-size: 24px 24px, 24px 24px, auto, auto;
  background-attachment: fixed, fixed, fixed, fixed;
  animation: bg-pan 120s linear infinite;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
::selection { background: rgba(0,229,255,0.28); color: #04131b; }
@keyframes bg-pan {
  0% {
    background-position:
      0px 0px,
      0px 0px,
      80% -10%;
  }
  35% {
    background-position:
      120px 60px,
      -100px 40px,
      76% 5%;
  }
  70% {
    background-position:
      -90px 30px,
      140px 80px,
      72% -6%;
  }
  100% {
    background-position:
      0px 0px,
      0px 0px,
      80% -10%;
  }
}

/* Keep anchored sections from hiding under the sticky header */
main section[id]{
  scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px));
}

@supports (content-visibility: auto) {
  main section,
  .site-footer {
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
  }
}

/* Skip link: hidden until keyboard focus */
.skip-link{
  position: fixed;
  left: 1rem;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  padding: .5rem .75rem;
  background: var(--bg-elev);
  color: var(--text);
  border-radius: .5rem;
  box-shadow: 0 0 0 2px rgba(0,229,255,.35);
  z-index: 10000;
  transform: translateY(-200%);
  transition: transform .2s ease;
}
.skip-link:focus-visible{ transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Animated background system ===== */
.bg-layer { position: fixed; inset: -10% -10% -10% -10%; z-index: -3; pointer-events: none; }
.bg-layer { opacity: 0; transition: opacity .6s ease; }
body[data-bg="mesh"] .bg-mesh,
body[data-bg="waves"] .bg-waves,
body[data-bg="particles"] .bg-particles,
body[data-bg="aurora"] .bg-aurora { opacity: 1; }

/* Gradient Mesh (CSS-only) */
.bg-mesh {
  filter: blur(40px) saturate(130%);
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(0,229,255,.20), transparent 60%),
    radial-gradient(800px 520px at 80% 40%, rgba(0,255,157,.18), transparent 60%),
    radial-gradient(620px 480px at 50% 90%, rgba(79,123,255,.20), transparent 60%);
  animation: mesh-pan 18s ease-in-out infinite alternate;
}
@keyframes mesh-pan {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%; }
  50%  { background-position: 10% 5%, -6% 4%, 4% 8%; }
  100% { background-position: -6% 4%, 8% 6%, -4% -6%; }
}

/* Waves / Particles canvases (drawn via JS) */
.bg-waves { z-index: -4; }
.bg-particles { z-index: -5; }

.bg-aurora {
  z-index: -4;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 16% 20%, rgba(0,229,255,0.24), transparent 65%),
    radial-gradient(65% 55% at 82% 32%, rgba(79,123,255,0.28), transparent 68%),
    radial-gradient(70% 70% at 52% 82%, rgba(0,255,157,0.24), transparent 70%);
  background-size: 150% 150%, 160% 160%, 140% 140%;
  background-repeat: no-repeat;
  animation: aurora-pan 32s ease-in-out infinite alternate;
  opacity: 0.9;
  will-change: background-position;
}
.bg-aurora::before,
.bg-aurora::after {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(45% 55% at 28% 44%, rgba(0,229,255,0.18), transparent 65%),
    radial-gradient(52% 48% at 72% 58%, rgba(79,123,255,0.2), transparent 70%);
  background-size: 120% 120%, 110% 110%;
  background-repeat: no-repeat;
  opacity: 0.42;
  transform-origin: center;
  will-change: transform;
}
.bg-aurora::before {
  animation: aurora-sway 40s cubic-bezier(0.55, 0, 0.45, 1) infinite;
}
.bg-aurora::after {
  animation: aurora-sway 46s cubic-bezier(0.55, 0, 0.45, 1) infinite reverse;
  opacity: 0.32;
}
@keyframes aurora-pan {
  0% {
    background-position:
      10% 20%,
      90% 10%,
      40% 90%;
  }
  50% {
    background-position:
      55% 35%,
      70% 40%,
      60% 60%;
  }
  100% {
    background-position:
      90% 80%,
      20% 65%,
      75% 25%;
  }
}
@keyframes aurora-sway {
  0%   { transform: rotate(0deg) scale(1) translate3d(0, 0, 0); }
  50%  { transform: rotate(6deg) scale(1.04) translate3d(2%, -3%, 0); }
  100% { transform: rotate(-6deg) scale(1.02) translate3d(-2%, 3%, 0); }
}

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="2" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/><feComponentTransfer><feFuncA type="linear" slope="0.08"/></feComponentTransfer></filter><rect width="120" height="120" filter="url(%23n)"/></svg>');
  opacity: 0.12;
  mix-blend-mode: soft-light;
  z-index: -1;
  pointer-events: none;
}

/* Remove legacy layers if present */
.bg-stars, .bg-scan { display: none !important; }

/* Reduced motion: keep static mesh & disable canvases */
@media (prefers-reduced-motion: reduce) {
  body { animation: none !important; }
  .bg-mesh { animation: none !important; }
  .bg-aurora { animation: none !important; }
  .bg-aurora::before,
  .bg-aurora::after { animation: none !important; transform: none !important; }
  .bg-waves, .bg-particles { display: none !important; }
}

.container { width: min(1100px, 92%); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(to bottom, rgba(15,21,41,0.85), rgba(15,21,41,0.25));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(5, 10, 24, 0.45);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { backdrop-filter: saturate(140%) blur(8px); }
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 18px; position: relative; }
.menu { display: flex; align-items: center; gap: 8px; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 18, 36, 0.6);
  color: var(--text);
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.menu-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle .bar + .bar { margin-top: 4px; }
.menu-toggle.is-active {
  background: rgba(0,229,255,0.12);
  box-shadow: 0 8px 20px rgba(0,229,255,0.16);
}
.menu-toggle.is-active .bar:nth-of-type(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-of-type(2) { opacity: 0; transform: translateX(6px); }
.menu-toggle.is-active .bar:nth-of-type(3) { transform: translateY(-6px) rotate(-45deg); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-logo { display: none; width: 36px; height: 36px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,229,255,0.25) inset; }
.brand-badge {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  background-size: 200% 200%;
  animation: gradient-pan 6s ease-in-out infinite alternate;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0,229,255,0.25) inset, 0 8px 20px rgba(0,229,255,0.15);
}
.brand-text { font-weight: 700; letter-spacing: 0.3px; font-family: 'ADLaM Display', Inter, sans-serif; }

/* Prefer logo image when loaded */
.brand.logo-loaded .brand-logo { display: block; }
.brand.logo-loaded .brand-badge { display: none; }

.menu a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.menu a + a { margin-left: 0; }
.menu a:hover {
  color: var(--text);
  background: rgba(0,229,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,0.2);
  text-shadow: 0 0 8px rgba(0,229,255,0.35);
}
.menu a[aria-current="page"] {
  color: var(--text);
  background: rgba(0,229,255,0.12);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,0.28);
}
.menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,229,255,0), rgba(0,229,255,0.9), rgba(0,229,255,0));
}
/* Focus styles */
:focus:not(:focus-visible) { outline: none; }
.brand:focus-visible, .menu a:focus-visible, .menu-toggle:focus-visible, .btn:focus-visible, .card:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(0,229,255,0.35);
  border-color: rgba(0,229,255,0.45);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 36px;
  padding: 96px 0 72px;
  min-height: 65vh;
  position: relative;
  align-items: stretch;
}
.hero-main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 620px;
}
.hero-right {
  display: grid;
  gap: 1.2rem;
  align-content: start;
  margin-left: auto;
  width: 100%;
  max-width: 440px;
}
.project-card,
.status-panel {
  position: relative;
  background: linear-gradient(160deg, rgba(12, 22, 44, 0.82), rgba(10, 18, 36, 0.7));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
  box-shadow: 0 24px 52px rgba(7, 12, 26, 0.45);
  backdrop-filter: blur(10px);
  transition: border-color .2s ease, transform .2s ease;
}
.project-card:hover,
.status-panel:hover {
  border-color: rgba(0,229,255,0.35);
  transform: translateY(-2px);
}
.project-glow,
.status-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(closest-side, rgba(0, 229, 255, 0.22), rgba(0, 0, 0, 0));
  filter: blur(20px);
  pointer-events: none;
  animation: hero-glow-float 9s ease-in-out infinite;
}
.status-glow {
  inset: auto auto -45% -30%;
  width: 280px;
  height: 280px;
  background: radial-gradient(closest-side, rgba(79, 123, 255, 0.22), rgba(0, 0, 0, 0));
}
@keyframes hero-glow-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
.project-head h3 {
  margin: .2rem 0 .1rem;
  font-size: 1.25rem;
  line-height: 1.2;
}
.project-head p {
  margin: 0;
  color: #b5c2ff;
  font-size: .95rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,255,213,0.9) 0%, rgba(79,123,255,0.95) 100%);
  color: #04131b;
  font-weight: 700;
  letter-spacing: .3px;
}
.project-media {
  margin: .9rem 0;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px dashed rgba(0,229,255,0.22);
  display: grid;
  place-items: center;
  background: var(--surface-3);
}
.media-fallback {
  font-size: .85rem;
  color: #9ab4ff;
  opacity: .8;
}
.stack {
  list-style: none;
  padding: 0;
  margin: .5rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.stack li {
  font-size: .75rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  background: rgba(0,229,255,0.12);
  color: #d7edff;
  border: 1px solid rgba(0,229,255,0.24);
}
.project-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.project-actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
  justify-content: center;
}
.status-panel .status-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  line-height: 1.3;
}
.status-wrap {
  flex-wrap: wrap;
  gap: .35rem .5rem;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #17ffb2;
  box-shadow: 0 0 10px #17ffb2;
  animation: hero-status-pulse 2.2s ease-in-out infinite;
}
@keyframes hero-status-pulse {
  0%, 100% { box-shadow: 0 0 6px #17ffb2; }
  50% { box-shadow: 0 0 14px #17ffb2; }
}
.status-text { font-weight: 700; }
.status-divider {
  height: 1px;
  margin: .8rem 0;
  background: linear-gradient(90deg, rgba(0,229,255,0), rgba(0,229,255,0.35), rgba(0,229,255,0));
}
.muted { color: #b0c0ee; opacity: .85; }
.pill {
  font-size: .75rem;
  padding: .26rem .55rem;
  border-radius: 999px;
  background: rgba(0, 255, 213, 0.12);
  border: 1px solid rgba(0, 255, 213, 0.3);
  color: #cffff6;
}
.gh-link {
  display: inline-block;
  margin-top: .25rem;
  color: #d6e3ff;
  text-decoration: none;
}
.gh-link:hover { text-decoration: underline; }

.title { font: 800 clamp(36px, 4.6vw, 56px)/1.06 'ADLaM Display', Inter, sans-serif; margin: 12px 0 0; letter-spacing: 0.4px; }
.title .hi { display: block; font: 600 15px/1.6 Inter, sans-serif; color: var(--muted); text-transform: uppercase; letter-spacing: 1.1px; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 28px rgba(34,211,238,0.15));
  background-size: 200% 100%;
  animation: gradient-pan 8s ease-in-out infinite alternate, glow-pulse 5s ease-in-out infinite;
}
.name { position: relative; display: inline-block; }
.name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.65) 45%, transparent 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  background-position: -120% 0;
  animation: name-shimmer 6.5s ease-in-out infinite;
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: screen;
}
.subtitle { color: var(--muted); max-width: 60ch; font-size: 1rem; line-height: 1.7; }

/* typing effect for hashtag + layered bio animation */
.hero .hashtag {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid rgba(230,236,255,0.9);
  width: 0;
  color: var(--accent-1);
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: -6px;
  animation: typing 5.6s steps(40, end) .6s forwards, blink .8s step-end infinite .6s;
}
.hero .subtitle.bio {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  white-space: normal;
  overflow: visible;
  border-right: 0;
  width: auto;
  font-size: 1rem;
}
.hero .subtitle.bio .bio-line {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  row-gap: 2px;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  overflow: hidden;
}
.hero .subtitle.bio .bio-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(0,229,255,0) 35%, rgba(0,229,255,0.45) 50%, rgba(0,229,255,0) 65%, transparent 100%);
  transform: translateX(-140%);
  opacity: 0;
  pointer-events: none;
}
.hero.visible .subtitle.bio .bio-line {
  animation: bio-line-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.35s + var(--i, 0) * 0.25s);
}
.hero.visible .subtitle.bio .bio-line::after {
  animation: bio-line-glint 1.1s ease-out forwards;
  animation-delay: calc(0.9s + var(--i, 0) * 0.25s);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 12px; text-decoration: none; font-weight: 700;
  border: 1px solid var(--border); color: var(--text);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transform: translateX(-120%);
  transition: opacity .3s ease, transform .5s ease;
  pointer-events: none;
}
.btn.primary { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); box-shadow: 0 6px 18px rgba(0,229,255,0.18); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::after { opacity: 0.7; transform: translateX(120%); }
  .btn.primary:hover { box-shadow: 0 14px 36px rgba(0,229,255,0.26), 0 8px 18px var(--shadow); transform: translateY(-2px); }
  .btn.ghost:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }
  .avatar:hover::after { opacity: 0.55; }
  .avatar:hover img { transform: scale(1.08); }
  .menu-toggle:hover { background: rgba(0,229,255,0.12); box-shadow: 0 10px 26px rgba(0,229,255,0.18); }
}

.hero-orbs { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; width: 160px; height: 160px; border-radius: 50%;
  filter: blur(18px) saturate(140%); background: radial-gradient(circle at 30% 30%, var(--accent-1), transparent 60%);
  opacity: 0.45; animation: float 8s ease-in-out infinite;
}
.orb-1 { top: -20px; left: -20px; }
.orb-2 { right: 0; top: 30%; background: radial-gradient(circle at 30% 30%, var(--accent-2), transparent 60%); animation-delay: -2s; }
.orb-3 { bottom: 0; left: 30%; background: radial-gradient(circle at 30% 30%, var(--accent-3), transparent 60%); animation-delay: -4s; }

@keyframes avatar-float { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes float { 0%,100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-18px) translateX(6px); } }
@keyframes gradient-pan { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes glow-pulse { 0%,100% { text-shadow: 0 0 0 rgba(0,229,255,0); } 50% { text-shadow: 0 0 18px rgba(0,229,255,0.45); } }
@keyframes name-shimmer {
  0%, 65% { background-position: -120% 0; opacity: 0; }
  75% { opacity: 0.6; }
  100% { background-position: 120% 0; opacity: 0; }
}
@keyframes bio-line-reveal {
  0% { opacity: 0; transform: translateY(12px); filter: blur(6px); }
  60% { opacity: 1; transform: translateY(-2px); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes bio-line-glint {
  0% { opacity: 0; transform: translateX(-140%); }
  25% { opacity: 0.6; }
  100% { opacity: 0; transform: translateX(140%); }
}
@keyframes typing { from { width: 0; } to { width: var(--typing-w, 48ch); } }
@keyframes blink { 50% { border-color: transparent; } }
@keyframes emojiFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  40% { transform: translate3d(4px, -12px, 0) rotate(-6deg) scale(1.05); }
  70% { transform: translate3d(-4px, 6px, 0) rotate(4deg) scale(0.97); }
}

.about {
  position: relative;
  display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; justify-items: center;
  padding: 36px; margin: 42px auto 24px;
  border-radius: 28px; border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(12, 28, 54, 0.95), rgba(7,20,44,0.96) 52%, rgba(0,229,255,0.16));
  box-shadow: 0 30px 80px rgba(6,14,34,0.6);
  backdrop-filter: blur(18px);
  overflow: hidden; isolation: isolate;
}

.about::before,
.about::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}
.about::before {
  background: radial-gradient(140% 140% at 0% 0%, rgba(0,229,255,0.32), transparent 62%);
  mix-blend-mode: screen;
}
.about::after {
  background: linear-gradient(160deg, rgba(6,16,34,0.55), rgba(6,16,34,0.2));
  border: 1px solid rgba(0,229,255,0.18);
  box-shadow: inset 0 0 40px rgba(0,229,255,0.12);
}
.avatar {
  position: relative;
  width: 172px;
  aspect-ratio: 1;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(0,229,255,0.22), 0 20px 40px rgba(0,229,255,0.14);
  padding: 6px;
  box-sizing: border-box;
  animation: avatar-float 7.2s ease-in-out infinite;
  z-index: 1;
}
.avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(90% 90% at 30% 30%, rgba(255,255,255,0.18), transparent 75%);
  opacity: 0.65;
  z-index: -1;
}
.avatar::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: calc(32px - 6px);
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.32), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(32px - 6px);
  display: block;
  transform: scale(1.02);
  transition: transform .6s ease;
}
.about h2, .social h2, .contact h2, .tech-stack h2 { font: 800 28px/1.2 'ADLaM Display', Inter, sans-serif; margin: 0 0 6px; }
.about h2 { color: #f0f6ff; letter-spacing: 0.4px; text-shadow: 0 12px 32px rgba(0,229,255,0.35); }
.about-text { display: grid; gap: 12px; position: relative; z-index: 1; text-align: left; justify-items: start; max-width: 56ch; }
.about p { color: rgba(224,236,255,0.9); margin: 8px 0; line-height: 1.7; }
.about p strong { color: #ffffff; }
.about p:last-of-type { color: rgba(205,224,255,0.82); }
.about-emoji {
  position: absolute;
  font-size: 42px;
  filter: drop-shadow(0 10px 18px rgba(0,229,255,0.16));
  opacity: 0.88;
  pointer-events: none;
  animation: emojiFloat 7.5s ease-in-out infinite;
  mix-blend-mode: normal;
  z-index: 2;
}
.about-emoji::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.4), transparent 60%);
  filter: blur(20px);
  opacity: 0.55;
  z-index: -1;
}
.about-emoji.emoji-code { top: -26px; left: 24%; animation-delay: -1.2s; }
.about-emoji.emoji-shield { bottom: -10px; right: 24%; animation-delay: -3.4s; font-size: 46px; }
.about-emoji.emoji-globe { top: 18%; left: 6%; animation-delay: -2s; font-size: 40px; }

.tech-stack { padding: 32px 0 16px; }
.stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.stack-head p { margin: 0; }
.stack-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.stack-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  box-shadow: 0 18px 36px rgba(6,16,34,0.35);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stack-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  color: #ffffff;
  background: rgba(6, 14, 30, 0.75);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 22px rgba(6, 12, 28, 0.4);
}
.stack-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}
.stack-meta {
  display: grid;
  gap: 4px;
}
.stack-name { font-weight: 700; }
.stack-level {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.stack-meter {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(0,229,255,0.12);
  overflow: hidden;
  --meter: var(--level, 70%);
}
.stack-meter::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--meter);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 0 12px rgba(0,229,255,0.35);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
}
@media (hover: hover) and (pointer: fine) {
  .stack-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0,229,255,0.35);
    box-shadow: 0 22px 44px rgba(0,229,255,0.16);
  }
}

.container#playlist { padding: 26px 0 40px; }
#playlist h2 { font: 800 28px/1.2 'ADLaM Display', Inter, sans-serif; margin: 0 0 10px; }
#playlist .embed {
  position: relative;
  margin-top: 12px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(10,24,46,0.94), rgba(8,18,38,0.92));
  border: 1px solid var(--border);
  box-shadow: 0 24px 56px rgba(6,14,34,0.55);
  overflow: hidden;
  display: grid;
  gap: 18px;
}
#playlist .embed::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(0,229,255,0.2);
  pointer-events: none;
  opacity: 0.85;
}
#playlist .playlist-embed {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,229,255,0.22);
  box-shadow: 0 16px 36px rgba(6,16,34,0.45);
  background: rgba(6,14,30,0.7);
}
#playlist .playlist-embed iframe {
  display: block;
  width: 100%;
  min-height: 352px;
  border: 0;
}
#playlist .playlist-note {
  margin: 18px 0 0;
  font-size: 13px;
  color: rgba(198,218,245,0.75);
  text-align: center;
}

@media (max-width: 720px) {
  #playlist .playlist-embed iframe {
    min-height: 320px;
  }
}


.social { padding: 26px 0 60px; }
.contact { padding: 54px 0 72px; text-align: center; }
.contact-card {
  margin: 18px auto 0;
  max-width: 640px;
  padding: 32px 30px;
  background: linear-gradient(160deg, rgba(12, 26, 50, 0.92), rgba(8,20,42,0.94));
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 56px rgba(6,16,34,0.55);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 18px;
}
.contact-card p { margin: 0; color: rgba(222,236,255,0.9); font-size: 18px; line-height: 1.5; }
.contact-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.contact-note { color: rgba(198,216,255,0.7); font-size: 13px; letter-spacing: 0.2px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(0,229,255,0.24);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  height: 96px;
  background: linear-gradient(155deg, rgba(12, 28, 54, 0.92) 0%, rgba(10, 24, 44, 0.94) 55%, rgba(8, 18, 36, 0.92) 100%);
  background-size: 220% 220%;
  animation: cardPulseBg 18s ease-in-out infinite;
  transition: transform .25s cubic-bezier(.25,.8,.25,1), box-shadow .3s ease, border-color .3s ease;
  box-shadow: 0 22px 40px rgba(6,16,34,0.48);
  will-change: transform;
  overflow: hidden;
}


.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(140% 180% at 80% -20%, rgba(0,229,255,0.22), rgba(0,229,255,0));
  opacity: 0.55;
  pointer-events: none;
  transition: opacity .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-6px);
    border-color: rgba(0,229,255,0.4);
    box-shadow: 0 20px 58px rgba(0,229,255,0.18), 0 16px 40px rgba(4,10,24,0.65);
  }
  .card:hover::after { opacity: 0.78; }
}

.card .icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.06); color: #fff; }
.card .icon.linkedin { background: #0a66c2; }
.card .icon.twitter { background: #1da1f2; }
.card .icon.instagram { background: radial-gradient(120% 120% at 30% 120%, #feda77, #f58529, #dd2a7b, #8134af, #515bd4); }
.card .icon.facebook { background: #1877F2; }
.card .icon.spotify { background: #1DB954; }
.card-text { display: grid; line-height: 1.2; }
.card-text strong { font-weight: 800; letter-spacing: 0.2px; }
.card-text span { color: rgba(198,216,255,0.78); font-size: 14px; }

.site-footer { padding: 24px 0 36px; color: var(--muted); text-align: center; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.visible, .reveal.in { opacity: 1; transform: none; }

@keyframes cardPulseBg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Tilt hover */
.tilt { transform-style: preserve-3d; perspective: 600px; }
@media (hover:none) { .tilt { transform: none !important; perspective: none !important; } }

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; align-items: center; padding: 12px 0; gap: 12px; }
  .brand { flex: 1 1 auto; justify-content: flex-start; }
  .menu-toggle { display: inline-flex; }
  .cards { grid-template-columns: 1fr; }
  .card { height: auto; min-height: 84px; }
  .stack-head { flex-direction: column; align-items: flex-start; }
  .stack-strip { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .menu {
    flex: 1 1 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    margin-top: 2px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(8, 16, 34, 0.95);
    box-shadow: 0 18px 40px rgba(4, 10, 24, 0.55);
  }
  .menu.is-open { display: flex; }
  .menu a {
    display: block;
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: left;
  }
  .menu a + a { margin-left: 0; }
  .menu a:hover { background: rgba(255,255,255,0.05); }
}

@media (max-width: 900px) and (min-width: 721px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 72px 0 56px; min-height: auto; }
  .hero-main { align-items: center; text-align: center; max-width: none; width: 100%; }
  .hero .subtitle { text-align: center; }
  .hero-right { margin-left: 0; max-width: 520px; width: 100%; justify-self: center; }
  .project-actions .btn { flex: 1 1 100%; min-width: 0; }
  .about { grid-template-columns: 1fr; padding: 30px; gap: 24px; text-align: center; }
  .about-text { align-items: center; text-align: center; justify-items: center; }
  .avatar { margin: 0 auto 18px; }
  .cta { justify-content: center; }
  .title { font-size: 38px; }
  .contact-card { padding: 28px 24px; }
  .about-emoji.emoji-code { left: 18%; }
  .about-emoji.emoji-shield { right: 18%; bottom: -14px; }
  .about-emoji.emoji-globe { top: 36%; left: 6%; }
}

@media (max-width: 600px) {
  body { background-attachment: scroll, scroll, scroll, scroll; }
  .hero { padding: 72px 0 52px; }
  .hero .hashtag { font-size: 0.95rem; }
  .hero .subtitle.bio { font-size: 0.95rem; }
  .hero-right { gap: 16px; }
  .project-card,
  .status-panel { padding: 16px; }
  .project-media { height: 148px; }
  .hero-orbs { display: none; }
  #playlist .embed { padding: 16px; }
}
@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  .nav { padding: 10px 0; }
  .brand-badge { width: 32px; height: 32px; }
  .brand-text { font-size: 0.95rem; }
  .menu { padding: 10px; gap: 4px; }
  .menu a { font-size: 15px; }
  .hero { padding: 56px 0 42px; }
  .about { padding: 26px; gap: 20px; }
  .avatar { width: 128px; margin: 0 auto 12px; }
  .stack-strip { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 18px; }
  .cta .btn { width: 100%; }
  .title { font-size: 32px; }
  .card { height: auto; min-height: 84px; padding: 16px; }
  .contact-actions { flex-direction: column; }
  .contact-card { padding: 24px 20px; gap: 16px; }
  .contact-card p { font-size: 16px; }
  .about-emoji { font-size: 32px; }
  .about-emoji.emoji-code { left: 6%; top: -22px; }
  .about-emoji.emoji-shield { right: 10%; bottom: -6px; }
  .about-emoji.emoji-globe { display: none; }
}

@media (max-width: 400px) {
  .brand-text { display: none; }
  .title { font-size: 28px; }
  .hero { padding: 52px 0 38px; }
  .hero .subtitle.bio { font-size: 0.9rem; }
  .project-media { height: 132px; }
  .project-card,
  .status-panel { padding: 14px; }
  .menu { padding: 9px; }
  .menu a { font-size: 14px; }
}

/* High-contrast */
@media (prefers-contrast: more) {
  :root { --border: rgba(0,229,255,0.28); }
  .btn, .card { border-width: 2px; }
  .muted, .card-text span { color: #bcd0ff; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero .hashtag { border-right: 0 !important; width: auto !important; white-space: normal !important; }
  .hero .subtitle.bio { border-right: 0 !important; width: auto !important; white-space: normal !important; }
  .hero .subtitle.bio .bio-line { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
  .hero .subtitle.bio .bio-line::after { content: none !important; animation: none !important; }
  .name::after { opacity: 0 !important; }
}
