:root {
  --bg: #060609;
  --panel: #0b0f19;
  --accent: #38bdf8;
  --accent-soft: #7dd3fc;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

::selection {
  background: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-soft);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgb(35, 35, 48);
  border-radius: 5px;
}

/* Keyframes */
@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    box-shadow: rgba(56, 189, 248, 0.6) 0px 0px 0px 0px;
  }
  50% {
    opacity: 0.6;
    box-shadow: rgba(56, 189, 248, 0) 0px 0px 0px 6px;
  }
}

@keyframes scrollHint {
  0% {
    transform: translateY(0px);
    opacity: 1;
  }
  70% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0px);
    opacity: 0;
  }
}

/* Fixed 3D WebGL Holder */
#three-holder {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Cyberpunk Background Grid */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(90% 70% at 50% 40%, black 30%, transparent 75%);
}

/* Glassmorphism Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(6, 6, 9, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #ffffff;
}

.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

nav a {
  color: var(--muted);
  transition: color 0.2s;
}

nav a:hover {
  color: #ffffff;
}

.lang-btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
}

/* Layout */
main {
  position: relative;
  z-index: 10;
}

section {
  padding: 140px 48px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 48px 80px;
  position: relative;
}

.hero-inner {
  max-width: 760px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 100px;
  padding: 8px 18px;
  margin-bottom: 36px;
  background: rgba(6, 6, 9, 0.6);
  backdrop-filter: blur(12px);
}

.badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s ease infinite;
}

h1 {
  font-size: clamp(52px, 7.5vw, 110px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  color: #ffffff;
}

h1 .accent {
  color: var(--accent);
  text-shadow: rgba(56, 189, 248, 0.45) 0px 0px 60px;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 44px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: rgb(10, 10, 18);
  font-weight: 600;
  font-size: 15px;
  padding: 16px 32px;
  border-radius: 10px;
  box-shadow: rgba(56, 189, 248, 0.4) 0px 0px 40px;
  transition: 0.25s;
}

.btn-primary:hover {
  background: var(--accent-soft);
  color: rgb(10, 10, 18);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  padding: 16px 32px;
  border-radius: 10px;
  background: rgba(6, 6, 9, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  transition: 0.25s;
}

.btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.8);
  color: #ffffff;
  background: rgba(56, 189, 248, 0.1);
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--dim);
}

.scroll-hint i {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollHint 1.8s ease infinite;
}

/* Sections Headings */
.sec-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: #ffffff;
}

.sec-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 56px;
  line-height: 1.6;
}

/* Stack Grid */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.stack-card {
  background: rgba(11, 15, 25, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 14px;
  padding: 26px 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: 0.25s;
}

.stack-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(15, 23, 42, 0.92);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.15);
}

.stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stack-name {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 5px;
  padding: 3px 8px;
}

.stack-desc {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.tl-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 28px;
  position: relative;
  padding-bottom: 56px;
}

.tl-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--accent);
  box-shadow: rgba(56, 189, 248, 0.6) 0px 0px 16px;
  flex-shrink: 0;
  margin-top: 6px;
}

.tl-line {
  width: 1px;
  flex: 1;
  background: linear-gradient(rgba(56, 189, 248, 0.5), rgba(56, 189, 248, 0.1));
  margin-top: 8px;
}

.tl-period {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.tl-role {
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.tl-company {
  font-size: 16px;
  font-weight: 500;
  color: #7dd3fc;
  margin-bottom: 14px;
}

.tl-desc {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 16px;
  background: rgba(11, 15, 25, 0.7);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  padding: 5px 11px;
}

/* Projects List */
.proj-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 46px;
}

.proj-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 18px;
  padding: 40px 44px;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  transition: 0.25s;
}

.proj-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 10px 35px rgba(56, 189, 248, 0.18);
}

.proj-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.proj-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: #7dd3fc;
}

.proj-name {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.proj-desc {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 660px;
}

.proj-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.proj-stat b {
  font-size: 34px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.proj-stat span {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #cbd5e1;
  text-align: right;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 48px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.metric {
  background: rgba(11, 15, 25, 0.92);
  padding: 44px 36px;
  backdrop-filter: blur(12px);
}

.metric-value {
  font-size: 52px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.metric-value .fix {
  color: var(--accent);
  font-size: 31px;
}

.metric-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 12px;
}

/* Contact */
.contact {
  text-align: center;
  padding: 160px 48px 120px;
}

.contact h2 {
  font-size: clamp(40px, 6vw, 88px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.contact .accent {
  color: var(--accent);
  text-shadow: rgba(56, 189, 248, 0.45) 0px 0px 60px;
}

.contact-sub {
  font-size: 17.5px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.65;
}

.contact .btn-primary {
  font-size: 16px;
  padding: 18px 40px;
  border-radius: 12px;
  box-shadow: rgba(56, 189, 248, 0.4) 0px 0px 50px;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
}

.social-row a {
  color: var(--muted);
  transition: color 0.2s;
}

.social-row a:hover {
  color: var(--accent);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 1px;
  position: relative;
  z-index: 10;
  background: rgba(6, 6, 9, 0.85);
}

/* Scroll Reveal States */
[data-reveal] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].on {
  opacity: 1;
  transform: none;
}

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* Mobile Media Queries */
@media (max-width: 720px) {
  header {
    padding: 14px 20px;
  }
  nav {
    display: none;
  }
  section, .hero, .contact {
    padding-left: 20px;
    padding-right: 20px;
  }
  .proj-card {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }
  .proj-stat {
    align-items: flex-start;
  }
  .proj-stat span {
    text-align: left;
  }
}
