/* ===== VARIABLES ===== */
:root {
  --crimson: #a51c30;
  --crimson-dark: #8c1526;
  --navy: #1e3a5f;
  --text-dark: #222222;
  --text-body: #444444;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-warm: #fafaf8;
  --bg-section: #f5f5f2;
  --border: #e5e5e0;
  --border-light: #eeeeea;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --font-serif: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Menlo', monospace;
  --max-width: 960px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
  font-size: 17px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--crimson);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--crimson-dark);
  text-decoration: underline;
}

img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.navbar.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-logo:hover {
  text-decoration: none;
  color: var(--crimson);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-dark);
  border-bottom-color: var(--crimson);
  text-decoration: none;
}

.nav-cta {
  color: var(--crimson) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  color: var(--crimson-dark) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.2s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-top {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--text-dark);
}

.hero-top h1 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.5px;
}

.hero-top .credentials {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-sans);
}

.hero-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.hero-image .image-wrapper {
  width: 240px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.hero-image .image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-text h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-family: var(--font-sans);
}

.hero-text h2 .role-highlight {
  color: var(--crimson);
}

.hero-tagline {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.hero-affiliation {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.hero-affiliation svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.hero-affiliation a {
  color: var(--text-body);
  font-weight: 500;
}

.hero-affiliation a:hover {
  color: var(--crimson);
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--crimson);
  color: #fff;
}

.btn-primary:hover {
  background: var(--crimson-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-dark);
  background: var(--bg-warm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  border-color: var(--border);
  color: var(--text-dark);
}

/* ===== SECTIONS ===== */
section {
  padding: 3.5rem 2rem;
}

section:nth-child(even) {
  background: var(--bg-section);
}

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

.section-header {
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--text-dark);
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  display: block;
  letter-spacing: -0.3px;
}

.section-header h2::after { display: none; }

.section-number {
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  margin-right: 0.3rem;
}

/* ===== ABOUT ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
}

.about-text p {
  color: var(--text-body);
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: justify;
  hyphens: auto;
}

.about-text p strong {
  color: var(--text-dark);
  font-weight: 600;
}

.about-interests {
  margin-top: 1.5rem;
}

.about-interests h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.interest-tag {
  padding: 0.2rem 0.6rem;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--text-body);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--crimson);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== EXPERIENCE ===== */
.experience-grid {
  position: relative;
  padding-left: 0;
}

.experience-grid::before { display: none; }

.experience-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  padding-left: 0;
  margin-bottom: 0;
}

.experience-item:last-child {
  border-bottom: none;
}

.experience-item::before { display: none; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.exp-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-dark);
}

.exp-period {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  background: none;
  padding: 0;
}

.exp-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.exp-details li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.92rem;
  color: var(--text-body);
  margin-bottom: 0.2rem;
  line-height: 1.6;
}

.exp-details li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-light);
}

/* ===== EDUCATION ===== */
.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.edu-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: baseline;
  position: relative;
  overflow: visible;
  border-left: none;
}

.edu-card:last-child { border-bottom: none; }
.edu-card::before { display: none; }
.edu-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-light);
}

.edu-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  justify-self: start;
}

.edu-badge.current {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.edu-badge.completed {
  background: var(--bg-section);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.edu-degree {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.1rem;
}

.edu-institution {
  font-size: 0.88rem;
  color: var(--crimson);
  margin-bottom: 0.15rem;
  font-weight: 500;
}

.edu-period {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.edu-thesis {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.edu-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* ===== PUBLICATIONS ===== */
.pub-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pub-tab {
  padding: 0.6rem 1.25rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.pub-tab:hover {
  color: var(--text-dark);
}

.pub-tab.active {
  color: var(--text-dark);
  border-bottom-color: var(--crimson);
}

.pub-tab .count {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-left: 0.25rem;
}

.pub-list { display: none; }
.pub-list.active { display: block; }

.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.pub-item:last-child { border-bottom: none; }

.pub-item:hover {
  background: transparent;
  border-color: var(--border-light);
}

.pub-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  background: none;
  padding: 0;
  display: inline;
  margin-right: 0.5rem;
}

.pub-title {
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
  line-height: 1.5;
  display: inline;
}

.pub-journal {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  display: block;
  margin-top: 0.2rem;
}

.pub-status {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.1rem;
  font-style: italic;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-category {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.skill-category:hover {
  transform: none;
  box-shadow: none;
}

.skill-category h3 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  display: block;
}

.skill-category h3 svg { display: none; }

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skill-item {
  padding: 0.2rem 0.55rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.78rem;
  color: var(--text-body);
  font-family: var(--font-sans);
}

/* ===== CONTACT ===== */
.contact-section {
  text-align: center;
  background: var(--bg) !important;
  border-top: 1px solid var(--border);
}

.contact-section .section-header {
  border-bottom-color: var(--text-dark);
  display: inline-block;
}

.contact-section p {
  font-size: 0.95rem;
  color: var(--text-body);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-body);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.contact-card:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  text-decoration: none;
}

.contact-card svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.contact-card:hover svg {
  color: var(--crimson);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-decoration: none;
}

.social-link:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  text-decoration: none;
}

.social-link svg {
  width: 16px;
  height: 16px;
}

/* ===== FOOTER ===== */
.footer {
  padding: 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer p {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ===== ANIMATIONS (subtle) ===== */
.fade-in {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-top {
    text-align: center;
  }

  .hero-top h1 {
    font-size: 2.2rem;
  }

  .hero-body {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-image {
    display: flex;
    justify-content: center;
  }

  .hero-image .image-wrapper {
    width: 200px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-affiliation {
    justify-content: center;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .edu-card {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 15px rgba(0,0,0,0.05);
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  section {
    padding: 2.5rem 1.25rem;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }
}
