/*
Theme Name: Dr. Ruth Gibson Academic Theme
Theme URI: https://drruthgibson.com
Author: Gibson Site Team
Author URI: https://drruthgibson.com
Description: A professional academic theme designed for Dr. Ruth Gibson's portfolio. Features Stanford-inspired styling, responsive design, and custom post types for publications, projects, and talks.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gibson-theme
Tags: academic, portfolio, one-column, custom-menu, custom-logo, featured-images, theme-options
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --stanford-cardinal: #8C1515;
  --stanford-gold: #8D7359;
  --stanford-dark: #2e2d29;
  --stanford-cream: #f9f6ef;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border-light: #e5e5e5;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
}

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

body {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  color: #212529;
  background: linear-gradient(135deg, var(--stanford-cream) 0%, #f5f2eb 25%, #f0eee7 50%, #ebe8e1 75%, #f5f2eb 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
    padding: 0 40px;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .container {
    max-width: 1200px;
    padding: 0 30px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
    padding: 0 25px;
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  font-weight: 600;
  color: var(--stanford-cardinal);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin: 3rem 0 1.5rem; }
h3 { font-size: 1.4rem; margin: 2rem 0 1rem; }

@media (min-width: 992px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  h3 { font-size: 1.6rem; }
  .profile-name { font-size: 2.8rem; }
  .profile-title { font-size: 1.3rem; }
  .profile-description { font-size: 1.1rem; line-height: 1.8; }
}

code, pre, .citation, .date, .pub-stats, .talk-date, .talk-views {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.92em;
}

em, .publication-venue, .pub-venue {
  font-style: italic;
  font-weight: 400;
}

strong, .publication-authors strong, .pub-authors strong {
  font-weight: 600;
}

p { margin-bottom: 1rem; }

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

a:hover {
  color: #a01717;
  text-decoration: underline;
}

/* ==========================================================================
   Header
   ========================================================================== */
header, .site-header {
  border-bottom: 3px solid var(--stanford-gold);
  background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #a01717 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(140, 21, 21, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo, .site-title a {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.site-title a:hover {
  color: white;
  text-decoration: none;
}

/* Desktop Navigation */
.desktop-nav, .main-navigation ul {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.desktop-nav a, .main-navigation a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.desktop-nav a:hover, .main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--stanford-gold);
  border-bottom-color: var(--stanford-gold);
  text-decoration: none;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(140, 21, 21, 0.98);
  backdrop-filter: blur(10px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 2rem;
}

.mobile-nav-link {
  color: white;
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.mobile-nav.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav.active .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }

.mobile-nav-link:hover {
  color: var(--stanford-gold);
  transform: scale(1.1);
}

/* ==========================================================================
   Main Content
   ========================================================================== */
main, .site-main {
  padding: 0;
  background: transparent;
  margin: 0;
}

.content-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 3rem;
  margin: 2rem 0;
  box-shadow: 0 8px 32px rgba(140, 21, 21, 0.1);
  transition: all 0.3s ease;
}

@media (min-width: 992px) {
  .content-card {
    padding: 4rem;
    margin: 3rem 0;
  }
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(140, 21, 21, 0.15);
}

.profile-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 246, 239, 0.95) 100%);
  border: 1px solid rgba(140, 21, 21, 0.1);
}

/* ==========================================================================
   Profile Section
   ========================================================================== */
.profile {
  text-align: center;
  margin-bottom: 6rem;
}

@media (min-width: 992px) {
  .profile {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    text-align: left;
    align-items: center;
  }

  .profile-image-wrapper {
    justify-self: center;
  }

  .profile-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 2rem;
  }
}

.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  display: block;
  object-fit: cover;
  object-position: center top;
  border: 6px solid var(--stanford-cardinal);
  box-shadow: 0 8px 24px rgba(140, 21, 21, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .profile-image {
    width: 400px;
    height: 400px;
    border: 8px solid var(--stanford-cardinal);
    box-shadow: 0 12px 36px rgba(140, 21, 21, 0.25);
  }
}

.profile-image:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(140, 21, 21, 0.3);
}

@media (min-width: 992px) {
  .profile-image:hover {
    transform: scale(1.01);
    box-shadow: 0 20px 60px rgba(140, 21, 21, 0.35);
  }
}

.profile-name {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.profile-title {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.profile-description {
  max-width: 800px;
  margin: 1.5rem 0 2rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.7;
  font-size: 1.05rem;
}

/* ==========================================================================
   Metrics Bar
   ========================================================================== */
.metrics-bar {
  background: linear-gradient(135deg, rgba(140, 21, 21, 0.95) 0%, rgba(160, 23, 23, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(140, 21, 21, 0.2);
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 2rem 0;
  box-shadow: 0 8px 32px rgba(140, 21, 21, 0.2);
}

.metrics-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 992px) {
  .metrics-container {
    max-width: 1000px;
    gap: 3rem;
  }

  .metric-item {
    padding: 2rem 1rem;
  }

  .metric-number {
    font-size: 3rem;
  }

  .metric-label {
    font-size: 1rem;
  }
}

.metric-item {
  padding: 1rem;
}

.metric-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* ==========================================================================
   Research Highlights Grid
   ========================================================================== */
.research-highlights {
  margin: 3rem 0;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.highlight-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(140, 21, 21, 0.08);
  transition: all 0.3s ease;
  text-align: center;
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(140, 21, 21, 0.15);
}

.highlight-icon {
  font-size: 2.5rem;
  color: var(--stanford-cardinal);
  margin-bottom: 1rem;
}

.highlight-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--stanford-cardinal);
}

.highlight-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.highlight-link {
  color: var(--stanford-cardinal);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.highlight-link:hover {
  color: #a01717;
}

.highlight-link i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.highlight-link:hover i {
  transform: translateX(3px);
}

/* ==========================================================================
   Impact Section
   ========================================================================== */
.impact-section {
  margin: 3rem 0;
  padding: 3rem;
}

.impact-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.impact-content {
  display: grid;
  gap: 2rem;
}

.impact-item-main {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: rgba(140, 21, 21, 0.03);
  border-radius: 8px;
  border-left: 4px solid var(--stanford-cardinal);
}

.impact-item-main > i {
  font-size: 1.5rem;
  color: var(--stanford-cardinal);
  flex-shrink: 0;
}

.impact-item-main h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.impact-item-main p {
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Quick Links Bar
   ========================================================================== */
.quick-links-bar {
  background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #a01717 100%);
  border-radius: 12px;
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.quick-links-bar h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.quick-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.quick-link-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  text-decoration: none;
  color: white;
}

/* ==========================================================================
   Social Links
   ========================================================================== */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 0.5rem;
}

.social-links a:hover {
  color: var(--stanford-cardinal);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* ==========================================================================
   Publications, Projects, Talks Archive Styling
   ========================================================================== */
.archive-header {
  background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #620B0B 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.archive-header h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: white;
}

.archive-intro {
  font-size: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0.95;
}

.archive-highlight {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: 20px;
  margin-top: 20px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Publication/Project/Talk Cards */
.post-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(140, 21, 21, 0.15);
}

.post-card h2 {
  font-size: 1.4rem;
  margin: 0 0 1rem 0;
  color: var(--stanford-cardinal);
}

.post-card h2 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover {
  text-decoration: underline;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Single Post/Page Styling
   ========================================================================== */
.single-header {
  background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #620B0B 100%);
  color: white;
  padding: 60px 0;
  margin-bottom: 3rem;
}

.single-header h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.single-meta {
  opacity: 0.9;
  font-size: 1rem;
}

.single-content {
  background: white;
  border-radius: 16px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ==========================================================================
   CV Page Styling
   ========================================================================== */
.cv-page {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 246, 239, 0.95) 100%);
  border: none;
  box-shadow: none;
  padding: 3rem 4rem;
}

.cv-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--stanford-cardinal);
  margin-bottom: 3rem;
  text-align: center;
  border-bottom: 3px solid var(--stanford-cardinal);
  padding-bottom: 1rem;
}

.cv-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--stanford-cardinal);
  margin: 3rem 0 1.5rem 0;
  padding-left: 2rem;
  border-left: 4px solid var(--stanford-cardinal);
  position: relative;
}

.cv-content h3::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--stanford-cardinal);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--stanford-cardinal);
}

.cv-content ul {
  margin-left: 2rem;
  border-left: 2px solid rgba(140, 21, 21, 0.2);
  padding-left: 2rem;
  list-style: none;
}

.cv-content ul li {
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(140, 21, 21, 0.1);
}

.cv-content ul li:last-child {
  border-bottom: none;
}

.cv-content ul li::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: white;
  border: 2px solid var(--stanford-cardinal);
  border-radius: 50%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer, .site-footer {
  border-top: 3px solid var(--stanford-gold);
  background: var(--stanford-cardinal);
  color: white;
  padding: 3rem 0;
  margin-top: 6rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--stanford-gold);
}

.site-footer a:hover {
  color: white;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .hamburger-menu {
    display: flex;
  }

  .desktop-nav, .main-navigation {
    display: none;
  }

  h1 {
    font-size: 2rem;
  }

  .header-content {
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
  }

  .profile-name {
    font-size: 1.8rem;
  }

  .social-links {
    gap: 1rem;
  }

  main, .site-main {
    padding: 2rem 0;
    margin: 1rem 0;
  }

  .metrics-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .metric-item {
    padding: 0.5rem;
  }

  .metric-number {
    font-size: 1.8rem;
  }

  .metric-label {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .metrics-bar {
    margin: 2rem 0;
    padding: 2rem 1rem;
  }

  .profile {
    margin-bottom: 3rem;
    display: block;
    text-align: center;
  }

  .profile-image {
    width: 200px;
    height: 200px;
    border: 4px solid var(--stanford-cardinal);
    margin: 0 auto 1rem;
  }

  .cv-page {
    padding: 2rem;
  }

  .archive-header h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .metric-number {
    font-size: 1.5rem;
  }

  .metric-label {
    font-size: 0.7rem;
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .cv-page {
    padding: 1.5rem;
  }

  .profile-image {
    width: 180px;
    height: 180px;
    border: 3px solid var(--stanford-cardinal);
  }
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */
.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Admin bar adjustment */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* ==========================================================================
   Additional WordPress Compatibility Styles
   ========================================================================== */

/* Navbar container inside header */
.site-header .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Desktop nav links styling */
.desktop-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.desktop-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.desktop-nav a.current-menu-item {
  color: var(--stanford-gold);
  border-bottom-color: var(--stanford-gold);
  text-decoration: none;
}

/* Fix for profile section layout */
.profile.content-card.profile-card {
  display: block;
  text-align: center;
  padding: 3rem;
  margin-top: 3rem;
}

@media (min-width: 992px) {
  .profile.content-card.profile-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    text-align: left;
    align-items: center;
    padding: 4rem;
  }
}

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

@media (min-width: 992px) {
  .profile-image-wrapper {
    justify-content: center;
  }
}

/* Ensure fonts are applied throughout */
.site-main,
.container,
main {
  font-family: 'Crimson Text', Georgia, serif;
}

.profile-name,
.profile-title,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Sans Pro', system-ui, sans-serif;
}

/* Fix impact section grid */
.impact-content {
  display: grid;
  gap: 1.5rem;
}

/* Ensure no bullets on impact items */
.impact-content .impact-item-main {
  list-style: none;
}

/* WordPress body class fixes */
body.home-page .site-main {
  padding-top: 0;
}

/* Profile description line height */
.profile-description p {
  margin-bottom: 0;
  line-height: 1.8;
}

/* Footer centering */
.site-footer .container {
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* Profile image margin fix */
.profile-image-wrapper .profile-image {
  margin: 0;
}

/* Override WordPress defaults */
.site-main .container {
  padding-top: 0;
}

/* Header content flex layout */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

/* Logo styling in header */
.logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
}

.logo:hover {
  color: white;
  text-decoration: none;
}

/* Mobile nav links proper styling */
.mobile-nav-link {
  color: white;
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration: none;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.mobile-nav.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-link:hover {
  color: var(--stanford-gold);
  text-decoration: none;
}

/* Staggered animation for mobile nav */
.mobile-nav.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav.active .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }
.mobile-nav.active .mobile-nav-link:nth-child(6) { transition-delay: 0.6s; }

/* Hide desktop nav on mobile */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .hamburger-menu {
    display: flex;
  }
}

@media (min-width: 769px) {
  .hamburger-menu {
    display: none;
  }
}

/* ==================== CV PAGE STYLES ==================== */
.cv-header {
    background: linear-gradient(135deg, #8C1515 0%, #2E2D29 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 0;
}

.cv-header-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cv-profile-section {
    display: flex;
    align-items: center;
    gap: 40px;
}

.cv-profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    object-position: center top;
}

.cv-header-text h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    color: white;
}

.cv-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.95;
}

.cv-highlight {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* CV Metrics Bar */
.cv-metrics-bar {
    background: #F4F4F4;
    padding: 40px 0;
    border-bottom: 1px solid #E0E0E0;
}

.cv-metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cv-metrics-bar .metric-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.cv-metrics-bar .metric-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cv-metrics-bar .metric-icon {
    font-size: 2rem;
    color: #8C1515;
    margin-bottom: 10px;
}

.cv-metrics-bar .metric-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2E2D29;
    margin-bottom: 5px;
}

.cv-metrics-bar .metric-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CV Main Content */
.cv-main {
    padding: 60px 0;
    background: white;
}

.cv-content {
    max-width: 1000px;
    margin: 0 auto;
}

.cv-content h2 {
    color: #8C1515;
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F0F0F0;
}

.cv-content h3 {
    color: #2E2D29;
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
}

.cv-content p {
    line-height: 1.7;
    color: #333;
    margin-bottom: 15px;
}

.cv-content ul {
    margin-left: 20px;
}

.cv-content li {
    line-height: 1.7;
    margin-bottom: 8px;
    color: #333;
}

.cv-content hr {
    border: none;
    border-top: 1px solid #E0E0E0;
    margin: 30px 0;
}

.cv-content a {
    color: #8C1515;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.cv-content a:hover {
    border-bottom-color: #8C1515;
}

.cv-content strong {
    font-weight: 600;
    color: #2E2D29;
}

.cv-content em {
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .cv-profile-section {
        flex-direction: column;
        text-align: center;
    }

    .cv-profile-photo {
        width: 150px;
        height: 150px;
    }

    .cv-header-text h1 {
        font-size: 2rem;
    }

    .cv-metrics-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ==================== CONTACT PAGE STYLES ==================== */
.contact-header {
    background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #620B0B 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.contact-header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.contact-header-overlay {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.02);
    transform: rotate(35deg);
}

.contact-header .container {
    position: relative;
    z-index: 2;
}

.contact-header-content {
    text-align: center;
}

.contact-profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    display: block;
    margin: 0 auto 30px;
}

.contact-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: white;
}

.contact-subtitle {
    font-size: 1.25rem;
    max-width: 900px;
    margin: 0 auto 25px;
    line-height: 1.8;
    opacity: 0.95;
}

.contact-highlight {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 30px;
    margin-top: 20px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* Contact Main Section */
.contact-main {
    background: transparent;
}

.contact-section {
    padding: 60px 0;
}

.contact-inner {
    max-width: 1000px;
    margin: 0 auto;
}

/* Contact Cards Grid */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--stanford-cardinal);
}

.contact-card-icon {
    font-size: 2rem;
    color: var(--stanford-cardinal);
    margin-bottom: 15px;
}

.contact-card h3 {
    color: var(--stanford-cardinal);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.contact-card p {
    margin-bottom: 0;
    line-height: 1.7;
}

.contact-card .profile-links a {
    display: inline-block;
    margin-bottom: 4px;
}

/* Collaboration Section */
.collaboration-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(140, 21, 21, 0.1);
}

.collaboration-section h2 {
    color: var(--stanford-cardinal);
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5rem;
}

.collaboration-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.collaboration-content ul {
    list-style: disc;
    padding-left: 25px;
}

.collaboration-content li {
    margin-bottom: 12px;
}

.collaboration-content h3 {
    color: var(--stanford-cardinal);
    margin-top: 25px;
    margin-bottom: 15px;
}

/* Social Media Section */
.social-media-section {
    margin-top: 60px;
    text-align: center;
}

.social-media-section h3 {
    color: var(--stanford-cardinal);
    margin-bottom: 30px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-icons a {
    font-size: 2rem;
    color: var(--stanford-cardinal);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #a01717;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .contact-header h1 {
        font-size: 2rem;
    }
    
    .contact-subtitle {
        font-size: 1rem;
    }
    
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .collaboration-section {
        padding: 25px;
    }
    
    .collaboration-section h2 {
        font-size: 1.8rem;
    }
}

/* ==================== PUBLICATIONS PAGE STYLES ==================== */
.publications-header {
    background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #620B0B 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.publications-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: white;
}

.publications-intro {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    opacity: 0.95;
}

.publications-highlight {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 20px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.publications-main {
    background: transparent;
}

.publication-section {
    padding: 60px 0;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.publication-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(140, 21, 21, 0.15);
}

.publication-title,
.pub-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
    line-height: 1.4;
}

.publication-authors,
.pub-authors {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #555;
}

.publication-venue,
.pub-venue {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--stanford-cardinal);
    font-weight: 500;
    font-style: italic;
}

.publication-summary,
.pub-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #666;
}

.publication-links,
.pub-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pub-link,
.pub-links a {
    padding: 8px 15px;
    background: rgba(140, 21, 21, 0.1);
    color: var(--stanford-cardinal);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pub-link:hover,
.pub-links a:hover {
    background: var(--stanford-cardinal);
    color: white;
    text-decoration: none;
}

.pub-link.primary {
    background: var(--stanford-cardinal);
    color: white;
}

/* ==================== PROJECTS PAGE STYLES ==================== */
.projects-header {
    background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #620B0B 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.projects-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: white;
}

.projects-intro {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    opacity: 0.95;
}

.projects-highlight {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 20px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.projects-main {
    background: transparent;
}

.project-section {
    padding: 60px 0;
    background-color: #f9fafb;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.project-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.project-card.featured {
    border: 2px solid var(--stanford-cardinal);
    box-shadow: 0 8px 30px rgba(140, 21, 21, 0.15);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(140, 21, 21, 0.2);
}

.project-badge {
    position: absolute;
    top: -12px;
    right: 25px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-badge.current {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.project-badge.completed {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.project-timeline {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 500;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--stanford-cardinal);
    line-height: 1.4;
}

.project-affiliation {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-weight: 500;
    font-style: italic;
}

.project-summary {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ==================== TALKS PAGE STYLES ==================== */
.talks-header {
    background: linear-gradient(135deg, var(--stanford-cardinal) 0%, #620B0B 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.talks-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: white;
}

.talks-intro {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    opacity: 0.95;
}

.talks-highlight {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 20px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.talks-main {
    background: transparent;
}

.video-section {
    padding: 60px 0;
    position: relative;
}

.video-section:nth-child(even) {
    background-color: #ffffff;
}

.video-section:nth-child(odd) {
    background-color: #f9fafb;
}

.video-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

@media (min-width: 768px) {
    .video-content {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: flex-start;
    }
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 20px 0;
}

@media (min-width: 768px) {
    .video-info {
        padding: 0;
    }
}

.video-info h2 {
    color: #1a1a1a;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.talk-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.talk-date {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.talk-views {
    color: var(--stanford-gold);
    font-weight: 500;
    font-size: 0.9rem;
}

.talk-summary {
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .publications-header h1,
    .projects-header h1,
    .talks-header h1 {
        font-size: 2rem;
    }
    
    .publications-intro,
    .projects-intro,
    .talks-intro {
        font-size: 1rem;
    }
    
    .publications-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-card {
        padding: 25px;
    }
    
    .video-info h2 {
        font-size: 1.5rem;
    }
    
    .video-section {
        padding: 40px 0;
    }
    
    .talk-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
