/* Design tokens — Y2K Neo-Pop */
:root {
  --surface: #f0f2ff;
  --primary: #5d5dff;
  --secondary: #ff61d2;
  --accent: #20ff8b;
  --text: #121212;
  --text-body: #4a4a4a;
  --text-mute: #8e8e8e;
  --border: #000000;
  --radius: 12px;
  --radius-none: 0;
  --nav-height: 52px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--surface);
  cursor: none;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
video,
iframe {
  max-width: 100%;
  vertical-align: middle;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Custom cursor */
.cursor-dot {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: rgba(93, 93, 255, 0.25);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, background 0.15s, border-color 0.15s;
  mix-blend-mode: multiply;
}

.cursor-dot.is-pointer {
  width: 36px;
  height: 36px;
  background: var(--text);
  border-color: var(--accent);
}

@media (pointer: coarse) {
  body {
    cursor: auto;
  }
  .cursor-dot {
    display: none;
  }
}

/* Header + floating nav (desktop: top center) */
.site-header {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.floating-nav {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: rgba(240, 242, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--border);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--border);
}

.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.nav-link:hover {
  text-decoration: none;
  background: rgba(255, 97, 210, 0.2);
  transform: translateY(-1px);
}

.nav-link.active {
  background: var(--border);
  color: #fff;
  border-color: var(--border);
}

/* Mobile: bottom nav */
@media (max-width: 768px) {
  .site-header {
    top: auto;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .floating-nav {
    width: calc(100% - 1.5rem);
    max-width: 480px;
    border-radius: var(--radius);
    justify-content: space-between;
    gap: 0;
    padding: 0.4rem 0.5rem;
  }

  .nav-link {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.5rem 0.2rem;
    font-size: 0.72rem;
  }

  main {
    padding-bottom: calc(var(--nav-height) + 1.5rem);
  }
}

.section {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  max-width: 1120px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  max-width: 36rem;
  color: var(--text-body);
}

.subheading {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin: 2rem 0 1rem;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  max-width: none;
  overflow: hidden;
}

.wavy-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  background-color: transparent;
  background-image:
    linear-gradient(var(--border) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--border) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  animation: waveShift 8s linear infinite;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

@keyframes waveShift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 48px 24px, 24px 48px;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-cards {
    justify-content: center;
  }
}

.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 800px;
}

.avatar-stage {
  width: min(280px, 70vw);
  height: min(340px, 75vw);
  position: relative;
}

.avatar-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: spinY 18s linear infinite;
}

.avatar-stage:hover .avatar-3d {
  animation-play-state: paused;
  transform: rotateY(20deg) rotateX(-12deg) scale(1.02);
}

@keyframes spinY {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

.avatar-body {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 55%;
  height: 38%;
  margin-left: -27.5%;
  background: var(--primary);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transform: translateZ(20px);
  box-shadow: 6px 6px 0 var(--secondary);
}

.avatar-hood {
  position: absolute;
  left: 50%;
  top: 28%;
  width: 70%;
  height: 42%;
  margin-left: -35%;
  background: #dcd6ff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transform: translateZ(40px) rotateX(5deg);
}

.avatar-head {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 38%;
  padding-bottom: 38%;
  margin-left: -19%;
  background: #ffe8f4;
  border: 2px solid var(--border);
  border-radius: 50%;
  transform: translateZ(60px);
}

.avatar-stage:hover .avatar-body {
  transform: translateZ(20px) rotateZ(-8deg) translateY(-8px);
}

.avatar-stage:hover .avatar-hood {
  transform: translateZ(50px) rotateX(25deg);
}

.hero-copy {
  position: relative;
}

.eyebrow {
  color: var(--text-mute);
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 1rem;
}

.title-line {
  display: block;
}

.title-line.accent {
  color: var(--primary);
  text-shadow: 3px 3px 0 var(--secondary);
}

.slogan {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  min-height: 1.6em;
  margin: 0 0 1rem;
}

.slogan-type {
  color: var(--secondary);
}

.slogan-caret {
  animation: blink 0.9s step-end infinite;
  color: var(--primary);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.lead {
  margin: 0 0 2rem;
  max-width: 32rem;
}

.hero-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.quick-card {
  flex: 1 1 160px;
  max-width: 200px;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-body);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 4px 4px 0 var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.quick-card:hover {
  text-decoration: none;
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--secondary);
}

.quick-card strong {
  color: var(--text);
  font-size: 1.05rem;
}

.quick-card-tag {
  color: var(--primary);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Portfolio */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.filter-btn:hover {
  background: rgba(32, 255, 139, 0.25);
}

.filter-btn.active {
  background: var(--border);
  color: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.folder-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 4px 4px 0 rgba(93, 93, 255, 0.35);
}

.folder-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 10px 10px 0 var(--secondary);
}

.folder-card.hidden {
  display: none;
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, #ecebff, #ddd8ff);
  border-bottom: 2px solid var(--border);
}

.chrome-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.chrome-dot.red {
  background: #ff6b6b;
}
.chrome-dot.yellow {
  background: #ffd93d;
}
.chrome-dot.green {
  background: var(--accent);
}

.chrome-title {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-mute);
}

.folder-body {
  padding: 1rem 1.1rem 1.25rem;
}

.folder-body h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 97, 210, 0.15);
}

/* Insights */
.insights-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .insights-layout {
    grid-template-columns: 1fr;
  }
}

.article-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 4px 4px 0 var(--border);
}

.article-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text);
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-mute);
  margin-bottom: 0.75rem;
}

.article-card .md-body {
  font-size: 0.95rem;
}

.md-body pre,
.code-block {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: #121212;
  color: #e8e8e8;
  padding: 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  overflow-x: auto;
  margin: 0.75rem 0;
}

.ai-lab {
  position: sticky;
  top: 5rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 6px 6px 0 var(--accent);
}

.panel-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot-online {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--border);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(32, 255, 139, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(32, 255, 139, 0);
  }
}

.panel-desc {
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.ai-compare {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-col .label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.ai-output {
  margin: 0;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Skills */
.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .skills-layout {
    grid-template-columns: 1fr;
  }
}

.radar-wrap {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--primary);
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-row label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.skill-track {
  height: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-right: 2px solid var(--border);
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-row.in-view .skill-fill {
  width: var(--w);
}

.certs-strip {
  margin-top: 2.5rem;
}

.certs-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}

.cert-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 4px 4px 0 var(--border);
}

.cert-card strong {
  display: block;
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 0.35rem;
}

/* Talents */
.video-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.video-tile {
  position: relative;
  aspect-ratio: 9/16;
  background: #121212;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-tile video,
.video-tile .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.video-tile .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
  background: linear-gradient(145deg, #fff, var(--surface));
}

.gallery-item:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 6px 6px 0 var(--accent);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  border-top: 2px solid var(--border);
  font-size: 0.7rem;
  color: var(--text);
  text-align: center;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--accent);
  color: var(--text);
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--border);
  margin-bottom: 2rem;
  transition: transform 0.15s;
}

.btn-download:hover {
  text-decoration: none;
  transform: translate(-2px, -2px);
}

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 7px);
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--secondary);
  border: 2px solid var(--border);
  border-radius: 50%;
}

.timeline-item .when {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
}

.timeline-item h4 {
  margin: 0.25rem 0;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  font-family: var(--font-body);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--border);
  transition: transform 0.15s, background 0.2s;
}

.btn-primary:hover {
  background: #4848e0;
  transform: translate(-2px, -2px);
}

.form-hint {
  font-size: 0.7rem;
  color: var(--text-mute);
  margin-top: 0.75rem;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.social-link {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.15s;
}

.social-link:hover {
  text-decoration: none;
  background: var(--secondary);
  color: #fff;
  transform: translateY(-2px);
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem 6rem;
  color: var(--text-mute);
  font-size: 0.8rem;
}

@media (min-width: 769px) {
  .site-footer {
    padding-bottom: 2rem;
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-body {
  padding: 1rem 1.25rem 1.5rem;
}

.modal-body p {
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.modal-body .duty,
.modal-body .result {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-top: 0.75rem;
}

.modal-body .duty {
  background: rgba(93, 93, 255, 0.08);
}

.modal-body .result {
  background: rgba(32, 255, 139, 0.15);
}

.modal-close {
  display: block;
  width: calc(100% - 2rem);
  margin: 0 1rem 1rem;
  padding: 0.6rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(900px, 100%);
  max-height: 85vh;
  object-fit: contain;
  border: 2px solid #fff;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Scroll animations */
.bounce-in {
  animation: titleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section.is-visible .bounce-in {
  animation-delay: 0.05s;
}

/* Decorative parallax bits */
.deco-barcode {
  position: absolute;
  right: 4%;
  top: 20%;
  width: 40px;
  height: 120px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0 2px,
    transparent 2px 6px
  );
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}
