/* ===== Variables ===== */
:root {
  --bg:         #f0f4f8;
  --bg-alt:     #e8edf5;
  --bg-card:    #ffffff;
  --bg-card-hover: #f8faff;

  --indigo:       #4338ca;
  --indigo-light: #6366f1;
  --indigo-dim:   rgba(67,56,202,0.08);
  --indigo-mid:   rgba(67,56,202,0.15);
  --purple:       #7c3aed;
  --blue:         #3b82f6;

  --grad-indigo:  linear-gradient(135deg, #4338ca, #6366f1);
  --grad-hero:    radial-gradient(ellipse 70% 60% at 65% 45%, rgba(99,102,241,0.12) 0%, transparent 70%),
                  radial-gradient(ellipse 50% 50% at 20% 70%, rgba(124,58,237,0.08) 0%, transparent 60%);

  --text:         #1e1b4b;
  --text-body:    #374151;
  --text-muted:   #5b6880;
  --text-dim:     #9ca3b0;

  --border:       #d4dae4;
  --border-hover: #a5b4fc;
  --border-indigo: rgba(67,56,202,0.25);

  --shadow-sm:  0 1px 3px rgba(30,27,75,0.06), 0 1px 2px rgba(30,27,75,0.04);
  --shadow-md:  0 4px 16px rgba(30,27,75,0.08), 0 2px 6px rgba(30,27,75,0.05);
  --shadow-lg:  0 12px 40px rgba(30,27,75,0.1), 0 4px 12px rgba(30,27,75,0.06);
  --shadow-indigo: 0 8px 30px rgba(67,56,202,0.2);

  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm:  8px;
  --max-width: 1100px;
  --nav-height: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "SF Pro Display", "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* Subtle grid pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(67,56,202,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67,56,202,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(240,244,248,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--grad-indigo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 28px; }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--indigo); }

.nav-cta {
  background: var(--grad-indigo) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: 7px 18px;
  border-radius: 980px;
  font-weight: 600 !important;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: var(--shadow-indigo);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 60px) 28px 80px;
  flex-wrap: wrap;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  pointer-events: none;
}

.hero-content { flex: 1 1 420px; max-width: 560px; position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  background: var(--indigo-dim);
  border: 1px solid var(--border-indigo);
  border-radius: 980px;
  padding: 6px 16px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(44px, 7.5vw, 76px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text);
}

.hero h1 span {
  background: var(--grad-indigo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-image {
  flex: 1 1 280px;
  max-width: 360px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.photo-frame {
  position: relative;
  width: 320px; height: 320px;
  border-radius: 50%;
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--grad-indigo);
  z-index: -1;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  z-index: -2;
}

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

/* ===== Floating badges ===== */
.hero-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.hero-badge.b1 { top: 18%; right: -8%; }
.hero-badge.b2 { bottom: 20%; left: -10%; }

.badge-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--indigo-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.badge-label { font-size: 11px; color: var(--text-muted); }
.badge-value  { font-size: 13px; font-weight: 700; color: var(--indigo); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--grad-indigo);
  color: #fff;
  box-shadow: var(--shadow-indigo);
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(67,56,202,0.28);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--indigo);
  border-color: var(--border-indigo);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--indigo-dim);
  border-color: var(--indigo);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== Sections ===== */
.section { padding: 110px 28px; position: relative; z-index: 1; }
.section-alt { background: var(--bg-alt); }

.section-inner { max-width: var(--max-width); margin: 0 auto; }

.section-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 56px;
  text-align: center;
  color: var(--text);
}
.section-title::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  background: var(--grad-indigo);
  border-radius: 2px;
  margin: 14px auto 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 600px;
  margin: -32px auto 52px;
}

.sub-title {
  font-size: 22px;
  font-weight: 700;
  margin: 72px 0 28px;
  color: var(--text);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  margin-bottom: 64px;
}
.about-text { font-size: 17px; color: var(--text-muted); line-height: 1.75; }
.about-text strong { color: var(--indigo); font-weight: 600; }

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.info-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}
.info-card h3 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--indigo); margin-bottom: 10px;
}
.info-card p { font-size: 15px; font-weight: 500; word-break: break-word; color: var(--text-body); }
.info-card a:hover { color: var(--indigo); }

/* ===== Timeline ===== */
.timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 220px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 192px; top: 28px; bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--indigo), var(--indigo-light), var(--blue));
  border-radius: 2px;
  opacity: 0.3;
}

.timeline-item { position: relative; padding: 0 0 40px 40px; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px; top: 28px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad-indigo);
  box-shadow: 0 0 0 4px rgba(67,56,202,0.12);
  z-index: 1;
}

.timeline-date {
  position: absolute;
  left: -220px; top: 22px;
  width: 190px;
  text-align: right;
  font-size: 13px; font-weight: 600;
  color: var(--indigo);
  padding-right: 42px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.timeline-card:hover {
  transform: translateX(6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}
.timeline-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.timeline-org { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.timeline-card ul { display: flex; flex-direction: column; gap: 10px; }
.timeline-card li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px; line-height: 1.65;
}
.timeline-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--indigo-light);
  opacity: 0.7;
}

/* ===== Mini cards ===== */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.mini-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.mini-card p { color: var(--text-muted); font-size: 13px; }

/* ===== Education ===== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.edu-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-indigo);
}
.edu-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-lg); }
.edu-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.edu-org  { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.edu-meta { color: var(--indigo); font-size: 13px; font-weight: 600; }

.achievements ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.achievements li {
  position: relative;
  padding: 14px 18px 14px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px; color: var(--text-body);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.achievements li:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.achievements li::before {
  content: "✦";
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--indigo); font-size: 12px;
}

/* ===== Skills ===== */
.skills-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.skill-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 10px 22px;
  font-size: 14px; font-weight: 500;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  cursor: default;
}
.skill-chip:hover {
  background: var(--indigo-dim);
  border-color: var(--border-indigo);
  color: var(--indigo);
  transform: translateY(-3px);
  box-shadow: var(--shadow-indigo);
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.lang-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.lang-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.lang-card h4 { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.lang-card p  { color: var(--text-muted); font-size: 13px; }

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 16px 16px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(to top, rgba(30,27,75,0.65) 0%, transparent 100%);
}

/* ===== Contact ===== */
.contact-inner { text-align: center; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 16px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-lg); }
.contact-card h3 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--indigo); margin-bottom: 10px;
}
.contact-card p { font-size: 15px; font-weight: 500; word-break: break-word; color: var(--text-body); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 36px 28px;
  font-size: 13px; color: var(--text-dim);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative; z-index: 1;
}

/* ===== Fade-in ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: rgba(240,244,248,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 28px 28px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }

  .hero { text-align: center; justify-content: center; flex-direction: column-reverse; }
  .hero-content { text-align: center; }
  .hero-actions { justify-content: center; }
  .photo-frame { width: 220px; height: 220px; }
  .hero-badge { display: none; }

  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .timeline-item { padding: 0 0 32px 0; }
  .timeline-item::before { display: none; }
  .timeline-date { position: static; text-align: left; width: auto; padding: 0 0 10px 0; }
}
