/* ================================================
   CSS Variables
   ================================================ */
:root {
  --bg:          #ffffff;
  --bg-alt:      #f8fafc;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --accent:      #2563eb;
  --accent-dim:  #eff6ff;
  --border:      #e2e8f0;
  --card:        #ffffff;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --radius:      12px;
  --radius-sm:   6px;
  --max-w:       1100px;
  --ease:        0.2s ease;
}

/* ================================================
   Reset
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: opacity var(--ease); }
a:hover { opacity: 0.75; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ================================================
   Container
   ================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================================================
   Navbar
   ================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.88; }

.nav-links {
  display: flex;
  gap: 0.1rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.855rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); opacity: 1; }
.nav-links a.active { color: var(--accent); background: var(--accent-dim); opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* ================================================
   Hero
   ================================================ */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-greeting {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}
.hero-name {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero-title {
  font-size: 0.975rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.hero-description {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 2.25rem;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; opacity: 1; color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-alt); opacity: 1; color: var(--text); }

/* Profile photo */
.hero-photo { display: flex; justify-content: center; }

.photo-placeholder {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo-placeholder-inner {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}
.photo-placeholder-inner svg {
  width: 56px; height: 56px;
  margin: 0 auto 0.75rem;
  color: var(--border);
}
.photo-placeholder-inner p {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.photo-placeholder-inner span {
  font-size: 0.73rem;
  color: #b0bec5;
  line-height: 1.5;
  display: block;
  font-family: 'Courier New', monospace;
}

/* Real photo (once added by user) */
.profile-img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* ================================================
   Sections — common
   ================================================ */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 3rem;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.65rem;
  left: 0;
  width: 36px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: -2.25rem;
  margin-bottom: 2.5rem;
}
.subsection-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ================================================
   About
   ================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 0.975rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
  line-height: 1;
}
.stat-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ================================================
   Timeline — Education
   ================================================ */
.timeline {
  position: relative;
  padding-left: 2.25rem;
  max-width: 680px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.25rem;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2.25rem;
  top: 8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-alt);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-sm);
}
.timeline-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.timeline-content h3 {
  font-size: 1.025rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.timeline-institution {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.timeline-location,
.timeline-detail {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ================================================
   Experience Cards
   ================================================ */
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.exp-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.exp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.exp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.exp-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.exp-org {
  font-size: 0.845rem;
  color: var(--accent);
  font-weight: 500;
}
.exp-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--bg-alt);
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  font-weight: 500;
  flex-shrink: 0;
  align-self: flex-start;
}
.exp-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.745rem;
  padding: 0.22rem 0.55rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  font-weight: 500;
}
.exp-description {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ================================================
   Skills
   ================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}
.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.skill-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-tag {
  font-size: 0.79rem;
  padding: 0.28rem 0.65rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 500;
}

/* ================================================
   Publications
   ================================================ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.pub-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.pub-card:hover { box-shadow: var(--shadow-md); }
.pub-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}
.pub-title {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.3rem;
}
.pub-journal {
  font-size: 0.815rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Research highlight box */
.research-highlight {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--accent-dim);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-top: 1rem;
}
.research-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.research-icon svg {
  width: 22px; height: 22px;
  color: #fff;
}
.research-highlight h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.research-highlight p {
  font-size: 0.875rem;
  color: #1e40af;
  line-height: 1.6;
}
.research-highlight em { font-style: italic; color: #3b82f6; }

/* ================================================
   Courses
   ================================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.875rem;
}
.course-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.course-year {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.course-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.3rem;
}
.course-org {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ================================================
   Contact
   ================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.contact-intro {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.925rem;
}
.contact-item svg {
  width: 20px; height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-item a, .contact-item span {
  color: var(--text);
  font-weight: 500;
}
.contact-item a:hover { color: var(--accent); opacity: 1; }

.contact-placeholder {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
}
.contact-placeholder svg {
  width: 44px; height: 44px;
  margin: 0 auto 0.9rem;
  color: var(--border);
}
.contact-placeholder p {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.contact-placeholder span {
  font-size: 0.75rem;
  color: #b0bec5;
  font-family: 'Courier New', monospace;
}
/* Real contact image (once added) */
.contact-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 340px;
  box-shadow: var(--shadow-md);
}

/* ================================================
   Footer
   ================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-alt);
}
.footer-container { text-align: center; }
.footer-text {
  font-size: 0.855rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.footer-sub {
  font-size: 0.78rem;
  color: #b0bec5;
}

/* ================================================
   Responsive — Tablet (≤ 920px)
   ================================================ */
@media (max-width: 920px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-description { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-photo { order: -1; }
  .photo-placeholder, .profile-img { width: 220px; height: 220px; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .exp-grid-3 { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ================================================
   Responsive — Mobile (≤ 640px)
   ================================================ */
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .section-title { font-size: 1.45rem; }

  /* Mobile nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.75rem; font-size: 0.9rem; }
  .nav-toggle { display: flex; }

  .exp-grid { grid-template-columns: 1fr; }
  .exp-grid-3 { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .courses-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 440px) {
  .skills-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
