/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #020304;
  --bg-card:   rgba(8, 12, 18, 0.75);
  --bg-raised: #0a0e14;
  --border:    rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text:      #eef2f8;
  --text-muted:#8b97a8;
  --blue:      #3b82f6;
  --cyan:      #22d3ee;
  --green:     #34d399;
  --accent:    var(--cyan);
  --accent-dim:#1d8fa8;
  --accent-glow: rgba(34, 211, 238, 0.12);
  --green-glow: rgba(52, 211, 153, 0.12);
  --gradient:  linear-gradient(135deg, var(--blue) 0%, var(--cyan) 50%, var(--green) 100%);
  --tag-bg:    rgba(255, 255, 255, 0.04);
  --radius:    12px;
  --radius-lg: 20px;
  --font:      "Outfit", system-ui, sans-serif;
  --mono:      "JetBrains Mono", "Fira Code", monospace;
  --max-w:     1080px;
  --nav-h:     64px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }

/* ── Parallax scene ───────────────────────────────────────── */
.parallax-scene {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.orb--1 {
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  top: -10%;
  right: -8%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.38) 0%, transparent 68%);
}

.orb--2 {
  width: 52vw;
  height: 52vw;
  max-width: 620px;
  max-height: 620px;
  top: 25%;
  left: -12%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.26) 0%, transparent 68%);
}

.orb--3 {
  width: 42vw;
  height: 42vw;
  max-width: 500px;
  max-height: 500px;
  bottom: 5%;
  right: 10%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22) 0%, transparent 68%);
}

.orb--4 {
  width: 34vw;
  height: 34vw;
  max-width: 400px;
  max-height: 400px;
  top: 50%;
  right: -5%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.2) 0%, transparent 68%);
}

.scene-grid {
  position: absolute;
  inset: 0;
  will-change: transform;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 25%, black 15%, transparent 75%);
  opacity: 0.6;
}

.page {
  position: relative;
  z-index: 1;
}

.parallax-content {
  will-change: transform;
}

/* ── Layout helpers ───────────────────────────────────────── */
.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

.section {
  padding-block: 5rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(2, 3, 4, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav__logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav__links a:hover { color: var(--text); }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

.nav__toggle svg { display: block; }

.lang-switch {
  display: flex;
  gap: 0.15rem;
  padding: 0.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-switch__btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.lang-switch__btn:hover { color: var(--text); }

.lang-switch__btn.is-active {
  background: var(--accent-glow);
  color: var(--cyan);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  padding-bottom: 0.1em;
  overflow: visible;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn--primary {
  color: #fff;
  border: none;
  background: var(--gradient);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.2);
}

.btn--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(52, 211, 153, 0.3);
  filter: brightness(1.08);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--text);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.08);
}

.hero__avatar {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  height: 220px;
}

.hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
}

.hero__avatar::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: var(--gradient);
  z-index: -1;
  opacity: 0.55;
}

/* ── About ────────────────────────────────────────────────── */
.about__text {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 65ch;
  line-height: 1.75;
}

.about__text strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: 139px;
  top: 0.6rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--cyan), var(--green), transparent);
  transform: translateX(-50%);
  opacity: 0.4;
}

.timeline__item:last-child::before { display: none; }

.timeline__date {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  padding-top: 0.15rem;
  line-height: 1.4;
}

.timeline__dot {
  position: absolute;
  left: 139px;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.5);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline__card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.06);
}

.timeline__role {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline__company {
  font-size: 0.9rem;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.timeline__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline__desc li {
  margin-left: 1.1rem;
  margin-bottom: 0.25rem;
}

.timeline__desc li:last-child { margin-bottom: 0; }

/* ── Skills ───────────────────────────────────────────────── */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.skill-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 28px rgba(52, 211, 153, 0.05);
}

.skill-card__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.lang-badge__level {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--green-glow);
  color: var(--green);
  border-radius: 999px;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact {
  border-top: 1px solid var(--border);
}

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

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact__item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.06);
}

.contact__item a { color: var(--text); }
.contact__item a:hover { color: var(--cyan); }

.contact__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 10px;
  color: var(--cyan);
}

.contact__label {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.contact__value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .orb,
  .scene-grid,
  .parallax-content {
    transform: none !important;
    will-change: auto;
  }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__toggle { display: block; }

  .nav__right { gap: 0.75rem; }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(2, 3, 4, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .nav__links.is-open { display: flex; }

  .nav__links li a {
    display: block;
    padding: 0.75rem 1.5rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__subtitle { margin-inline: auto; }
  .hero__cta { justify-content: center; }

  .hero__avatar {
    order: -1;
    width: 160px;
    height: 160px;
    margin-inline: auto;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-left: 1.5rem;
  }

  .timeline__item::before {
    left: 0;
    transform: none;
  }

  .timeline__dot {
    left: 0;
    transform: translateX(-50%);
  }

  .timeline__date {
    text-align: left;
    font-size: 0.75rem;
  }

  .section { padding-block: 3.5rem; }
}

@media (max-width: 480px) {
  .hero { padding-top: calc(var(--nav-h) + 2.5rem); }
  .btn { width: 100%; justify-content: center; }
}
