/* ---------- Base & tokens ---------- */
:root {
  --bg: #0a0b10;
  --bg-soft: #11131c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --text-dim: #9aa0b4;
  --text-faint: #666c82;
  --accent: #7c5cff;
  --accent-2: #37d6c4;
  --accent-grad: linear-gradient(135deg, #7c5cff 0%, #37d6c4 100%);
  --radius: 18px;
  --max-width: 1080px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

ul { margin: 0; padding: 0; }

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

.dot { color: var(--text-faint); padding: 0 0.2em; }

/* ---------- Background glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(640px circle at 15% 10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(560px circle at 85% 25%, rgba(55, 214, 196, 0.16), transparent 60%),
    radial-gradient(900px circle at 50% 100%, rgba(124, 92, 255, 0.12), transparent 60%);
  pointer-events: none;
}

/* ---------- Language switch ---------- */
.lang-switch {
  position: fixed;
  top: 82px;
  right: 24px;
  z-index: 100;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10, 11, 16, 0.75);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.lang-btn.is-active {
  background: var(--accent-grad);
  color: #0a0b10;
}

.i18n-view[hidden] { display: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 16, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--surface-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #0a0b10;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-dim);
}

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

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.12);
}

/* ---------- CV contact modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 11, 16, 0.72);
  backdrop-filter: blur(6px);
}

.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  max-width: 420px;
  width: 100%;
  padding: 36px 32px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow);
  text-align: left;
}

.modal h4 {
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.modal p {
  color: var(--text-dim);
  margin-bottom: 22px;
}

.modal .btn-primary {
  display: inline-block;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-dim);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ---------- Layout helpers ---------- */
main { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; border-top: 1px solid var(--surface-border); }

.section-title {
  font-size: 1.6rem;
  margin-bottom: 40px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-title span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  font-family: "Space Grotesk", sans-serif;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-top: 64px;
  flex-wrap: wrap;
}

.hero-text { flex: 1 1 480px; max-width: 620px; }

.eyebrow {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 30%, #9aa0b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role {
  margin-top: 14px;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 500;
  color: var(--text-dim);
}

.role-company {
  margin-top: 6px;
  font-size: clamp(0.92rem, 1.8vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-2);
}

.summary {
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 54ch;
}

.hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent-grad);
  color: #0a0b10;
  box-shadow: 0 12px 30px -10px rgba(124, 92, 255, 0.55);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(124, 92, 255, 0.7); }

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

.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

.hero-photo { flex: 0 0 auto; display: flex; justify-content: center; }

.photo-ring {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  padding: 6px;
  background: var(--accent-grad);
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.photo-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--surface-border);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.stat {
  background: var(--bg-soft);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label { font-size: 0.82rem; color: var(--text-dim); }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-left: 28px;
  border-left: 1px solid var(--surface-border);
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-item.is-current .timeline-dot {
  background: var(--accent-2);
  box-shadow: 0 0 0 4px var(--bg), 0 0 16px 2px rgba(55, 214, 196, 0.6);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.timeline-item.is-current .timeline-card { border-color: rgba(55, 214, 196, 0.35); }

.timeline-card:hover { transform: translateY(-2px); border-color: rgba(124, 92, 255, 0.4); }

.timeline-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.timeline-head h4 { font-size: 1.15rem; }

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0a0b10;
  background: var(--accent-2);
  padding: 3px 10px;
  border-radius: 999px;
}

.timeline-meta { color: var(--text-dim); font-size: 0.9rem; margin-top: 4px; }

.timeline-card ul { margin-top: 16px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

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

.timeline-card li::marker { color: var(--accent-2); }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.skill-card, .education-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-card:hover, .education-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.4);
}

.skill-card h4 { font-size: 1rem; margin-bottom: 14px; color: var(--text); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  color: #c9bfff;
  border: 1px solid rgba(124, 92, 255, 0.25);
}

.tag-lang {
  background: rgba(55, 214, 196, 0.12);
  color: #9beee2;
  border-color: rgba(55, 214, 196, 0.25);
}

.languages { margin-top: 24px; }

.languages h4 { font-size: 1rem; margin-bottom: 14px; }

/* ---------- Education ---------- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.education-card h4 { font-size: 1.05rem; margin-bottom: 6px; }

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

.education-card .year {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 600;
}

/* ---------- Hobbies ---------- */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.hobby-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hobby-card:hover {
  transform: translateY(-3px);
  border-color: rgba(55, 214, 196, 0.4);
}

.hobby-icon {
  font-size: 2rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-grad);
}

.hobby-card h4 { font-size: 1.02rem; }

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

/* ---------- Contact ---------- */
.contact-lead { color: var(--text-dim); margin-bottom: 32px; white-space: nowrap; }

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

.contact-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

a.contact-card:hover { transform: translateY(-3px); border-color: var(--accent-2); }

.contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }

.contact-value { font-size: 1.05rem; font-weight: 600; word-break: break-word; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 36px 24px 48px;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent-grad);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 200;
  transition: transform 0.1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding-top: 40px; min-height: unset; }
  .section { padding: 64px 0; }
  .photo-ring { width: 200px; height: 200px; }
  .contact-lead { white-space: normal; }
}
