/* ============================================================
   SWATI SHEKHAWAT — PORTFOLIO
   Professional, responsive, dark/light theme
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Dark theme (default) */
  color-scheme: dark;
  --bg:         #0d1117;
  --bg-2:       #161b22;
  --surface:    #1c2128;
  --surface-2:  #2d333b;
  --border:     rgba(240,246,252,0.1);
  --border-2:   rgba(240,246,252,0.18);
  --text:       #e6edf3;
  --text-2:     #c9d1d9;
  --muted:      #7d8590;
  --accent:     #00d4aa;
  --accent-dim: rgba(0,212,170,0.12);
  --accent-2:   #f0a500;
  --accent-3:   #f05c5c;
  --blue:       #58a6ff;
  --purple:     #a371f7;

  --shadow-sm:  0 2px 12px rgba(0,0,0,0.35);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg:  0 24px 60px rgba(0,0,0,0.55);
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --max-w:      1160px;
  --nav-h:      72px;

  --ease-out: cubic-bezier(0.22,1,0.36,1);
  --ease-in-out: cubic-bezier(0.45,0,0.55,1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg:         #f6f8fa;
  --bg-2:       #ffffff;
  --surface:    #ffffff;
  --surface-2:  #f0f4f8;
  --border:     rgba(27,31,36,0.12);
  --border-2:   rgba(27,31,36,0.22);
  --text:       #1c2128;
  --text-2:     #2d333b;
  --muted:      #57606a;
  --accent:     #0f9d8a;
  --accent-dim: rgba(15,157,138,0.1);
  --accent-2:   #c47d0e;
  --accent-3:   #d93f3f;
  --blue:       #0969da;
  --purple:     #8250df;
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg:  0 24px 60px rgba(0,0,0,0.18);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
}

body {
  min-width: 320px;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- UTILITIES ---------- */
.container {
  width: min(var(--max-w), calc(100vw - 48px));
  margin-inline: auto;
}

.accent-text { color: var(--accent); }

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-color: var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(var(--max-w), calc(100vw - 48px));
  margin-inline: auto;
  gap: 20px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.logo-mark-sm { width: 30px; height: 30px; font-size: 0.75rem; }

.logo-name {
  font-size: 0.95rem;
  color: var(--text);
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  transition: transform 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav-resume-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease-out), opacity 0.25s ease;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mob-link {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.mob-link:hover { background: var(--surface); color: var(--text); }
.mob-resume {
  margin-top: 8px;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--accent-dim);
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   SECTIONS COMMON
   ============================================================ */
.section { padding: 100px 0; }

.section-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-sub {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 56px;
}

/* Section divider */
.about-section, .projects-section, .skills-section, .achievements-section, .contact-section {
  border-top: 1px solid var(--border);
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

[data-reveal-delay="80"]  { transition-delay: 80ms; }
[data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal-delay="160"] { transition-delay: 160ms; }
[data-reveal-delay="240"] { transition-delay: 240ms; }
[data-reveal-delay="320"] { transition-delay: 320ms; }
[data-reveal-delay="400"] { transition-delay: 400ms; }

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 40%, transparent); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-2); }

.btn-full { width: 100%; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

/* Background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 80%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: glow-pulse 8s ease-in-out infinite;
}

.glow-1 {
  width: 600px; height: 600px;
  top: -150px; left: -100px;
  background: var(--accent);
}

.glow-2 {
  width: 500px; height: 500px;
  top: 0; right: -100px;
  background: var(--blue);
  animation-delay: 4s;
}

@keyframes glow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.18; }
  50% { transform: scale(1.15); opacity: 0.25; }
}

/* Hero inner layout */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 60px;
  width: min(var(--max-w), calc(100vw - 48px));
  margin-inline: auto;
  padding: 60px 0 40px;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: var(--accent-dim);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-blink 1.8s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Hero title */
.hero-title {
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero-title-sub {
  color: var(--muted);
}

/* Hero role tags */
.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.role-tag {
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
}

.role-sep {
  color: var(--muted);
  font-size: 1.2rem;
}

/* Hero bio */
.hero-bio {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 36px;
}

/* Hero CTA buttons */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

/* ---- Portrait card ---- */
.hero-portrait {
  position: relative;
}

.portrait-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 8%, transparent),
    transparent 60%,
    color-mix(in srgb, var(--blue) 6%, transparent));
  pointer-events: none;
}

.portrait-img-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.portrait-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Portrait info */
.portrait-info {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.855rem;
  color: var(--text-2);
}

.info-item i {
  width: 16px;
  text-align: center;
  color: var(--accent);
  font-size: 0.85rem;
}

/* LinkedIn pill */
.linkedin-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--border));
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.linkedin-pill:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--blue) 22%, transparent);
}
.linkedin-pill i { font-size: 1rem; }
.linkedin-pill i:first-child { color: var(--blue); }
.pill-arrow { color: var(--muted); font-size: 0.8rem; }

/* Floating badges */
.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  animation: float-drift 4s ease-in-out infinite;
}

.float-badge i { color: var(--accent); }

.fb-1 { left: -32px; top: 30%; animation-delay: 0s; }
.fb-2 { left: -38px; bottom: 30%; animation-delay: 1.5s; }
.fb-3 { right: -20px; top: 20%; animation-delay: 0.8s; }

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

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fade-in 1s 2s both;
}

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

@keyframes scroll-line {
  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; }
}

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

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 20px;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 700; }

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.about-card {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}

.ac-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 14px;
}

.about-card h4 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.about-card p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.project-card {
  display: grid;
  grid-template-columns: 480px 1fr;
  min-height: 400px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.project-card:last-child { margin-bottom: 0; }

.project-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: var(--shadow-lg);
}

.project-card.project-featured { min-height: 460px; }

/* Project visual panel */
.project-visual {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  overflow: hidden;
  padding: 28px;
}

.project-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Mock browser window */
.pv-window {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out);
}

.project-card:hover .pv-window { transform: translateY(-8px) scale(1.02); }

.pw-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.pw-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pw-red    { background: #ff5f57; }
.pw-yellow { background: #febc2e; }
.pw-green  { background: #28c840; }

.pw-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-left: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pw-body {
  padding: 16px;
  background: var(--bg);
}

/* — AutoPay dashboard — */
.db-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.db-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text);
}

.db-badge {
  padding: 3px 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.db-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.metric-card {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.mc-val {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 3px;
}

.mc-label {
  font-size: 0.65rem;
  color: var(--muted);
}

.db-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.chart-bar {
  flex: 1;
  background: color-mix(in srgb, var(--accent) 35%, var(--surface));
  border-radius: 4px 4px 0 0;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  transition: background 0.3s;
}

.chart-bar.cb-hi { background: var(--accent); border-color: var(--accent); }

.chart-bar span {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}

.db-transactions { display: grid; gap: 6px; padding-top: 20px; }
.txn { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; }
.txn-name { color: var(--text-2); font-weight: 600; }
.txn-amt { font-weight: 800; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
.txn-out { color: var(--accent-3); }
.txn-in  { color: var(--accent); }

/* — VietO chat — */
.vieto-body { padding: 12px; }

.chat-interface { display: flex; flex-direction: column; gap: 10px; }

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bot-msg { flex-direction: row; }
.user-msg { flex-direction: row-reverse; }

.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.user-av { background: var(--accent-dim); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.bot-av { background: color-mix(in srgb, var(--purple) 15%, var(--surface)); color: var(--purple); border: 1px solid color-mix(in srgb, var(--purple) 25%, transparent); }

.chat-bubble {
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.5;
  max-width: 82%;
}

.user-bubble {
  background: var(--accent-dim);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.bot-bubble {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.bot-bubble p { margin: 6px 0 0; font-size: 0.73rem; }

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 14px;
}

.typing-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-bounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.rag-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.rag-tag {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.rag-tag i { color: var(--accent); font-size: 0.65rem; }

/* — CollabBoard canvas — */
.collab-body { padding: 12px; }

.canvas-area {
  position: relative;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.canvas-area svg { width: 100%; height: auto; display: block; }

.user-cursors { position: absolute; inset: 0; pointer-events: none; }

.ucursor {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ucursor i { font-size: 0.9rem; }

.uc-a { top: 35%; left: 18%; color: var(--accent); animation: cursor-a 3.5s ease-in-out infinite; }
.uc-b { bottom: 25%; right: 25%; color: var(--accent-2); animation: cursor-b 4s ease-in-out infinite; }
.uc-a span { color: var(--accent); }
.uc-b span { color: var(--accent-2); }

@keyframes cursor-a {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(18px, -14px); }
}
@keyframes cursor-b {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(-20px, 12px); }
}

.collab-pills {
  display: flex;
  gap: 8px;
  padding: 8px;
  flex-wrap: wrap;
}

.cpill {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Project body (right side) */
.project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ptag {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.77rem;
  font-weight: 800;
  border: 1px solid var(--border);
}

.ptag-type { background: var(--accent-dim); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.ptag-lang { background: var(--surface-2); color: var(--muted); }

.project-name {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.15;
}

.project-desc {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.78;
  margin-bottom: 20px;
}

.project-highlights {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.project-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.5;
}

.project-highlights i {
  color: var(--accent);
  font-size: 0.75rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.project-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: all 0.2s;
}

.proj-link:hover { transform: translateY(-2px); }

.proj-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.proj-primary:hover { box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 38%, transparent); }

.proj-notes:hover {
  border-color: var(--border-2);
  background: var(--surface);
}

/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skill-group {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.skill-group:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}

.sg-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.sg-icon {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.9rem;
}

.sg-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.18s, border-color 0.18s;
  cursor: default;
}
.chip:hover { transform: translateY(-2px); }
.chip i { font-size: 0.85rem; }

.chip-primary { background: var(--bg-2); color: var(--text-2); }
.chip-primary:hover { border-color: var(--accent); color: var(--accent); }

.chip-blue { background: color-mix(in srgb, var(--blue) 8%, var(--bg-2)); color: var(--text-2); }
.chip-blue:hover { border-color: var(--blue); color: var(--blue); }

.chip-green { background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); color: var(--text-2); }
.chip-green:hover { border-color: var(--accent); color: var(--accent); }

.chip-orange { background: color-mix(in srgb, var(--accent-2) 8%, var(--bg-2)); color: var(--text-2); }
.chip-orange:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ============================================================
   ACHIEVEMENTS SECTION
   ============================================================ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.achievement-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--accent-dim);
  pointer-events: none;
  transition: transform 0.4s var(--ease-out);
}

.achievement-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-md);
}

.achievement-card:hover::before { transform: scale(2); }

.ach-rank {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 25%, transparent);
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ach-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.achievement-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.4;
}

.achievement-card p {
  font-size: 0.845rem;
  color: var(--muted);
  line-height: 1.7;
}

.ach-year {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--muted);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: start;
}

.contact-bio {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 480px;
}

.contact-details { display: grid; gap: 14px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.22s var(--ease-out);
}

.contact-item:hover {
  transform: translateX(5px);
  border-color: var(--accent);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 12%, transparent);
}

.ci-icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.ci-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.ci-value {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
  word-break: break-all;
}

/* CTA card */
.cta-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.cta-card h3 {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.cta-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.cta-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cta-social {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.cta-social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1rem;
  transition: all 0.2s;
}

.cta-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ============================================================
   PROJECT MODAL
   ============================================================ */
dialog.project-modal {
  width: min(700px, calc(100vw - 28px));
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
}

.modal-shell {
  position: relative;
  padding: clamp(28px, 5vw, 48px);
}

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 1rem;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text); border-color: var(--border-2); }

.modal-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
}

.modal-summary {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.modal-block {
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.modal-block h4 {
  font-size: 0.875rem;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-block h4 i { color: var(--accent); }

.modal-block ul {
  display: grid;
  gap: 9px;
}

.modal-block ul li {
  font-size: 0.855rem;
  color: var(--muted);
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
}

.modal-block ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 50px 0 60px;
    text-align: left;
  }

  .hero-portrait { order: -1; max-width: 420px; }
  .portrait-frame { max-width: 100%; }

  .float-badge { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-cards { grid-template-columns: repeat(2, 1fr); }

  .project-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .project-visual {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 280px;
  }

  .pv-window { width: min(90%, 420px); }

  .achievements-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .cta-card { position: static; }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }
  .logo-name { display: none; }

  .section { padding: 70px 0; }
  .section-sub { margin-bottom: 36px; }

  .hero { min-height: auto; padding-bottom: 60px; }
  .hero-title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { justify-content: center; }

  .about-cards { grid-template-columns: 1fr; }

  .project-card { margin-bottom: 18px; }
  .project-visual { min-height: 240px; }

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

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

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

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
  .container { width: calc(100vw - 32px); }

  .hero-title { font-size: clamp(2.1rem, 11vw, 3rem); }

  .nav-resume-btn { display: none; }

  .hero-role { gap: 6px; }
  .role-sep { display: none; }
  .role-tag { font-size: 0.76rem; }

  .about-card { padding: 18px; }

  .project-body { padding: 20px; }

  .skill-group { padding: 20px; }

  .achievement-card { padding: 22px; }

  .footer-inner { padding: 0 20px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
