/* ===== Base ===== */
:root {
  --bg: #04070f;
  --bg-soft: #0a0e1c;
  --text: #e8ecf8;
  --text-dim: #8b93ab;
  --cyan: #4f8dff;
  --violet: #38bdf8;
  --blue: #2563eb;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.09);
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

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

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}

h1, h2, h3, h4 { font-family: var(--font-head); }

.accent { color: var(--cyan); }

.gradient-text {
  background: linear-gradient(120deg, #38bdf8, #3b82f6 50%, #1d4ed8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 5vw, 4rem);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(5, 7, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--glass-border);
}

.nav__logo {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.lang-toggle {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: transparent;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.lang-toggle:hover {
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.25);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: #041018;
  background: linear-gradient(120deg, var(--cyan), var(--blue));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.55);
}

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

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

.btn--small { padding: 0.55rem 1.3rem; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem clamp(1.25rem, 6vw, 6rem) 4rem;
  gap: 4rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin-top: 1.2rem;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text);
  font-weight: 500;
}

.hero__typed {
  margin-top: 0.5rem;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--cyan);
  font-family: var(--font-head);
  min-height: 1.8em;
}

.cursor { animation: blink 1s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero__desc {
  margin-top: 1.4rem;
  max-width: 620px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero__desc strong { color: var(--text); font-weight: 600; }

.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.stat {
  padding: 1.5rem 1.6rem;
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.stat__num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
}

.stat__plus {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--cyan);
  font-weight: 700;
}

.stat__label {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ===== Sections ===== */
.section {
  padding: 6rem clamp(1.25rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
}

.section__head { margin-bottom: 3rem; }

.section__tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.2rem;
}

.section__head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subhead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.2rem;
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about__photo img {
  width: 100%;
  display: block;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.25);
}

.about__eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.about__text h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.4rem;
}

.about__text p:not(.about__eyebrow) {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  max-width: 640px;
}

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

.about__actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== Book a call ===== */
.book {
  text-align: center;
  padding: 4rem clamp(1.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.book::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% -20%, rgba(56, 189, 248, 0.12), transparent 60%);
  pointer-events: none;
}

.book__badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.2rem;
}

.book h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }

.book p {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto;
}

.book__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Service cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.card {
  padding: 2rem 1.8rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.12);
}

.card__icon {
  font-size: 1.7rem;
  color: var(--cyan);
  margin-bottom: 1rem;
}

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

.card p { color: var(--text-dim); font-size: 0.95rem; }

.card--link { padding: 0; }

.card--link a {
  display: block;
  padding: 2rem 1.8rem;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.card--link h3 { color: var(--cyan); }

/* ===== Timeline ===== */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  padding-left: 1.6rem;
  border-left: 1px solid var(--glass-border);
}

.tl-item { position: relative; }

.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1.6rem - 6px);
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

.tl-item__meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
}

.tl-item__date { color: var(--cyan); font-weight: 600; letter-spacing: 0.05em; }

.tl-item__loc { color: var(--text-dim); }

.tl-item__body { padding: 1.8rem 2rem; }

.tl-item__body h3 { font-size: 1.25rem; }

.tl-item__company {
  color: var(--violet);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 0.3rem 0 1rem;
}

.tl-item__body ul { padding-left: 1.1rem; color: var(--text-dim); font-size: 0.95rem; }

.tl-item__body li { margin-bottom: 0.45rem; }

.tl-item__body strong { color: var(--text); }

/* ===== Chips ===== */
.chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.chip {
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chip strong { font-family: var(--font-head); font-size: 0.98rem; }

.chip span { color: var(--text-dim); font-size: 0.85rem; }

/* ===== Education & skills ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.edu {
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}

.edu__date {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.edu h4 { font-size: 1.02rem; margin: 0.3rem 0 0.15rem; }

.edu p { color: var(--text-dim); font-size: 0.9rem; }

.langs { display: flex; gap: 1rem; flex-wrap: wrap; }

.lang {
  padding: 0.8rem 1.3rem;
  display: flex;
  flex-direction: column;
  min-width: 110px;
}

.lang span { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; }

.lang em { color: var(--text-dim); font-size: 0.8rem; font-style: normal; }

.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.tags span {
  padding: 0.45rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s;
}

.tags span:hover { border-color: var(--violet); color: var(--violet); }

.cert-list { padding-left: 1.1rem; color: var(--text-dim); font-size: 0.95rem; }

.cert-list li { margin-bottom: 0.5rem; }

/* ===== Contact ===== */
.section--contact { padding-bottom: 4rem; }

.contact {
  text-align: center;
  padding: 4rem clamp(1.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 50% 120%, rgba(34, 211, 238, 0.12), transparent 60%);
  pointer-events: none;
}

.contact h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 1rem 0 0.8rem; }

.contact p { color: var(--text-dim); }

.contact__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }

  .about { grid-template-columns: 1fr; gap: 2rem; }

  .about__photo { max-width: 300px; }

  .nav__logo { font-size: 0.95rem; }

  .nav__links {
    position: fixed;
    top: 60px;
    right: 0;
    flex-direction: column;
    background: rgba(5, 7, 15, 0.97);
    border: 1px solid var(--glass-border);
    border-radius: 0 0 0 18px;
    padding: 1.5rem 2.5rem;
    transform: translateX(110%);
    transition: transform 0.3s;
  }

  .nav__links.open { transform: translateX(0); }

  .nav__burger { display: flex; }

  .nav .btn--small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot, .cursor { animation: none; }
}
