:root {
  --bg: #0a0e16;
  --bg-alt: #0d1220;
  --surface: #121a2b;
  --surface-hover: #16203590;
  --text: #eef1f7;
  --text-muted: #93a0b8;
  --text-dim: #5c6883;
  --primary: #4f9cff;
  --primary-2: #22d3ee;
  --accent-warm: #c2703d;
  --border: #202a3d;
  --border-light: #2a3650;
  --max-width: 1140px;
  --radius: 14px;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

a:hover {
  color: var(--primary-2);
}

img {
  max-width: 100%;
  display: block;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  z-index: 200;
  transition: width 0.1s ease-out;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 22, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061019;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active .nav-num {
  color: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.lang-switch a {
  color: var(--text-dim);
}

.lang-switch a:hover {
  color: var(--primary);
}

.lang-active {
  color: var(--primary);
  font-weight: 600;
}

.lang-sep {
  color: var(--text-dim);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 140%;
  background:
    radial-gradient(circle at 15% 20%, rgba(79, 156, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(34, 211, 238, 0.12), transparent 45%);
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(2%, 3%); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #061019;
}

.btn-primary:hover {
  filter: brightness(1.08);
  color: #061019;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Hero stats */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 2.25rem;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  max-width: 110px;
}

/* Hero photo */
.hero-photo-wrap {
  position: relative;
  justify-self: center;
}

.hero-photo-glow {
  position: absolute;
  inset: -8%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  filter: blur(50px);
  opacity: 0.25;
  border-radius: 50%;
  z-index: -1;
}

.hero-photo-frame {
  width: min(340px, 70vw);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.hero-photo-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-badge {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
}

.scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--primary);
  animation: scrollcue 1.6s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 18px; }
}

/* Sections */
.section {
  padding: 7rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-num {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2.75rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.location-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim) !important;
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

.location-line svg {
  flex-shrink: 0;
  color: var(--primary);
}

.about-skills h3,
.expertise-block h3,
.lang-block h3,
.lead-block h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.skill-group {
  margin-bottom: 1.5rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Projects / Achievements */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px -20px rgba(79, 156, 255, 0.25);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(79, 156, 255, 0.1);
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.card-metric {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.card-tags {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Resume */
.resume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 0;
}

.resume-head .section-title {
  margin-bottom: 0;
}

.timeline {
  margin-top: 3.5rem;
  border-left: 2px solid var(--border);
  padding-left: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  position: relative;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -2.55rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--primary);
}

.timeline-item h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.05rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-date {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Technical expertise */
.expertise-block {
  margin-top: 5rem;
}

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

.expertise-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Languages + Leadership */
.lang-lead-grid {
  margin-top: 5rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
}

.lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.lang-level {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.lead-block p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.lead-item-title {
  font-weight: 600;
  color: var(--text) !important;
  margin-bottom: 0.3rem;
}

.lead-item-date {
  font-family: var(--font-mono);
  color: var(--primary) !important;
  font-size: 0.78rem !important;
  margin-bottom: 0.75rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-intro {
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 2.5rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

a.contact-item:hover {
  border-color: var(--primary);
  color: var(--text);
}

.contact-static {
  cursor: default;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.form-row input,
.form-row textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-to-top {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.back-to-top:hover {
  color: var(--primary);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-photo-wrap {
    order: -1;
  }

  .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .stat-row {
    justify-content: center;
    justify-items: center;
  }

  .about-grid,
  .contact-grid,
  .lang-lead-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .stat-row {
    grid-template-columns: repeat(2, auto);
  }

  .resume-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
