/* ======================================================
   DESIGN TOKENS
====================================================== */
:root {
  --bg: #050505;
  --surface: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f5f5f7;
  --muted: #9ca3af;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
}

/* ======================================================
   RESET / BASE
====================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, sans-serif;
  background:
    radial-gradient(1000px 600px at 10% -10%, #111827, transparent),
    radial-gradient(800px 500px at 90% 10%, #020617, transparent),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  font-weight: 400;
}

/* subtle noise */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.015'/%3E%3C/svg%3E");
  z-index: 1;
}

/* ======================================================
   LIGHT
====================================================== */
.light-field {
  position: fixed;
  inset: -40%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(125, 211, 252, .08), transparent 60%);
  z-index: 0;
}

.light-field.secondary {
  background: radial-gradient(circle, rgba(56, 189, 248, .06), transparent 65%);
  filter: blur(60px);
}

/* ======================================================
   NAV (MOBILE SAFE)
====================================================== */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  z-index: 10;
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.nav-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  font-size: 14px;
  color: var(--muted);
  will-change: transform;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.logo {
  font-weight: 600;
}

/* make links behave like tabs on mobile */
.nav-links a {
  padding: 8px 10px;
  border-radius: 999px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ===== language switch ===== */
.lang-switch {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.lang-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: .25s ease;
  white-space: nowrap;
}

.lang-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.lang-btn.active {
  color: #020617;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: rgba(0, 0, 0, 0.12);
}

/* ======================================================
   HERO
====================================================== */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 760px;
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin-top: 16px;
  font-size: 64px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -1.2px;
  animation: float 8s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero p {
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--muted);
  opacity: .6;
}

/* ======================================================
   BUTTONS
====================================================== */
.btn {
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: .3s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #020617;
}

.btn.primary:hover {
  transform: translateY(-3px);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .06);
}

/* ======================================================
   SECTIONS
====================================================== */
.section {
  padding: 160px 24px;
  max-width: 1100px;
  margin: auto;
  position: relative;
  z-index: 1;
}

.section h2 {
  font-size: 42px;
  font-weight: 500;
  margin-bottom: 64px;
}

.section.muted {
  background: radial-gradient(closest-side, transparent, rgba(255, 255, 255, 0.05), transparent);
}

/* ======================================================
   WORK
====================================================== */
.work-list {
  display: grid;
  gap: 48px;
}

.work-item {
  position: relative;
  padding: 48px;
  border-radius: 32px;
  background: var(--surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  transition: transform .4s ease, box-shadow .4s ease;
}

.work-item:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.work-head > span {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(125, 211, 252, .12);
  color: var(--accent);
}

.tag.status {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  min-width: 60px;
  text-align: center;
  color: #020617;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tag.status.live {
  background: #4ade80;
}

.tag.status.inprogress {
  background: #4ab4de;
}

.work-item p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.6;
}

.tech {
  display: block;
  margin-top: 20px;
  font-size: 14px;
  color: var(--accent);
}

/* ===== work links ===== */
.work-links {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.work-links a.btn.small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: .3s ease;
}

.work-links a.btn.small.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ======================================================
   STACK / ABOUT
====================================================== */
.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.stack span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .3s ease;
}

.stack span:hover {
  transform: translateY(-6px);
}

.about {
  padding: 72px;
  border-radius: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.about p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 720px;
}

/* ======================================================
   REVEAL
====================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================================
   FOOTER
====================================================== */
.footer {
  padding: 96px 24px;
  text-align: center;
  color: var(--muted);
}

.socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.socials a:hover {
  color: var(--text);
}

/* ======================================================
   MOBILE
====================================================== */
@media (max-width: 900px) {
  .lang-btn {
    padding: 6px 8px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 40px;
  }

  .section {
    padding: 120px 20px;
  }

  .about {
    padding: 48px;
  }
}

@media (max-width: 520px) {
  .nav {
    top: 12px;
    padding: 10px 12px;
    gap: 8px;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 13px;
  }

  .lang-switch {
    padding: 5px;
    gap: 5px;
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 12px;
  }

  .work-item {
    padding: 28px;
    border-radius: 26px;
  }

  .section h2 {
    font-size: 34px;
    margin-bottom: 40px;
  }

  .hero-actions {
    gap: 12px;
  }
}
