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

:root {
  --bg:        #0A0A0A;
  --bg-card:   #111111;
  --bg-card2:  #161616;
  --border:    #222222;
  --text:      #F0F0F0;
  --text-sub:  #888888;
  --text-dim:  #555555;
  --accent:    #06B6D4;
  --accent-dim: rgba(6, 182, 212, 0.12);
  --accent-glow: rgba(6, 182, 212, 0.25);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --radius:    12px;
  --radius-sm: 6px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ============================
   LAYOUT
   ============================ */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================
   NAV
   ============================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

#nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.lang-toggle {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-sub);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-sub);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--accent); }

/* ============================
   HERO
   ============================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(6,182,212,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 0%, transparent 100%);
}

.hero-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  padding-top: 68px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: 0.04em;
  margin-bottom: 32px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#hero h1 {
  font-family: var(--font-head);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

#hero h1 .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-sub);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 44px;
}

/* ============================
   BUTTONS
   ============================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.btn-large {
  font-size: 15px;
  padding: 15px 28px;
}

/* ============================
   SECTIONS
   ============================ */
section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 60px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 12px;
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================
   EXPERTISE
   ============================ */
#expertise {
  background: var(--bg);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.expertise-card {
  background: var(--bg-card);
  padding: 36px;
  position: relative;
  transition: background 0.2s;
}
.expertise-card:hover {
  background: var(--bg-card2);
}

.expertise-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: 20px;
}

.expertise-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.expertise-card p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

.expertise-card--security {
  border-top: 1px solid var(--accent-dim);
  position: relative;
}
.expertise-card--security::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.security-quote {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--accent-dim);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.security-quote span {
  font-size: 12px;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ============================
   PROJECTS
   ============================ */
#projects {
  background: #0D0D0D;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.project-card:hover {
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-2px);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}
.tag--trading  { background: rgba(245,158,11,0.12);  color: #F59E0B; }
.tag--ai       { background: rgba(139,92,246,0.12);  color: #8B5CF6; }
.tag--fintech  { background: rgba(16,185,129,0.12);  color: #10B981; }
.tag--defi     { background: rgba(6,182,212,0.12);   color: #06B6D4; }
.tag--sports   { background: rgba(239,68,68,0.12);   color: #EF4444; }
.tag--saas     { background: rgba(99,102,241,0.12);  color: #6366F1; }

.project-icon {
  width: 34px;
  height: 34px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: -0.02em;
}

.project-card h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.65;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.project-stack span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-card2);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* ============================
   STACK
   ============================ */
#stack {
  background: var(--bg);
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stack-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stack-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
}
.stack-list .divider {
  color: var(--text-dim);
}
.stack-list span:not(.divider):hover {
  color: var(--accent);
  cursor: default;
  transition: color 0.2s;
}

/* ============================
   CONTACT
   ============================ */
#contact {
  background: var(--bg);
}

.contact-inner {
  max-width: 600px;
}
.contact-inner h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 12px 0 16px;
}
.contact-inner p {
  color: var(--text-sub);
  font-size: 16px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ============================
   FOOTER
   ============================ */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
}
.footer-logo span { color: var(--accent); }
.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================
   REVEAL ANIMATIONS
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .expertise-grid {
    grid-template-columns: 1fr;
  }
  .stack-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  #nav .nav-links,
  #nav .lang-toggle {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .nav-mobile.open {
    display: flex;
  }
  .nav-inner {
    gap: 0;
  }
  .nav-logo {
    margin-right: auto;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  section {
    padding: 72px 0;
  }
}

@media (min-width: 641px) {
  .lang-toggle { display: block; }
}
