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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #7c3aed;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
  --nav-h: 64px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); }

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

/* ===== Navigation ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  background: #eff6ff;
  color: var(--primary);
}
.nav-links a.active { font-weight: 600; }

/* Photography link special */
.nav-links .nav-photo a {
  background: linear-gradient(135deg, #7c3aed22, #2563eb22);
  color: var(--accent);
}
.nav-links .nav-photo a:hover {
  background: linear-gradient(135deg, #7c3aed33, #2563eb33);
  color: var(--accent);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
  color: white;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.4);
  margin: 0 auto 1.5rem;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 700;
  color: white;
  letter-spacing: -1px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.hero .tagline {
  font-size: 1.15rem;
  opacity: 0.88;
  margin-bottom: 1.5rem;
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-contacts a,
.hero-contacts span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.88rem;
  color: white;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.25);
  transition: background var(--transition);
}
.hero-contacts a:hover {
  background: rgba(255,255,255,0.25);
  color: white;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  background: #f0f7ff;
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: white;
}

/* ===== Main Layout ===== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

/* ===== Section Styles ===== */
section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.3px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--border), transparent);
  border-radius: 2px;
}
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ===== Timeline Items (Education/Experience) ===== */
.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  position: relative;
  padding-left: 1.75rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
}
.timeline-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.item-org {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.item-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  white-space: nowrap;
  font-weight: 500;
}
.item-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.item-location svg { vertical-align: middle; }

.item-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.item-desc ul {
  padding-left: 1.25rem;
  margin-top: 0.4rem;
}
.item-desc li {
  margin-bottom: 0.3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-top: 0.5rem;
  margin-right: 0.3rem;
}
.badge-gold {
  background: #fef9c3;
  color: #854d0e;
}
.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ===== Publications ===== */
.pub-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.pub-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.pub-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.pub-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pub-tag {
  display: inline-block;
  font-size: 0.75rem;
  background: #f0fdf4;
  color: #166534;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  margin-right: 0.4rem;
  font-weight: 500;
}

/* ===== Sidebar ===== */
.sidebar { }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.skill-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
}
.skill-tag.lang { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.skill-tag.soft { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.skill-tag.stat { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.skill-tag.attr { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.cert-item:last-child { border-bottom: none; }
.cert-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fef9c3;
  color: #854d0e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cert-text .cert-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.cert-text .cert-date { font-size: 0.78rem; color: var(--text-muted); }

/* ===== Footer ===== */
footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
}
footer a { color: #60a5fa; }
footer strong { color: white; }

/* ===== Photography Page ===== */
.photo-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: white;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.photo-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}
.photo-hero p {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

.photo-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Filter buttons */
.photo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Masonry gallery */
.photo-gallery {
  columns: 3;
  column-gap: 1rem;
}
.photo-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: none;
}
.photo-item.visible { display: block; }
.photo-item img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  transition: transform 0.35s ease;
}
.photo-item:hover img { transform: scale(1.04); }
.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay span {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}
.lightbox-close:hover { transform: scale(1.1); }
.lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* Placeholder photo card (SVG-based) */
.photo-placeholder {
  width: 100%;
  aspect-ratio: var(--aspect, 1);
  background: var(--bg-color, #1e293b);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.6);
  font-size: 2.5rem;
  gap: 0.5rem;
}
.photo-placeholder-label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.7;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .photo-gallery {
    columns: 2;
  }
}

@media (max-width: 600px) {
  .navbar { height: auto; min-height: var(--nav-h); }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .photo-gallery {
    columns: 1;
  }
  .item-header {
    flex-direction: column;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeInUp 0.5s ease both;
}
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* ===== Active nav highlight via page ===== */
body.page-photography .nav-links .nav-photo a {
  background: linear-gradient(135deg, #7c3aed33, #2563eb33);
  color: var(--accent);
  font-weight: 700;
}
