/* ===================================
   CINEMATIC INTRO SCREEN (NS SIGNAL)
=================================== */
#introScreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.4s ease;
}

/* Instantly hide intro if already seen — fires before first paint */
.intro-seen #introScreen {
  display: none !important;
}

/* Vertical Compression (Netflix Style) */
#introScreen.compress {
  transform: scaleY(0.005);
  opacity: 0.8;
  background: #fff;
  /* Shine flash on compress */
}

#introScreen.hidden {
  display: none;
}

/* Static Noise Burst */
#introStatic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1;
}

#introStatic.active {
  opacity: 0.1;
}

/* Logo & Content */
#introContent {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.intro-center-glow {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 360px;
  height: 200px;
  transform: translate(-50%, -50%) scale(0.75);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0) 70%);
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.55s ease;
  pointer-events: none;
}

.intro-center-glow.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.logo-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.logo-wrapper::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.6px solid rgba(255, 255, 255, 0.42);
  opacity: 0;
  transform: scale(0.92);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.logo-wrapper.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.intro-face-frame {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), rgba(10, 10, 10, 0.35));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 42px rgba(255, 255, 255, 0.22);
}

.intro-face-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.16);
  filter: grayscale(30%) contrast(1.05) brightness(0.9);
}

.logo-wrapper.draw .intro-face-image {
  animation: faceReveal 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.logo-wrapper.locked .intro-face-image {
  opacity: 1;
  filter: grayscale(0%) contrast(1.12) brightness(1.04);
  transform: scale(1.03);
}

.logo-wrapper.locked::after {
  animation: introRingSweep 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes faceReveal {
  0% {
    opacity: 0;
    transform: scale(1.16);
    filter: blur(4px) grayscale(45%) brightness(0.75);
  }

  70% {
    opacity: 1;
    transform: scale(1.06);
    filter: blur(0) grayscale(10%) brightness(1);
  }

  100% {
    opacity: 1;
    transform: scale(1.03);
    filter: blur(0) grayscale(0%) brightness(1.04);
  }
}

@keyframes drawStroke {
  to {
    stroke-dashoffset: 0;
  }
}

.intro-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intro-name-typed {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  min-height: 1.2em;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.intro-subtitle-glitch {
  font-family: 'Orbitron', 'Space Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #cbd5e1;
  opacity: 0;
}

.intro-subtitle-glitch.show {
  animation: glitchFlicker 1.5s step-end forwards;
}

@keyframes glitchFlicker {
  0% {
    opacity: 0;
    transform: skew(0deg);
  }

  5% {
    opacity: 1;
    transform: skew(10deg);
    color: #fff;
  }

  10% {
    opacity: 0.8;
    transform: skew(-10deg);
    color: #94a3b8;
  }

  15% {
    opacity: 1;
    transform: skew(0deg);
  }

  20% {
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  80% {
    opacity: 1;
    transform: translateX(2px);
  }

  90% {
    opacity: 0.9;
    transform: translateX(-2px);
  }

  100% {
    opacity: 0.85;
    transform: translateX(0);
  }
}

/* Keep main content invisible during intro */
body.intro-active>*:not(#introScreen) {
  visibility: hidden;
}

@media (max-width: 640px) {
  .intro-center-glow {
    width: 280px;
    height: 160px;
  }

  .logo-wrapper {
    width: 140px;
    height: 140px;
    margin-bottom: 12px;
  }

  .intro-name-typed {
    letter-spacing: 0.16em;
  }
}

/* ===================================
   ROOT & VARIABLES
=================================== */
:root {
  --bg: #030303;
  --bg-2: #080808;
  --bg-3: #111111;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.3);

  --silver: #cbd5e1;
  --silver-light: #f8fafc;
  --silver-dark: #64748b;
  --accent: #ffffff;

  /* Silver-Shine Reflection Gradient */
  --gradient: linear-gradient(135deg, #94a3b8 0%, #ffffff 45%, #94a3b8 50%, #ffffff 55%, #64748b 100%);
  --gradient-2: linear-gradient(135deg, #ffffff, #cbd5e1);

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #475569;

  --font: 'Space Grotesk', sans-serif;
  --mono: 'Space Mono', monospace;

  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   RESET & BASE
=================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--silver-dark) var(--bg-2);
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--silver-dark);
  border-radius: 3px;
}

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

/* Global Background */
#global-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
  pointer-events: none;
}

#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.38;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  mix-blend-mode: overlay;
}

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

img {
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================
   NOISE OVERLAY
=================================== */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===================================
   CUSTOM CURSOR
=================================== */
.cursor {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.cursor-follower {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease-out, width 0.3s, height 0.3s, opacity 0.3s;
}

body:hover .cursor {
  opacity: 1;
}

/* Hide custom cursor on touch/mobile devices */
@media (pointer: coarse) {
  .cursor,
  .cursor-follower {
    display: none !important;
  }
}

/* ===================================
   NAVIGATION
=================================== */
.nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.6);
  pointer-events: all;
  animation: navFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes navFadeIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

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

/* Name button */
.nav-name-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-name-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.nav-name-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
  animation: dotPulse 2.5s ease infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {

  0%,
  100% {
    box-shadow: 0 0 4px #22c55e;
    opacity: 1;
  }

  50% {
    box-shadow: 0 0 10px #22c55e, 0 0 20px rgba(34, 197, 94, 0.4);
    opacity: 0.75;
  }
}

/* Divider */
.nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Nav links */
.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(180, 200, 220, 0.75);
  border-radius: 100px;
  transition: all 0.22s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.nav-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.22s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover .nav-icon {
  opacity: 1;
}

/* Active nav link — glowing pill highlight */
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.nav-link.active .nav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* .nav-link-resume styling removed to match other links */

/* Mobile hamburger — hidden by default */
.hamburger {
  display: none;
  position: fixed;
  top: 24px;
  right: 24px;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: rgba(8, 8, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 101;
  pointer-events: all;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-slow);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.mobile-link:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .nav-pill {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}


/* ===================================
   SECTION COMMON
=================================== */
section {
  padding: 96px 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--silver);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.label-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--silver-dark);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 620px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
}

/* ===================================
   BUTTONS
=================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

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

.btn-primary {
  background: var(--gradient);
  color: #030303;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.25);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===================================
   HERO SECTION
=================================== */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 110px 24px 72px;
  gap: 64px;
  background: transparent;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 860px;
  will-change: transform;
}

/* ─── Neural Network Visual ─────────────────── */
.hero-visual {
  flex: 0 0 500px;
  height: 500px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

#neuralCanvas {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.25));
}

.neural-label {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--silver);
  margin: 0 auto 28px;
  animation: fadeInDown 0.8s ease both;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--mono);
}

.hero-name {
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-block;
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-name::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  width: 132%;
  height: 190%;
  background: radial-gradient(circle,
      rgba(203, 213, 225, 0.26) 0%,
      rgba(148, 163, 184, 0.16) 32%,
      rgba(100, 116, 139, 0.08) 56%,
      rgba(100, 116, 139, 0) 78%);
  filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

/* Typed characters inherit gradient from parent */
.hero-name .typed-chars {
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Blinking block cursor */
.typing-cursor {
  display: inline-block;
  width: 4px;
  height: 0.82em;
  background-color: #f1f5f9;
  -webkit-text-fill-color: initial;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 2px;
  animation: cursorBlink 0.65s step-end infinite;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

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

.hero-role {
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--silver-light);
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  animation: fadeInUp 0.8s ease 0.18s both;
}

.hero-chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-light);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
  max-width: 620px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 34px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
  text-align: center;
  min-width: 128px;
}

.stat-num {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 1.02rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-divider {
  width: 2px;
  height: 56px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  animation: fadeInRight 0.8s ease 0.2s both;
}

.hero-card {
  position: relative;
  width: 320px;
  background: rgba(13, 13, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.card-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-placeholder svg {
  width: 80%;
  height: 80%;
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.2);
  animation: ringPulse 3s ease-in-out infinite;
}

.ring1 {
  inset: -8px;
  animation-delay: 0s;
}

.ring2 {
  inset: -16px;
  animation-delay: 0.5s;
}

@keyframes ringPulse {

  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.02);
  }
}

.card-info {
  text-align: center;
  margin-bottom: 20px;
}

.card-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-title {
  font-size: 0.85rem;
  color: var(--purple-light);
  margin-bottom: 8px;
}

.card-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.card-location svg {
  width: 14px;
  height: 14px;
}

.card-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--purple-light);
}

/* Floating elements */
.float-el {
  position: absolute;
  width: 48px;
  height: 48px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  backdrop-filter: blur(10px);
  animation: floatAnim 4s ease-in-out infinite;
}

.float-el svg {
  width: 24px;
  height: 24px;
  color: var(--purple-light);
}

.float-1 {
  top: -20px;
  right: -20px;
  animation-delay: 0s;
}

.float-2 {
  bottom: 40px;
  right: -30px;
  animation-delay: 1.5s;
}

.float-3 {
  top: 50%;
  left: -30px;
  animation-delay: 0.8s;
}

@keyframes floatAnim {

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

  50% {
    transform: translateY(-12px) rotate(5deg);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  animation: fadeIn 1s ease 1s both;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--purple), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

.scroll-indicator span {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--mono);
}

/* ===================================
   ABOUT SECTION
=================================== */
.about {
  background: transparent;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: none;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-desc {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 20px;
}

.about-specialty-chip {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver-light);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.highlight-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateX(4px);
}

.highlight-icon {
  font-size: 1.5rem;
}

.highlight-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.highlight-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* About Visual */
.about-image-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.about-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: rgba(139, 92, 246, 0.05);
  border: 2px dashed rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-image-placeholder svg {
  width: 80%;
  height: 80%;
}

.about-image-border {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: calc(var(--radius-lg) + 8px);
  animation: borderRotate 8s linear infinite;
  background: conic-gradient(from 0deg, transparent 70%, rgba(139, 92, 246, 0.3) 100%);
}

@keyframes borderRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.about-badge-1,
.about-badge-2 {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  animation: floatAnim 4s ease-in-out infinite;
}

.about-badge-1 {
  top: 20px;
  right: -20px;
  animation-delay: 0s;
}

.about-badge-2 {
  bottom: 20px;
  left: -20px;
  animation-delay: 2s;
}

/* ===================================
   SKILLS SECTION
=================================== */
.skills {
  background: var(--bg);
}

/* Icon Marquee */
.icon-marquee-wrap {
  overflow: hidden;
  padding: 20px 0;
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.icon-marquee-track {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: iconScroll 35s linear infinite;
}

.icon-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes iconScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.mq-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: default;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mq-icon:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.07);
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.18), 0 0 18px rgba(6, 182, 212, 0.08);
}

.mq-icon svg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.mq-icon img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.mq-icon:hover svg {
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transform: scale(1.08);
}

.mq-icon:hover img {
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  transform: scale(1.08);
}

.mq-icon span {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.mq-icon:hover span {
  color: var(--purple-light);
}

/* Tech Panel */
.tech-panel {
  position: relative;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(13, 13, 26, 0.7);
  backdrop-filter: blur(16px);
  overflow: hidden;
  padding: 0;
  box-shadow:
    0 0 60px rgba(139, 92, 246, 0.08),
    0 0 120px rgba(6, 182, 212, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tech-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.6) 30%, rgba(6, 182, 212, 0.6) 70%, transparent 100%);
}

.tech-panel-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 300px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.07) 0%, rgba(6, 182, 212, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.tech-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 36px;
}

.tech-row-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  min-width: 68px;
  opacity: 0.6;
  white-space: nowrap;
}

.tech-panel-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.2) 20%, rgba(6, 182, 212, 0.15) 80%, transparent 100%);
  margin: 0 36px;
}

.tech-icons-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tech-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: default;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  position: relative;
}

.tech-icon-item:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

.tech-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.15));
  transition: filter 0.3s ease;
}

.tech-icon-item:hover .tech-icon-wrap {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.tech-icon-wrap svg {
  width: 44px;
  height: 44px;
}

.tech-icon-item span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.tech-icon-item:hover span {
  color: var(--silver-light);
}


/* ===================================
   RESEARCH PAPERS SECTION
=================================== */
.research {
  background: transparent;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  align-items: stretch;
}

.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}

.research-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.research-card:hover::before {
  opacity: 1;
}

.research-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.research-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.research-year {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.research-title {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  transition: var(--transition);
}

.research-card:hover .research-title {
  color: #fff;
}

.research-abstract {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.research-authors {
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--text-dim);
  font-style: italic;
}

.research-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.research-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.research-tags span {
  padding: 3px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--silver-dark);
}

.research-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  font-size: 0.74rem;
  font-family: var(--font);
  font-weight: 500;
  color: var(--silver-light);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.research-btn:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.45);
  transform: translateX(2px);
}

/* Incoming paper variant */
.research-card--incoming {
  opacity: 0.75;
}

.research-card--incoming:hover {
  opacity: 1;
}

.research-incoming-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.incoming-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  animation: incomingPulse 1.5s ease-in-out infinite;
}

@keyframes incomingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ===================================
   PROJECTS SECTION
=================================== */
.projects {
  background: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  align-items: stretch;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  group: true;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-corner-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.project-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.project-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.project-card.featured .project-img {
  aspect-ratio: auto;
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg,
      hsl(var(--hue), 60%, 8%) 0%,
      hsl(var(--hue), 50%, 12%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%,
      hsla(var(--hue), 70%, 50%, 0.15) 0%,
      transparent 60%);
}

.project-mockup {
  width: 80%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.mockup-bar {
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}

.mockup-bar::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 14px 0 0 #febc2e, 28px 0 0 #28c840;
}

.mockup-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-line {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.mockup-line.short {
  width: 60%;
}

.mockup-block {
  height: 60px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  margin-top: 4px;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.project-link:hover {
  background: #fff;
  border-color: #fff;
  color: #030303;
  transform: scale(1.1);
}

.project-link svg {
  width: 20px;
  height: 20px;
}

.project-info {
  padding: 12px 14px;
}

.project-number {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--silver);
  margin-bottom: 6px;
  letter-spacing: 0.1em;
}

.project-title {
  font-size: 0.94rem;
  font-weight: 700;
  margin-bottom: 6px;
  transition: var(--transition);
}

.project-card:hover .project-title {
  color: #fff;
}

.project-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.48;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tech span {
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 0.66rem;
  font-family: var(--mono);
  color: var(--silver);
}

.project-screenshot {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-screenshot {
  transform: scale(1.04);
}

/* Keep the emotion detector screenshot readable (no aggressive crop). */
.project-card.project-emotion .project-img {
  background: #050912;
}

.project-screenshot.emotion-screenshot {
  object-fit: contain;
  object-position: center;
  padding: 8px;
}

.project-card.project-emotion:hover .project-screenshot.emotion-screenshot {
  transform: scale(1.01);
}

/* Keep the multilingual ticket router console screenshot readable. */
.project-card.project-ticket-router .project-img {
  background: #07172f;
  aspect-ratio: 16 / 8.5;
}

.project-screenshot.ticket-router-screenshot {
  object-fit: contain;
  object-position: center;
  padding: 0;
}

.project-card.project-ticket-router:hover .project-screenshot.ticket-router-screenshot {
  transform: scale(1.01);
}

.project-card.project-ticket-router .project-info {
  padding: 10px 12px;
}

/* GitaMind OM Symbol - Make it bright and clear */
.project-card.project-gitmind .project-img {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-screenshot.gitmind-screenshot {
  object-fit: contain;
  object-position: center;
  padding: 20px;
  filter: brightness(1.3) contrast(1.2);
}

.project-card.project-gitmind:hover .project-screenshot.gitmind-screenshot {
  transform: scale(1.08);
  filter: brightness(1.5) contrast(1.3);
}

.project-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.72rem;
  font-family: var(--font);
  font-weight: 500;
  color: var(--silver-light);
  text-decoration: none;
  transition: var(--transition);
  width: fit-content;
}

.project-view-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  transform: translateX(3px);
}

@media (min-width: 1280px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .project-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .project-img {
    aspect-ratio: 16 / 9;
  }

  .project-info {
    padding: 10px 12px;
  }
}

/* ===================================
   CONTACT SECTION
=================================== */
.contact {
  background: transparent;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.contact-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
}

.contact-value.available {
  color: #22c55e;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-link {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  background: #fff;
  border-color: #fff;
  color: #030303;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hp-field-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hp-field {
  opacity: 0;
  pointer-events: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: var(--transition);
  resize: none;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-success {
  display: none;
  padding: 14px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  color: #22c55e;
  font-size: 0.9rem;
  text-align: center;
}

.form-success.show {
  display: block;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
}

.turnstile-wrap .cf-turnstile {
  margin: 2px auto 0;
}

.form-note {
  margin-top: -8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

/* ===================================
   FOOTER
=================================== */
.footer {
  background: transparent;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===================================
   PORTFOLIO CHATBOT
=================================== */
.portfolio-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5000;
  width: min(390px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.portfolio-chat:not(.open) {
  width: 58px;
  height: 58px;
}

.chat-launcher,
.chat-panel,
.chat-close,
.chat-input button {
  pointer-events: auto;
}

.chat-launcher {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(18px);
  color: var(--text);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: grab;
  touch-action: none;
}

.chat-launcher:hover {
  transform: translateY(-2px);
}

.portfolio-chat.dragging .chat-launcher,
.portfolio-chat.dragging .chat-panel,
.portfolio-chat.dragging .chat-panel-header {
  cursor: grabbing;
}

.chat-launcher-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px;
}

.chat-launcher-icon svg {
  width: 26px;
  height: 26px;
}

.portfolio-chat.open .chat-launcher {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(7, 10, 16, 0.94), rgba(5, 8, 13, 0.94));
  backdrop-filter: blur(22px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease;
  height: min(600px, calc(100dvh - 110px));
  display: flex;
  flex-direction: column;
  cursor: grab;
  pointer-events: none;
}

.portfolio-chat.open .chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 0;
  user-select: none;
  touch-action: none;
}

.chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.chat-eyebrow {
  margin-bottom: 4px;
  color: var(--silver-dark);
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chat-panel-header h3 {
  font-size: 0.98rem;
  color: var(--text);
}

.chat-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
}

.chat-disclaimer {
  padding: 8px 14px 10px;
  color: rgba(203, 213, 225, 0.92);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.chat-thread {
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.chat-thread::-webkit-scrollbar {
  width: 8px;
}

.chat-thread::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.chat-message {
  max-width: 92%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
  line-height: 1.45;
  font-size: 0.92rem;
}

.chat-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.chat-body {
  white-space: pre-wrap;
}

.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.32), rgba(71, 85, 105, 0.42));
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-meta {
  margin-top: 6px;
  color: var(--text-dim);
  font: 600 10px/1.3 var(--mono);
  letter-spacing: 0.04em;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.chat-input input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--text);
  font: 500 13px/1.35 var(--font);
}

.chat-input input::placeholder {
  color: var(--text-dim);
}

.chat-input button {
  width: auto;
  min-width: 64px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  color: #111111;
  font-weight: 700;
  font-size: 0.82rem;
}

.chat-empty {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===================================
   ANIMATIONS
=================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding: 128px 24px 72px;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-visual {
    flex: 0 0 300px;
    height: 300px;
    width: 300px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto 36px;
  }

  .hero-chip-row {
    justify-content: center;
  }

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

  .about-visual {
    order: -1;
  }

  .about-specialties {
    justify-content: center;
  }

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

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

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

  .project-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 104px 16px 56px;
  }

  .nav {
    padding: 16px 24px;
  }

  .nav.scrolled {
    padding: 12px 24px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  section {
    padding: 72px 0;
  }

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

  .hero-chip-row {
    margin-bottom: 24px;
  }

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

  .portfolio-chat {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .portfolio-chat:not(.open) {
    width: 54px;
    height: 54px;
  }

  .chat-panel {
    height: min(540px, calc(100dvh - 88px));
    border-radius: 18px;
    border-color: rgba(148, 163, 184, 0.42);
    background: linear-gradient(180deg, rgba(6, 10, 17, 0.98), rgba(3, 7, 14, 0.98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.74), 0 0 0 1px rgba(255, 255, 255, 0.07);
  }

}

@media (max-width: 480px) {
  .hero {
    padding: 96px 14px 48px;
  }

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

  .hero-role {
    font-size: 1rem;
  }

  .hero-stats {
    width: 100%;
    gap: 12px;
    justify-content: space-between;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  .stat-divider {
    display: none;
  }

  .stat {
    min-width: 0;
    flex: 1;
  }

  .hero-card {
    width: 100%;
    max-width: 300px;
  }

  /* Prevent iOS auto-zoom on form focus */
  .form-group input,
  .form-group textarea {
    font-size: 16px;
  }

  .chat-launcher {
    width: 54px;
    height: 54px;
    border-radius: 50%;
  }

  .chat-panel {
    height: calc(100dvh - 72px);
    border-radius: 16px;
    border-color: rgba(148, 163, 184, 0.46);
    box-shadow: 0 22px 64px rgba(0, 0, 0, 0.76), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .chat-thread {
    padding: 10px 12px 8px;
  }

  .chat-message {
    background: rgba(15, 23, 42, 0.74);
  }

  .chat-input {
    padding: 10px 12px 12px;
  }

}

/* ===================================
   AVATAR FRAME (HERO VISUAL)
=================================== */
.avatar-frame-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: fadeInRight 0.8s ease 0.2s both;
}

.avatar-frame-border {
  position: relative;
  width: 340px;
  height: 480px;
  border-radius: 180px 180px 120px 120px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(203, 213, 225, 0.05));
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.2),
    0 0 60px rgba(255, 255, 255, 0.1),
    inset 0 0 40px rgba(255, 255, 255, 0.02);
  animation: frameGlow 4s ease-in-out infinite;
  overflow: hidden;
}

@keyframes frameGlow {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 60px rgba(255, 255, 255, 0.1);
  }

  50% {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 0 80px rgba(255, 255, 255, 0.2);
  }
}

.avatar-frame-glow {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 100px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 1;
}

.avatar-frame-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.avatar-frame-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  mix-blend-mode: normal;
}

/* ===================================
   CIRCULAR WHATSAPP-STYLE DP BADGE
=================================== */
.avatar-dp-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow:
    0 0 0 2px rgba(139, 92, 246, 0.6),
    0 0 20px rgba(139, 92, 246, 0.4);
  overflow: hidden;
  background: var(--bg-2);
  animation: dpPulse 3s ease-in-out infinite;
  z-index: 10;
}

.avatar-dp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
}

/* Green online dot */
.avatar-dp-online {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: pulse 2s ease infinite;
}

@keyframes dpPulse {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.6), 0 0 20px rgba(139, 92, 246, 0.4);
  }

  50% {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.8), 0 0 30px rgba(6, 182, 212, 0.5);
  }
}

/* ===================================
   FLOATING TECH CHIPS
=================================== */
.avatar-chip {
  position: absolute;
  padding: 8px 14px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--silver);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.05);
  animation: chipFloat 4s ease-in-out infinite;
}

.chip-1 {
  left: -60px;
  top: 30%;
  animation-delay: 0s;
}

.chip-2 {
  right: -60px;
  top: 45%;
  animation-delay: 1.2s;
}

.chip-3 {
  left: -50px;
  bottom: 20%;
  animation-delay: 0.6s;
}

@keyframes chipFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 1024px) {
  .avatar-frame-border {
    width: 260px;
    height: 370px;
  }

  .chip-1 {
    left: -20px;
  }

  .chip-2 {
    right: -20px;
  }

  .chip-3 {
    left: -10px;
  }
}

@media (max-width: 768px) {
  .avatar-frame-wrap {
    margin-top: 40px;
  }

  .avatar-frame-border {
    width: 220px;
    height: 310px;
  }

  .avatar-chip {
    display: none;
  }
}

/* ===================================
   CODE BLOCK (HERO)
=================================== */
.code-block {
  margin-top: 28px;
  background: rgba(13, 13, 26, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.1);
  max-width: 360px;
  animation: fadeInUp 0.8s ease 0.5s both;
}

/* MacOS traffic-light header */
.code-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.code-filename {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Code lines */
.code-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.code-line {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
  opacity: 0;
  animation: revealLine 0.4s ease forwards;
  white-space: nowrap;
}

.code-line:nth-child(1) {
  animation-delay: 0.8s;
}

.code-line:nth-child(2) {
  animation-delay: 1.3s;
}

.code-line:nth-child(3) {
  animation-delay: 1.8s;
}

.code-line:nth-child(4) {
  animation-delay: 2.3s;
}

.code-line.pl {
  padding-left: 20px;
}

@keyframes revealLine {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

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

/* Syntax colours */
.code-kw {
  color: #c792ea;
}

/* purple  – keywords/vars  */
.code-fn {
  color: #82aaff;
}

/* blue    – function name  */
.code-param {
  color: #f78c6c;
}

/* orange  – parameter      */
.code-pu {
  color: #89ddff;
}

/* cyan    – punctuation    */
.code-str {
  color: #c3e88d;
}

/* green   – strings/values */
.code-op {
  color: #89ddff;
}

/* cyan    – operators      */
.code-comment {
  color: #546e7a;
  font-style: italic;
}

/* Blinking cursor */
.code-cursor {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--silver-light);
  animation: blink 1s step-end infinite, revealLine 0.3s ease 2.7s both;
  opacity: 0;
  margin-top: 2px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes introRingSweep {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }

  45% {
    opacity: 0.9;
    transform: scale(1.03);
  }

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

@media (max-width: 430px) {
  .hero-actions {
    width: 100%;
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 12px 14px;
    font-size: 0.86rem;
  }

  .stat-num {
    font-size: 1.65rem;
  }

  .stat-label {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }
}