@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
  --bg-color: #fcfcfc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: 16px;
  --badge-bg: #f1f5f9;
  --badge-text: #334155;
  --fact-text: #64748b;
  --success-text: #166534;
  --success-bg: #f0fdf4;
  --stanford-cardinal: #8C1515;
  --stanford-cardinal-dark: #820000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}



/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 1000;
  padding: 1.25rem 0;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end; /* Align links to right since logo is removed */
  align-items: center;
  padding: 0 2.5rem;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background-color: var(--accent-color);
  border-radius: 50%;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Main Container */
main {
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 0 2.5rem 1.5rem;
}

section {
  margin-bottom: 4rem;
  animation: slideUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

section:last-of-type {
  margin-bottom: 1.5rem;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* About Section (Combined Hero & Bio) */
.about-section {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  align-items: flex-start;
}

.about-left {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 100px;
}

.profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid #ffffff;
  outline: 1px solid var(--card-border);
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.about-left h1 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.about-left h2 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.social-icons a svg {
  width: 18px;
  height: 18px;
  fill: var(--text-secondary);
  transition: fill 0.2s;
}

.social-icons a:hover svg {
  fill: #ffffff;
}

.about-right {
  flex: 1;
  padding-top: 1rem;
}

.bio-paragraph {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  text-align: justify;
}

.bio-paragraph a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.bio-paragraph a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.stanford-text {
  color: var(--stanford-cardinal);
  font-weight: 600;
}

.stanford-link {
  color: var(--stanford-cardinal) !important;
  font-weight: 600;
}

.stanford-link:hover {
  color: var(--stanford-cardinal-dark) !important;
  border-bottom-color: var(--stanford-cardinal-dark) !important;
}

/* News Cards */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent-color);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.05s ease, border-color 0.05s ease, transform 0.05s ease;
}

@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card.fade-in {
  opacity: 0;
}

.news-card.fade-in.visible {
  animation: slideUpFadeIn 0.6s ease-out forwards;
}

.news-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
  border-left-color: var(--accent-hover);
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  gap: 1rem;
}

.news-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.date-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.accepted-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--success-text);
  background: var(--success-bg);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.news-facts {
  font-size: 0.9rem;
  color: var(--fact-text);
  font-style: italic;
  line-height: 1.4;
  transition: opacity 0.5s ease;
  display: block;
  min-height: 1.3rem;
}

.news-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.news-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: #f8fafc;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.news-links a:hover {
  background: #f1f5f9;
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.news-links .pdf-link {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.news-links .pdf-link:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.news-links .video-link {
  color: #ea580c;
  background: #fff7ed;
  border-color: #ffedd5;
}

.news-links .video-link:hover {
  background: #ffedd5;
  border-color: #fed7aa;
}

/* Contact Section */
.contact-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-text-wrap {
  flex: 1;
  min-width: 300px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-item svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-color);
  flex-shrink: 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem 1.5rem 2rem;
  margin-top: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--card-border);
}

/* Animations */
@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 850px) {
  .about-section {
    flex-direction: column;
    align-items: stretch;
    gap: 3rem;
  }
  
  .about-left {
    position: static;
    flex: auto;
    width: 100%;
  }
  
  .nav-container {
    padding: 0 1.5rem;
  }
  
  main {
    padding: 0 1.5rem 1rem;
  }
  
  .contact-container {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-info {
    align-items: center;
  }
}

/* Mobile Menu Toggle Styling */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  gap: 5px;
  z-index: 1001;
  background: none;
  border: none;
  padding: 0.25rem;
}

.menu-toggle .bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

/* Hamburger to X animation */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 600px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-md);
    padding: 0;
    text-align: center;
    gap: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    
    /* Animation setup */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 1.2rem 2rem;
    font-size: 1.05rem;
    width: 100%;
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none; /* Hide desktop underline animation */
  }

  .nav-links a:hover {
    background: rgba(241, 245, 249, 0.8);
    color: var(--accent-color);
  }
  
  .news-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}
