/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0a0a0c;
  --surface: #121216;
  --surface-2: #18181d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --dim: #71717a;
  --purple: #6d4ae0;
  --purple-brand: #512eae;
  --purple-soft: #a78bfa;
  --green: #66fe37;
  --green-soft: #8cff6b;
  --sans: "Onest", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 56rem;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.02em; }
::selection { background: var(--purple); color: #fff; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 999;
  padding: .6rem 1rem; background: var(--green); color: #000; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.grad {
  background: linear-gradient(100deg, var(--purple-soft) 0%, var(--purple) 45%, var(--green) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hl-purple { color: var(--purple-soft); }
.hl-green { color: var(--green-soft); }
strong { color: var(--text); font-weight: 600; }

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px 16px;
  transition: padding .4s var(--ease-out);
}
.nav-inner {
  max-width: var(--max); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 10px 8px 14px;
  border: 1px solid transparent; border-radius: 999px;
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav.is-scrolled .nav-inner {
  background: rgba(14, 14, 18, 0.72);
  border-color: var(--line);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.6);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 15px; }
.brand img { width: 36px; height: 36px; }
.nav-links { display: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--muted);
  transition: color .25s, background .25s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: rgba(255,255,255,.06); }
.nav-links a.is-active { color: var(--green-soft); }
.nav-toggle {
  width: 42px; height: 42px; border-radius: 999px;
  display: grid; place-content: center; gap: 6px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.03);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease-out); }
.nav.is-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav.is-open .nav-inner { background: rgba(14,14,18,.92); border-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav.is-open .nav-links {
  display: flex; flex-direction: column;
  position: absolute; top: 72px; left: 16px; right: 16px;
  padding: 10px; border-radius: 20px;
  background: rgba(14,14,18,.96); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav.is-open .nav-links a { font-size: 16px; padding: 12px 16px; }

/* =============================================================
   5. Components
   ============================================================= */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips-center { justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-strong);
  transition: transform .25s var(--ease-out), border-color .25s, background .25s;
}
.chip svg { width: 16px; height: 16px; flex: none; }
.chip:hover { transform: translateY(-2px); border-color: rgba(167,139,250,.6); background: rgba(109,74,224,.14); }
.chip-wa { border-color: rgba(102,254,55,.35); }
.chip-wa svg { color: var(--green); }
.chip-wa:hover { border-color: var(--green); background: rgba(102,254,55,.1); }

.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 700;
  margin-bottom: 36px;
}
.section-title svg { width: 28px; height: 28px; color: var(--purple-soft); }
.section-lead { color: var(--muted); max-width: 44rem; margin: -18px 0 32px; }

/* =============================================================
   6. Sections
   ============================================================= */
/* Hero */
.hero { position: relative; overflow-x: clip; padding-top: 140px; padding-bottom: 72px; }
.hero::after { content: none; }
.hero-glow {
  position: absolute; z-index: -1; pointer-events: none;
  top: 40px; left: 50%; width: min(720px, 100%); aspect-ratio: 1.6;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 35% 45%, rgba(109,74,224,.32), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(102,254,55,.10), transparent 70%);
  filter: blur(20px);
}
.hero-top { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 28px; }
.avatar {
  width: 88px; height: 88px; border-radius: 999px; object-fit: cover;
  border: 2px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(109,74,224,.55), 0 18px 40px -12px rgba(109,74,224,.6);
}
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  font-size: 13px; color: var(--green-soft);
  background: rgba(102,254,55,.07); border: 1px solid rgba(102,254,55,.28);
  transition: background .25s;
}
.status:hover { background: rgba(102,254,55,.13); }
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green);
  animation: pulse 1.8s var(--ease-out) infinite;
}
.hero-title { font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.2rem); font-weight: 800; margin-bottom: 22px; }
.hero-lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--muted); max-width: 46rem; margin-bottom: 30px; }

.section { padding-block: 64px; }

/* Timeline */
.timeline { position: relative; margin-left: 8px; border-left: 1px solid var(--line-strong); }
.tl-item { position: relative; padding: 0 0 44px 32px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-dot {
  position: absolute; left: -7px; top: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--purple-soft);
}
.tl-item:first-child .tl-dot { border-color: var(--green); box-shadow: 0 0 12px rgba(102,254,55,.6); }
.tl-date {
  display: inline-block; margin-bottom: 10px;
  padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--purple-soft); background: rgba(109,74,224,.14); border: 1px solid rgba(109,74,224,.35);
}
.tl-date.tl-now { color: var(--green-soft); background: rgba(102,254,55,.08); border-color: rgba(102,254,55,.3); }
.tl-item h3 { font-size: 1.25rem; font-weight: 700; }
.tl-org { color: var(--purple-soft); font-weight: 500; margin: 2px 0 10px; }
.tl-item p:last-child { color: var(--muted); max-width: 44rem; }

/* Projects */
.projects { display: grid; gap: 56px; }
.project { display: grid; gap: 22px; }
.project-visual {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 10; border-radius: var(--radius);
  border: 1px solid var(--line);
  display: grid; place-items: center; padding: 8%;
  transition: transform .5s var(--ease-out), border-color .5s;
}
.project:hover .project-visual { transform: translateY(-4px); border-color: rgba(167,139,250,.4); }
.v1 { background: radial-gradient(circle at 30% 20%, rgba(109,74,224,.55), transparent 60%), linear-gradient(135deg, #1a1030, #0c0c10); }
.v2 { background: radial-gradient(circle at 75% 25%, rgba(102,254,55,.25), transparent 55%), linear-gradient(135deg, #0f1a14, #0c0c10); }
.v3 { background: radial-gradient(circle at 25% 75%, rgba(109,74,224,.4), transparent 55%), radial-gradient(circle at 80% 20%, rgba(102,254,55,.18), transparent 50%), linear-gradient(135deg, #12121a, #0c0c10); }
.mock {
  width: 100%; height: 100%; border-radius: 12px; overflow: hidden;
  background: rgba(10,10,12,.82); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  display: flex; flex-direction: column;
  transition: transform .6s var(--ease-out);
}
.project:hover .mock { transform: scale(1.025); }
.mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mock-bar i:first-child { background: #ff5f57; } .mock-bar i:nth-child(2) { background: #febc2e; } .mock-bar i:nth-child(3) { background: #28c840; }
.mock-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; }
.mock-body img { width: 22%; max-width: 72px; }
.mock-body b { display: block; width: 52%; height: 10px; border-radius: 6px; background: rgba(255,255,255,.75); }
.mock-body b.short { width: 34%; height: 7px; background: rgba(255,255,255,.25); }
.mock-body em { display: block; width: 22%; height: 18px; border-radius: 999px; background: var(--green); margin-top: 4px; }
.mock-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.mock-grid span { border-radius: 8px; background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); border: 1px solid var(--line); }
.mock-grid span.wa { background: linear-gradient(160deg, rgba(102,254,55,.45), rgba(102,254,55,.1)); }
.mock-dash { flex: 1; display: grid; grid-template-columns: 22% 1fr; }
.mock-dash aside { background: rgba(109,74,224,.18); border-right: 1px solid var(--line); }
.mock-dash > div { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mock-dash b { display: block; width: 45%; height: 9px; border-radius: 6px; background: rgba(255,255,255,.6); }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 8%; padding-top: 6px; }
.bars s { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(var(--purple-soft), var(--purple)); }
.bars s:nth-child(1) { height: 40%; } .bars s:nth-child(2) { height: 65%; } .bars s:nth-child(3) { height: 50%; }
.bars s:nth-child(4) { height: 85%; background: linear-gradient(var(--green-soft), #2fbf14); } .bars s:nth-child(5) { height: 70%; }

.project-info h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green-soft); border: 1px solid rgba(102,254,55,.35);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tags li {
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  color: var(--purple-soft); background: rgba(109,74,224,.12); border: 1px solid rgba(109,74,224,.3);
}
.project-info p { color: var(--muted); margin-bottom: 18px; }
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sm {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  transition: border-color .25s, background .25s, transform .25s var(--ease-out);
}
.btn-sm svg { width: 16px; height: 16px; }
.btn-sm:hover { border-color: var(--green); background: rgba(102,254,55,.08); transform: translateY(-2px); }

/* Tech */
.tech-grid { display: grid; gap: 16px; }
.tech-card {
  padding: 26px 20px 22px; border-radius: 20px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  transition: border-color .4s, transform .4s var(--ease-out);
}
.tech-card:hover { border-color: rgba(167,139,250,.35); transform: translateY(-3px); }
.tech-card h3 { text-align: center; font-size: 1.35rem; font-weight: 700; margin-bottom: 22px; }
.t-front { color: #7dd3fc; } .t-back { color: var(--purple-soft); } .t-infra { color: var(--green-soft); } .t-tools { color: #fdba74; }
.tech-card ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 8px; }
.tech-card li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tech-card li img, .tech-card li svg { width: 38px; height: 38px; transition: transform .3s var(--ease-out); }
.tech-card li:hover img, .tech-card li:hover svg { transform: translateY(-3px) scale(1.08); }
.ic-line { color: var(--green); }
.ic-eset { color: #2fd4c0; }

/* About */
.about { display: grid; gap: 32px; align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 16px; font-size: 1.05rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-photo {
  justify-self: center; width: min(280px, 80%); aspect-ratio: 1;
  border-radius: 20px; overflow: hidden; transform: rotate(3deg);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px rgba(109,74,224,.5), 0 30px 60px -20px rgba(109,74,224,.55);
  transition: transform .5s var(--ease-out);
}
.about-photo:hover { transform: rotate(0deg) scale(1.02); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

/* CTA */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: 56px 24px; border-radius: 28px;
  background: radial-gradient(ellipse at 50% 0%, rgba(109,74,224,.35), transparent 65%), var(--surface);
  border: 1px solid var(--line);
}
.cta-logo { width: 72px; height: 72px; margin: 0 auto 20px; }
.cta h2 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem); font-weight: 700; max-width: 36rem; margin: 0 auto 28px; }

/* Footer */
.footer {
  display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
  padding-block: 32px 40px; margin-top: 24px;
  border-top: 1px solid var(--line); color: var(--dim); font-size: 14px;
}
.footer-loc { display: inline-flex; align-items: center; gap: 6px; }
.footer-loc svg { width: 15px; height: 15px; color: var(--green); }

/* =============================================================
   7. Effects
   ============================================================= */
@keyframes pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.8); opacity: 0; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .tech-card ul { grid-template-columns: repeat(3, 1fr); }
  .avatar { width: 104px; height: 104px; }
}
@media (min-width: 720px) {
  .container { padding-inline: 32px; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1.5fr 1fr; gap: 48px; }
  .footer { flex-direction: row; justify-content: space-between; text-align: left; }
}
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; gap: 2px; }
  .nav.is-open .nav-links { position: static; flex-direction: row; padding: 0; background: none; border: 0; }
  .hero { padding-top: 180px; padding-bottom: 96px; }
  .section { padding-block: 88px; }
  .project { grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
  .project:nth-child(even) .project-visual { order: 2; }
}

/* =============================================================
   9. Reduced motion (only intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse::after { animation: none; }
}
