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

:root {
  --bg:           #ffffff;
  --bg-alt:       #f8f9fb;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --accent:       #2563eb;
  --accent-dark:  #1d4ed8;
  --accent-light: #eff6ff;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:    0 24px 48px rgba(0,0,0,.12);
  --radius:       14px;
  --radius-sm:    9px;
  --nav-h:        62px;
  --ease:         0.2s ease;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
  transition: box-shadow var(--ease);
}
#navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: none;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--ease);
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-cur       { color: var(--text); }
.lang-sep       { opacity: .25; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ===== SECTIONS ===== */
.section     { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.6px;
  margin-bottom: 8px;
}
.section-header p {
  color: var(--text-muted);
  font-size: .95rem;
}


/* ===== HERO ===== */
.section-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
}

.hero-bg-blob {
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,.07) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 64px;
  align-items: center;
}

.photo-wrapper {
  width: 190px; height: 190px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  flex-shrink: 0;
  position: relative;
  background: var(--accent-light);
}
.photo-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
}
.photo-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease;
}

.hero-greeting {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.hero-name {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}
.hero-bio {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 30px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-socials {
  display: flex;
  gap: 8px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: all var(--ease);
}
.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}


/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.btn-sm { padding: 7px 15px; font-size: .82rem; }


/* ===== HERO SKILL BADGES ===== */
.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.skill-badge {
  padding: 5px 13px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2px;
}


/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 32px;
  margin-bottom: 56px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 10px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--border) 100%);
}

.tl-item {
  position: relative;
  padding-bottom: 40px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2.5px solid var(--accent);
  transition: background var(--ease);
}
.tl-item.tl-current .tl-dot { background: var(--accent); }

.tl-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.tl-period {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.tl-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tl-company {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.tl-role {
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 3px;
}
.tl-loc {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tl-bullets {
  list-style: none;
  padding: 0; margin: 0;
}
.tl-bullets li {
  position: relative;
  padding-left: 14px;
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 4px;
}
.tl-bullets li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== EDUCATION BLOCK ===== */
.edu-block {
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.edu-block-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.edu-items { display: flex; flex-direction: column; gap: 16px; }

.edu-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.edu-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}
.edu-year {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
}
.edu-name { font-size: .9rem; font-weight: 600; }
.edu-dept { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }


/* ===== SKILLS GRID ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
}
.skill-card:hover { box-shadow: var(--shadow-md); border-color: rgba(37,99,235,.2); }

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.skill-card-icon {
  color: var(--accent);
  background: var(--accent-light);
  padding: 8px;
  border-radius: 8px;
  display: flex;
}
.skill-card-title {
  font-size: .9rem;
  font-weight: 700;
}

.skill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.skill-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-name {
  font-size: .82rem;
  color: var(--text);
  flex: 1;
}
.skill-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.dot.filled { background: var(--accent); }
.skill-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 500;
  width: 72px;
  text-align: right;
  flex-shrink: 0;
}


/* ===== VIDEO GRID ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 22px;
}

.video-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,.2);
}

.video-thumb-wrap {
  position: relative;
  padding-bottom: 56.25%;
  background: #0f172a;
  overflow: hidden;
}
.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.video-card:hover .video-thumb { transform: scale(1.04); }

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 52px; height: 52px;
  background: rgba(255,255,255,.94);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.play-btn svg  { color: var(--accent); margin-left: 3px; }
.video-card:hover .play-btn {
  transform: translate(-50%,-50%) scale(1.1);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.video-card-body    { padding: 16px; }
.video-card-title   { font-size: .92rem; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.video-card-desc    { font-size: .8rem; color: var(--text-muted); line-height: 1.55; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
  font-size: .92rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.empty-state p { margin-top: 4px; font-size: .82rem; }


/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
}

.project-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37,99,235,.2);
}
.project-title { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.project-desc  { font-size: .85rem; color: var(--text-muted); line-height: 1.65; flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  padding: 3px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}
.project-link:hover { text-decoration: underline; }


/* ===== CV ===== */
.cv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
  max-width: 740px;
  margin: 0 auto;
}

.cv-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
}
.cv-card:hover { box-shadow: var(--shadow-md); border-color: rgba(37,99,235,.2); }

.cv-icon {
  flex-shrink: 0;
  display: flex;
  padding: 10px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  color: var(--accent);
}
.cv-info      { flex: 1; min-width: 0; }
.cv-info h3   { font-size: .9rem; font-weight: 700; margin-bottom: 3px; }
.cv-info p    { font-size: .78rem; color: var(--text-muted); }


/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  max-width: 680px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--ease);
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  background: var(--accent-light);
}

.contact-icon {
  flex-shrink: 0;
  display: flex;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
}
.contact-label { font-size: .76rem; color: var(--text-muted); font-weight: 500; margin-bottom: 3px; }
.contact-value { font-size: .88rem; font-weight: 600; word-break: break-all; }


/* ===== FOOTER ===== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}


/* ===== VIDEO MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal.open { opacity: 1; pointer-events: all; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
}

.modal-box {
  position: relative;
  z-index: 1;
  width: min(860px, 94vw);
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(.96);
  transition: transform .25s ease;
}
.modal.open .modal-box { transform: scale(1); }

.modal-close-btn {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease);
}
.modal-close-btn:hover { background: rgba(255,255,255,.3); }

.modal-video-wrap { position: relative; padding-bottom: 56.25%; }
.modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}


/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 10px 0 16px;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open  { display: flex; }
  .nav-link        { padding: 11px 24px; border-radius: 0; width: 100%; }
  .hamburger       { display: flex; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-photo-col { display: flex; justify-content: center; }
  .photo-wrapper  { width: 150px; height: 150px; }
  .hero-bio       { max-width: 100%; }
  .hero-cta, .hero-socials { justify-content: center; }

  .section      { padding: 64px 0; }
  .section-hero { padding-top: calc(var(--nav-h) + 40px); }
  .skills-grid  { grid-template-columns: 1fr 1fr; }
  .hero-skills  { justify-content: center; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}
