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

:root {
  --bg:          #000000;
  --bg-card:     #1d1d1f;
  --bg-lift:     #161617;
  --accent:      #2997ff;
  --accent2:     #64d2ff;
  --text:        #f5f5f7;
  --muted:       #86868b;
  --border:      rgba(255,255,255,0.08);
  --glow:        rgba(41,151,255,0.2);
  --glow2:       rgba(100,210,255,0.15);
  --radius:      18px;
  --radius-sm:   12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--text); }

/* ─── HERO ─── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 120px clamp(1.5rem, 5vw, 4rem) 4rem;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(41,151,255,0.15), transparent);
  pointer-events: none;
}

/* ─── 3D ROBOT ─── */
#robot3d-container {
  position: relative;
  width: 350px;
  height: 450px;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  #robot3d-container {
    width: 280px;
    height: 380px;
  }
}

@media (max-width: 768px) {
  #hero {
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2rem;
    text-align: center;
  }

  .hero-inner {
    text-align: center;
    width: 100%;
  }
  
  #robot3d-container {
    width: 100%;
    height: 280px;
    margin: 0 auto;
  }
}

#robot3d-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ─── ROBOT PLAY BUTTON ─── */
#robot-play-btn {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: rgba(41, 151, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(41, 151, 255, 0.5), 0 0 40px rgba(41, 151, 255, 0.2);
}

#robot-play-btn.loaded {
  opacity: 1;
  pointer-events: auto;
}

#robot-play-btn:hover {
  background: rgba(41, 151, 255, 1);
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 30px rgba(41, 151, 255, 0.7), 0 0 60px rgba(41, 151, 255, 0.3);
}

#robot-play-btn.playing {
  background: rgba(100, 210, 255, 0.9);
  animation: pulse-btn 1.5s ease-in-out infinite;
}

#robot-play-btn svg {
  width: 24px;
  height: 24px;
  color: white;
  margin-left: 2px;
}

#robot-play-btn.playing svg {
  margin-left: 0;
}

@keyframes pulse-btn {
  0%, 100% {
    box-shadow: 0 0 20px rgba(100, 210, 255, 0.5), 0 0 40px rgba(100, 210, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(100, 210, 255, 0.7), 0 0 60px rgba(100, 210, 255, 0.4);
  }
}

@media (max-width: 1024px) {
  #robot-play-btn {
    width: 45px;
    height: 45px;
    top: 6%;
  }

  #robot-play-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  #robot-play-btn {
    width: 40px;
    height: 40px;
    top: 10px;
  }

  #robot-play-btn svg {
    width: 18px;
    height: 18px;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  text-align: left;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: heroIn 1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.05s both;
}

@media (max-width: 768px) {
  .hero-eyebrow {
    justify-content: center;
    width: 100%;
  }
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent2);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #30d158;
  animation: pulse 2s infinite;
}

h1 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: heroIn 1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.2s both;
}

@media (max-width: 768px) {
  h1 {
    text-align: center;
  }
}
h1 .name-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0;
  animation: heroIn 1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.35s both;
}

@media (max-width: 768px) {
  .hero-desc {
    text-align: center;
    margin: 0 auto 2.5rem;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: heroIn 1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.5s both;
}

@media (max-width: 768px) {
  .hero-cta {
    justify-content: center;
  }
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: background 0.3s, transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.3s;
  will-change: transform;
}
.btn-primary:hover {
  background: #0077ed;
  box-shadow: 0 8px 30px rgba(41,151,255,0.25);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: 1.5px solid var(--border);
  color: var(--accent);
  text-decoration: none;
  border-radius: 980px;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  transition: border-color 0.3s, background 0.3s, transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.3s;
  will-change: transform;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(41,151,255,0.08);
  box-shadow: 0 4px 20px rgba(41,151,255,0.1);
}

/* terminal cursor blink */
.cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ─── SECTIONS SHARED ─── */
section {
  padding: 7rem clamp(1.5rem, 5vw, 4rem);
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.section-sub {
  color: var(--muted);
  max-width: 480px;
  font-size: 1.0625rem;
  font-weight: 400;
  margin-bottom: 3.5rem;
  line-height: 1.6;
}

/* ─── PROJECTS ─── */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.25rem;
  align-items: start;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
  cursor: default;
  will-change: transform;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.03), transparent 60%);
  pointer-events: none;
}
.project-card:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.project-card.cyan-accent:hover {
  border-color: rgba(100,210,255,0.2);
}
.project-card.violet-accent {
  min-height: 420px;
}
.project-card.violet-accent:hover {
  border-color: rgba(167,139,250,0.25);
  box-shadow: 0 20px 60px rgba(167,139,250,0.08);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon.indigo { background: rgba(41,151,255,0.12); }
.card-icon.cyan   { background: rgba(100,210,255,0.1); }
.card-icon.violet { background: rgba(167,139,250,0.12); }
.card-icon img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 50%;
}

.card-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  padding: 0.25rem 0.625rem;
  border-radius: 980px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.tag-indigo { background: rgba(41,151,255,0.12); color: #64b5f6; }
.tag-cyan   { background: rgba(100,210,255,0.1); color: #67e8f9; }
.tag-violet { background: rgba(167,139,250,0.12); color: #c4b5fd; }

.card-title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card-desc {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
  flex: 1;
}
.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.card-video {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: auto;
  width: fit-content;
  transition: gap 0.3s, color 0.3s;
}
.card-link:hover { gap: 0.6rem; color: var(--accent2); }
.card-link.cyan-link { color: var(--accent2); }
.card-link.cyan-link:hover { color: #67e8f9; }
.card-link.violet-link { color: #a78bfa; }
.card-link.violet-link:hover { color: #c4b5fd; }

/* ─── CHAT INTERFACE ─── */
.chat-container {
  margin-top: auto;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(167,139,250,0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.chat-messages {
  max-height: 180px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(167,139,250,0.2) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.2); border-radius: 2px; }
.chat-msg {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  animation: fadeIn 0.3s ease;
}
.chat-msg.user {
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.chat-msg.user .chat-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.chat-bubble {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  padding: 0.5rem 0.625rem;
  border-radius: 0 10px 10px 10px;
  max-width: 85%;
}
.chat-bubble strong {
  color: #c4b5fd;
  font-weight: 600;
}
.chat-msg.user .chat-bubble {
  background: rgba(41,151,255,0.12);
  border-radius: 10px 0 10px 10px;
}
.chat-input-wrap {
  display: flex;
  border-top: 1px solid rgba(167,139,250,0.1);
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  padding: 0.625rem 0.75rem;
  outline: none;
}
.chat-input::placeholder { color: var(--muted); opacity: 0.5; }
.chat-send {
  background: transparent;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  padding: 0.625rem 0.75rem;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}
.chat-send:hover {
  color: #c4b5fd;
  transform: scale(1.1);
}
.chat-send:active { transform: scale(0.95); }

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.625rem;
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a78bfa;
  animation: typingDot 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}
.chat-error {
  font-size: 0.65rem;
  color: #f87171;
  text-align: center;
  padding: 0.25rem 0.5rem;
  background: rgba(248,113,113,0.1);
  border-radius: 6px;
  animation: fadeIn 0.3s ease;
}
.arrow { font-size: 0.875rem; }

/* ─── SKILLS ─── */
#skills { background: var(--bg-lift); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.3s;
}
.skill-group:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.skill-group-title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.pill {
  padding: 0.25rem 0.625rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 980px;
  font-size: 0.75rem;
  color: var(--text);
  font-weight: 400;
  transition: background 0.3s, border-color 0.3s;
}
.pill:hover {
  background: rgba(41,151,255,0.1);
  border-color: rgba(41,151,255,0.25);
}

/* ─── DEVICES ─── */
#devices { background: var(--bg); }

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.3s;
}
.device-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.device-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(41,151,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.device-name {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.device-spec {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.device-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}
.device-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  padding: 0.2rem 0.5rem;
  border-radius: 980px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  background: rgba(41,151,255,0.12);
  color: #64b5f6;
  width: fit-content;
  margin-top: auto;
}
.devices-quote {
  margin-top: 2.5rem;
  text-align: center;
}
.devices-quote blockquote {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted);
  font-style: italic;
  position: relative;
  display: inline-block;
}
.devices-quote blockquote::before,
.devices-quote blockquote::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  margin: 0 auto 1rem;
}
.devices-quote blockquote::after {
  margin: 1rem auto 0;
}

/* ─── CONTACT ─── */
#contact { background: var(--bg); }

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 720px) {
  .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
}

.contact-info h2 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.contact-info p {
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 360px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  transition: color 0.3s;
  width: fit-content;
}
.social-link:hover { color: var(--text); }
.social-link svg { flex-shrink: 0; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); opacity: 0.5; }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(41,151,255,0.12);
}
.form-group textarea { min-height: 120px; }

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  letter-spacing: -0.01em;
  align-self: flex-start;
}
.btn-send:hover {
  background: #0077ed;
  transform: scale(1.02);
}
.btn-send:active { transform: scale(0.98); }

/* ─── FOOTER ─── */
footer {
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
footer p {
  font-size: 0.75rem;
  color: var(--muted);
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { color: var(--accent2); }
.footer-logo {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.footer-logo span { color: var(--accent); }

/* ─── SCROLL REVEAL (21st.dev style) ─── */
.reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(12px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.6, 0.2, 1),
              filter 0.8s cubic-bezier(0.2, 0.6, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ─── KEYFRAMES ─── */
@keyframes heroIn {
  from { opacity: 0; filter: blur(14px); transform: translateY(14px); }
  to   { opacity: 1; filter: blur(0);   transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(48,209,88,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(48,209,88,0); }
}

.contact-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cta-note {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 400px;
  margin-bottom: 0.5rem;
}
.cta-email, .cta-phone {
  width: fit-content;
  font-size: 0.8125rem;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ─── SECURITY ─── */
img {
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

/* Dev tools warning modal */
.devtools-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  background: rgba(20, 20, 22, 0.98);
  border: 1px solid rgba(255, 59, 48, 0.4);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 59, 48, 0.15);
  animation: devtoolsPulse 2s ease-in-out infinite;
  max-width: 420px;
  width: 90%;
  text-align: center;
}

.devtools-modal.active {
  display: block;
}

.devtools-modal .devtools-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: rgba(255, 59, 48, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: devtoolsShake 0.5s ease-in-out;
}

.devtools-modal .devtools-icon svg {
  color: #ff3b30;
}

.devtools-modal h3 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ff3b30;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.devtools-modal p {
  color: #86868b;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.devtools-modal .devtools-close {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff3b30;
  border-radius: 980px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.devtools-modal .devtools-close:hover {
  background: rgba(255, 59, 48, 0.25);
  transform: scale(1.02);
}

.devtools-modal .devtools-close:active {
  transform: scale(0.98);
}

@keyframes devtoolsPulse {
  0%, 100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 59, 48, 0.15); }
  50% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 59, 48, 0.25); }
}

@keyframes devtoolsShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

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

/* ─── MOBILE NAV ─── */
@media (max-width: 600px) {
  .nav-links { display: none; }
}

/* ─── SCROLL PROGRESS BAR ─── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ─── FLOATING AMBIENT ORBS ─── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  opacity: 0.5;
}
.orb-1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(41,151,255,0.3) 0%, transparent 70%);
  top: -160px; right: -120px;
  animation: floatOrb1 20s ease-in-out infinite;
}
.orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(100,210,255,0.2) 0%, transparent 70%);
  bottom: -140px; left: 8%;
  animation: floatOrb2 24s ease-in-out infinite;
}
.orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(41,151,255,0.25) 0%, transparent 70%);
  top: 35%; left: -100px;
  animation: floatOrb3 28s ease-in-out infinite;
}
@keyframes floatOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(1.08); }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -30px) scale(0.95); }
}
@keyframes floatOrb3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
}

/* mouse-follow spotlight in hero */
.hero-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 500px at var(--mx, 50%) var(--my, 30%), rgba(41,151,255,0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── DESIGNATION ROTATOR ─── */
.hero-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  font-weight: 400;
  color: var(--accent2);
  margin-bottom: 1rem;
  min-height: 1.5em;
  display: flex;
  align-items: center;
  opacity: 0;
  animation: heroIn 1s cubic-bezier(0.2, 0.6, 0.2, 1) 0.3s both;
}

@media (max-width: 768px) {
  .hero-role {
    justify-content: center;
  }
}
.hero-role .role-prefix {
  color: var(--muted);
  margin-right: 0.5rem;
  font-weight: 400;
}
.hero-role .role-text {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.role-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent2);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ─── PROJECT CARD SHINE SWEEP ─── */
.project-card .shine {
  position: absolute;
  top: 0; left: -150%;
  width: 50%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: skewX(-20deg);
  transition: left 0.9s ease;
  pointer-events: none;
  z-index: 1;
}
.project-card:hover .shine { left: 150%; }

/* gentle icon float */
.card-icon {
  animation: iconFloat 5s ease-in-out infinite;
}
@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* animated gradient underline for section titles */
.section-title-wrap {
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 2px;
  margin-top: 0.75rem;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform-origin: left;
  animation: scaleIn 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@keyframes scaleIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ─── SMOOTH TRANSITIONS FOR ALL INTERACTIVE ELEMENTS ─── */
a, button {
  transition: color 0.3s, background 0.3s, border-color 0.3s, transform 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ─── STAGGER ANIMATION UTILITY ─── */
[data-stagger] > * {
  opacity: 0;
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
[data-stagger] > *:nth-child(1) { animation-delay: 0.1s; }
[data-stagger] > *:nth-child(2) { animation-delay: 0.2s; }
[data-stagger] > *:nth-child(3) { animation-delay: 0.3s; }
[data-stagger] > *:nth-child(4) { animation-delay: 0.4s; }
[data-stagger] > *:nth-child(5) { animation-delay: 0.5s; }
