/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --c-bg:          #08080f;
  --c-bg-2:        #0d0d1a;
  --c-bg-3:        #111120;
  --c-surface:     #13131f;
  --c-surface-2:   #1a1a2c;
  --c-border:      rgba(255 255 255 / 0.07);
  --c-border-2:    rgba(255 255 255 / 0.12);

  --c-purple:      #7c3aed;
  --c-purple-light:#a78bfa;
  --c-purple-dim:  rgba(124 58 237 / 0.15);
  --c-accent:      #818cf8;
  --c-pink:        #ec4899;
  --c-cyan:        #06b6d4;
  --c-green:       #22c55e;

  --c-text:        #f1f5f9;
  --c-text-2:      #94a3b8;
  --c-text-3:      #64748b;

  /* Code token colors */
  --code-kw:    #c084fc;
  --code-str:   #86efac;
  --code-prop:  #7dd3fc;
  --code-var:   #f1f5f9;
  --code-op:    #94a3b8;
  --code-punc:  #64748b;

  /* Typography */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing (8px base) */
  --s-1: 0.5rem;   /* 8px  */
  --s-2: 1rem;     /* 16px */
  --s-3: 1.5rem;   /* 24px */
  --s-4: 2rem;     /* 32px */
  --s-5: 2.5rem;   /* 40px */
  --s-6: 3rem;     /* 48px */
  --s-8: 4rem;     /* 64px */
  --s-10: 5rem;    /* 80px */
  --s-12: 6rem;    /* 96px */

  /* Layout */
  --max-w: 1180px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Motion */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --t-fast:    150ms;
  --t-normal:  250ms;
  --t-slow:    400ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-purple); border-radius: 3px; }

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-2);
  padding: var(--s-1) var(--s-2);
  background: var(--c-purple);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--s-2); }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--s-3), 5vw, var(--s-8));
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) clamp(var(--s-3), 5vw, var(--s-8));
  transition: background var(--t-normal), backdrop-filter var(--t-normal), border-color var(--t-normal);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: var(--c-border);
}

.nav__logo {
  display: flex;
  align-items: center;
  outline-offset: 4px;
}
.nav__logo-img {
  height: 100px;
  width: auto;
  display: block;
  border-radius: 12px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-2);
  transition: color var(--t-fast);
  outline-offset: 4px;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--c-text); }

.nav__cta {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius-sm);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast) !important;
}
.nav__cta:hover {
  border-color: var(--c-purple-light);
  color: var(--c-purple-light) !important;
  background: var(--c-purple-dim);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--s-1);
  outline-offset: 4px;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--t-normal) var(--ease-out), opacity var(--t-fast), width var(--t-normal);
}
.nav__toggle span:nth-child(1) { width: 20px; }
.nav__toggle span:nth-child(2) { width: 14px; }
.nav__toggle span:nth-child(3) { width: 20px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 20px; }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-normal),
              background var(--t-fast),
              opacity var(--t-fast);
  outline-offset: 3px;
  touch-action: manipulation;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--c-purple), #6366f1);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
}

.btn--outline {
  background: transparent;
  color: var(--c-text-2);
  border: 1px solid var(--c-border-2);
}
.btn--outline:hover {
  transform: translateY(-2px);
  color: var(--c-text);
  border-color: rgba(255 255 255 / 0.25);
}

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

/* ============================================================
   SECTIONS — shared
   ============================================================ */
section { padding-block: var(--s-12); position: relative; }

.section-header {
  text-align: center;
  margin-bottom: var(--s-8);
}
.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-purple-light);
  margin-bottom: var(--s-2);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: var(--c-text);
}
.section-sub {
  margin-top: var(--s-2);
  color: var(--c-text-2);
  font-size: 1rem;
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.65;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  padding-inline: clamp(var(--s-3), 5vw, var(--s-8));
  overflow: hidden;
}

/* Background mesh */
.hero__mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}
.mesh-orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle at center, rgba(124,58,237,0.22) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation: orbDrift1 18s ease-in-out infinite;
}
.mesh-orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle at center, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: 30%; right: -80px;
  animation: orbDrift2 22s ease-in-out infinite;
}
.mesh-orb--3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle at center, rgba(236,72,153,0.1) 0%, transparent 70%);
  bottom: 10%; left: 40%;
  animation: orbDrift1 16s ease-in-out infinite reverse;
}

@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0); }
  33%       { transform: translate(40px, -30px); }
  66%       { transform: translate(-20px, 40px); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0); }
  40%       { transform: translate(-50px, 30px); }
  70%       { transform: translate(30px, -20px); }
}

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

/* Inner layout */
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: center;
}

/* LEFT */
.hero__text { display: flex; flex-direction: column; gap: var(--s-4); }

.hero__available {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0.35rem 0.9rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #86efac;
  width: fit-content;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-green);
  flex-shrink: 0;
  animation: statusPulse 2.5s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--c-text);
}
.hero__name-line1 {
  display: block;
  color: var(--c-text-3);
}
.hero__name-line2 {
  display: block;
  background: linear-gradient(135deg, var(--c-text) 0%, var(--c-purple-light) 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__name-dot { color: var(--c-purple); -webkit-text-fill-color: var(--c-purple); }

.hero__role {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--c-text-2);
  font-weight: 400;
  min-height: 1.6em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.role-prefix { color: var(--c-text-3); }
.role-typed { color: var(--c-purple-light); font-weight: 500; }
.role-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--c-purple-light);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero__desc {
  font-size: 1rem;
  color: var(--c-text-2);
  line-height: 1.7;
  max-width: 440px;
}

.hero__actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-1);
}
.hero__stat {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.stat-unit { font-size: 1.25rem; color: var(--c-purple-light); font-weight: 700; }
.stat-label {
  font-size: 0.72rem;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}
.hero__stat-divider {
  width: 1px;
  height: 32px;
  background: var(--c-border-2);
  flex-shrink: 0;
}

/* RIGHT — code card */
.hero__visual { position: relative; }

.code-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255 255 255 / 0.04),
    0 24px 64px rgba(0 0 0 / 0.5),
    0 0 80px rgba(124, 58, 237, 0.08);
}

.code-card__header {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-2) var(--s-3);
  background: var(--c-bg-3);
  border-bottom: 1px solid var(--c-border);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #ffbd2e; }
.dot--green  { background: #28c840; }
.code-card__filename {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--c-text-3);
  font-family: 'SF Mono', 'Consolas', monospace;
}

.code-card__body {
  padding: var(--s-3) var(--s-4);
  font-family: 'SF Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
}
.code-card__body code { display: block; white-space: pre; }

.t-kw   { color: var(--code-kw); }
.t-str  { color: var(--code-str); }
.t-prop { color: var(--code-prop); }
.t-var  { color: var(--code-var); }
.t-op   { color: var(--code-op); }
.t-punc { color: var(--code-punc); }

.code-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-1) var(--s-3);
  background: var(--c-bg-3);
  border-top: 1px solid var(--c-border);
  font-size: 0.7rem;
  color: var(--c-text-3);
  font-family: 'SF Mono', 'Consolas', monospace;
}
.code-card__lang {
  color: var(--c-purple-light);
  font-weight: 600;
}

/* Floating chips */
.skill-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.75rem;
  background: rgba(13, 13, 26, 0.9);
  border: 1px solid var(--c-border-2);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--c-text-2);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0 0 0 / 0.4);
  pointer-events: none;
}
.skill-chip svg { color: var(--c-purple-light); flex-shrink: 0; }

.chip--1 { bottom: -16px; left: -32px; animation: chipFloat 4s ease-in-out infinite; }
.chip--2 { top: -16px; right: -20px;   animation: chipFloat 5s ease-in-out infinite 1s; }
.chip--3 { bottom: 30%; right: -36px;  animation: chipFloat 6s ease-in-out infinite 0.5s; }

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

/* Scroll cue */
.hero__scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-8);
  margin-inline: auto;
  color: var(--c-text-3);
  transition: color var(--t-fast);
  width: fit-content;
  outline-offset: 4px;
}
.hero__scroll:hover { color: var(--c-purple-light); }
.scroll-line {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, currentColor);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.7; transform: scaleY(0.6); }
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects { background: var(--c-bg-2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-3);
}

/* Featured card spans 5 columns */
.project-card--featured { grid-column: span 5; }

/* Regular cards span 4 columns on row 1, and distribute on row 2 */
.projects-grid .project-card:nth-child(2) { grid-column: span 4; }
.projects-grid .project-card:nth-child(3) { grid-column: span 3; }
.projects-grid .project-card:nth-child(4) { grid-column: span 4; }
.projects-grid .project-card:nth-child(5) { grid-column: span 4; }
.projects-grid .project-card:nth-child(6) { grid-column: span 4; }

.project-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-normal), transform var(--t-normal) var(--ease-out), box-shadow var(--t-normal);
  cursor: default;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(124,58,237,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t-normal);
  pointer-events: none;
}
.project-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0 0 0 / 0.4);
}
.project-card:hover::before { opacity: 1; }

.project-card--featured {
  background: linear-gradient(135deg, var(--c-surface), rgba(124,58,237,0.06));
  border-color: rgba(124, 58, 237, 0.2);
}

.project-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-purple-light);
  margin-bottom: var(--s-1);
}
.project-card__label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-purple-light);
  flex-shrink: 0;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-year {
  font-size: 0.72rem;
  color: var(--c-text-3);
  font-variant-numeric: tabular-nums;
}

.project-card__links {
  display: flex;
  gap: var(--s-1);
}
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  color: var(--c-text-3);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
  outline-offset: 3px;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
}
.icon-btn:hover {
  border-color: var(--c-purple-light);
  color: var(--c-purple-light);
  background: var(--c-purple-dim);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--c-text);
  margin-top: auto;
}
.project-card--featured .project-card__title { font-size: 2rem; }

.project-card__sub {
  font-size: 0.78rem;
  color: var(--c-purple-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card__desc {
  font-size: 0.875rem;
  color: var(--c-text-2);
  line-height: 1.65;
  flex: 1;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.project-card__stack span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--c-purple-dim);
  color: var(--c-purple-light);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* ============================================================
   HIGHLIGHTS
   ============================================================ */
.highlights { background: var(--c-bg); }

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-10);
  align-items: start;
}

/* Timeline */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-3);
  position: relative;
}

.timeline-item__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}
.timeline-item__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--c-purple);
  border: 2px solid var(--c-bg);
  outline: 2px solid rgba(124, 58, 237, 0.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.timeline-item__line {
  width: 1px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(to bottom, rgba(124,58,237,0.4), rgba(124,58,237,0.05));
  margin-top: 4px;
}

.timeline-item__body { padding-bottom: var(--s-5); }
.timeline-item:last-child .timeline-item__body { padding-bottom: 0; }

.timeline-item__period {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--c-purple-light);
  margin-bottom: var(--s-1);
}
.timeline-item__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}
.timeline-item__company {
  display: block;
  font-size: 0.82rem;
  color: var(--c-text-3);
  margin-bottom: 0.5rem;
  margin-top: 2px;
}
.timeline-item__desc {
  font-size: 0.875rem;
  color: var(--c-text-2);
  line-height: 1.65;
}

/* Achievements */
.achievements { display: flex; flex-direction: column; gap: var(--s-1); }

.achievement {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: border-color var(--t-normal), background var(--t-normal), transform var(--t-normal) var(--ease-out);
}
.achievement:hover {
  border-color: var(--c-border-2);
  background: var(--c-surface);
  transform: translateX(4px);
}

.achievement__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--c-purple-dim);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--c-purple-light);
  flex-shrink: 0;
  margin-top: 2px;
}

.achievement h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 3px;
}
.achievement p {
  font-size: 0.82rem;
  color: var(--c-text-2);
  line-height: 1.5;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-8);
}

.service-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color var(--t-normal), transform var(--t-normal) var(--ease-out), box-shadow var(--t-normal);
}
.service-card:hover {
  border-color: var(--c-purple);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.15);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--c-purple-dim);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--c-purple-light);
  flex-shrink: 0;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text);
}

.service-card__desc {
  font-size: 0.875rem;
  color: var(--c-text-2);
  line-height: 1.7;
  flex: 1;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  list-style: none;
  padding: 0;
  margin: 0;
}
.service-card__tags li {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-purple-light);
  background: var(--c-purple-dim);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 99px;
  padding: 3px 10px;
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--c-bg-2);
  overflow: hidden;
}
.contact__glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 65%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--s-10);
  align-items: start;
  position: relative;
  z-index: 1;
}

.contact-info { display: flex; flex-direction: column; gap: var(--s-5); }
.contact-info__lead {
  font-size: 1rem;
  color: var(--c-text-2);
  line-height: 1.75;
}

.contact-links { display: flex; flex-direction: column; gap: var(--s-1); }

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  transition: border-color var(--t-normal), transform var(--t-normal) var(--ease-out), background var(--t-normal);
  outline-offset: 3px;
  min-height: 44px;
}
.contact-link:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: var(--c-surface-2);
  transform: translateX(4px);
}

.contact-link--whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.4);
}
.contact-link--whatsapp .contact-link__icon {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.25);
  color: #25d366;
}

.contact-link__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--c-purple-dim);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--c-purple-light);
  flex-shrink: 0;
}

.contact-link__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--c-text-3);
  margin-bottom: 2px;
}
.contact-link__value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
}
.contact-link__arrow {
  margin-left: auto;
  color: var(--c-text-3);
  flex-shrink: 0;
  transition: transform var(--t-normal) var(--ease-out), color var(--t-fast);
}
.contact-link:hover .contact-link__arrow {
  transform: translateX(3px);
  color: var(--c-purple-light);
}

/* Form */
.contact-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}

.form-group { display: flex; flex-direction: column; gap: var(--s-1); }

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-text-2);
}
.required { color: var(--c-purple-light); }

.form-group input,
.form-group textarea {
  background: var(--c-bg);
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius);
  padding: 0.7rem var(--s-2);
  color: var(--c-text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  line-height: 1.5;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  resize: vertical;
  min-height: 44px;
  touch-action: manipulation;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--c-text-3); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--c-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.form-group input.is-error,
.form-group textarea.is-error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.form-error {
  font-size: 0.75rem;
  color: #fca5a5;
  min-height: 1em;
}

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255 255 255 / 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0.85rem var(--s-2);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: #86efac;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding-block: var(--s-4);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: 0.8rem;
  color: var(--c-text-3);
}
.footer__sep { color: var(--c-border-2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; max-width: 600px; }
  .hero__visual { display: none; }
  .hero__text { gap: var(--s-3); }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card--featured,
  .projects-grid .project-card:nth-child(n) {
    grid-column: span 1;
  }

  .highlights-grid { grid-template-columns: 1fr; gap: var(--s-8); }

  .contact-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

@media (max-width: 768px) {
  section { padding-block: var(--s-10); }

  .nav__logo-img { height: 60px; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(8, 8, 15, 0.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--c-border);
    padding: var(--s-2) clamp(var(--s-3), 5vw, var(--s-8));
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: var(--s-2) 0; border-bottom: 1px solid var(--c-border); }
  .nav__links li:last-child a { border-bottom: none; }
  .nav__cta { border: none; padding: var(--s-2) 0; border-radius: 0; }
  .nav__toggle { display: flex; }

  .hero__name { font-size: clamp(2.5rem, 12vw, 3.5rem); letter-spacing: -1.5px; }
  .hero__scroll { margin-top: var(--s-5); }
  .hero__stats { gap: var(--s-3); }

  .projects-grid { grid-template-columns: 1fr; }
  .project-card--featured .project-card__title { font-size: 1.5rem; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: var(--s-3); }
}

@media (max-width: 480px) {
  .nav__logo-img { height: 48px; }
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   CHAT WIDGET
   ============================================================ */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.chat-widget__toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-purple), #6366f1);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.45);
  transition: transform var(--t-normal) var(--ease-out), box-shadow var(--t-normal);
  cursor: pointer;
  order: 2;
}
.chat-widget__toggle:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.6);
}
.chat-widget__toggle:active { transform: scale(0.96); }

.chat-icon--close { display: none; }
.chat-widget__toggle[aria-expanded="true"] .chat-icon--open  { display: none; }
.chat-widget__toggle[aria-expanded="true"] .chat-icon--close { display: block; }

.chat-box {
  order: 1;
  width: 340px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  max-height: 480px;
  animation: chatSlideIn 0.25s var(--ease-out);
}
@keyframes chatSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.chat-box__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--c-purple), #6366f1);
  color: #fff;
}
.chat-box__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.chat-box__name {
  font-weight: 700;
  font-size: 0.9rem;
}
.chat-box__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  opacity: 0.85;
}
.chat-box__status .status-dot {
  background: #86efac;
}

.chat-box__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-msg { max-width: 85%; }
.chat-msg p {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
}
.chat-msg--bot { align-self: flex-start; }
.chat-msg--bot p {
  background: var(--c-bg-3);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  border-bottom-left-radius: 4px;
}
.chat-msg--user { align-self: flex-end; }
.chat-msg--user p {
  background: linear-gradient(135deg, var(--c-purple), #6366f1);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--typing p {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.75rem 1rem;
}
.typing-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-text-3);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

.chat-box__input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg-2);
}
.chat-box__input input {
  flex: 1;
  background: var(--c-bg);
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--c-text);
  outline: none;
  transition: border-color var(--t-fast);
  min-height: 44px;
}
.chat-box__input input:focus { border-color: var(--c-purple); }
.chat-box__input input::placeholder { color: var(--c-text-3); }
.chat-box__input button {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--c-purple), #6366f1);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast), opacity var(--t-fast);
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
}
.chat-box__input button:hover { transform: scale(1.05); }
.chat-box__input button:active { transform: scale(0.95); }

@media (max-width: 480px) {
  .chat-widget { left: 1rem; bottom: 1rem; }
  .chat-box { width: calc(100vw - 2rem); }
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37, 211, 102, 0.45);
  transition: transform var(--t-normal) var(--ease-out), box-shadow var(--t-normal);
  outline-offset: 3px;
}
.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
}
.whatsapp-float:active { transform: scale(0.96); }

.whatsapp-float__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  color: var(--c-text);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  box-shadow: var(--shadow, 0 4px 16px rgba(0,0,0,0.3));
}
.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
  transform: translateX(0);
}

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