/* --- Reset / Base --- */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #fafafa;
    color: #111;
    line-height: 1.6;
    position: relative;
}

/* Container */
.container {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 2rem;
    background: #fdfdfc;
}

.hero-left h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-left p {
    color: #333;
}

.hero-links a {
    position: relative;
    text-decoration: none;
    color: #333;
    margin-right: 1rem;
}

.hero-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -2px;
    background-color: #ff6f61;
    transition: width 0.3s ease;
}

.hero-links a:hover::after {
    width: 100%;
}

.hero-right {
    position: relative;
}

.tagline-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-art-inline {
    width: 50px;
    height: auto;
}

.hero-tagline {
    margin: 0;
    font-size: 1.1rem;
    color: #444;
}

.headshot {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: rotate(-10deg);
}

/* --- Sections --- */
section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- Projects --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.project-card h3 {
    margin: 0.5rem 0;
}

.project-card p {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.8rem;
}

.links a {
    margin-right: 1rem;
    color: #0070f3;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* --- Publications --- */
#publications {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
}

.pub-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
}

.pub-card:hover {
    transform: none;
}

.pub-thumb {
    width: 120px;
    height: auto;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: contain;
}

.pub-details h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    color: #111;
}

.pub-details p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
    color: #444;
}

.pub-links a {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: #0077cc;
}

.pub-links a:hover {
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    border-top: 1px solid #ddd;
    padding: 1rem 0;
    font-size: 0.9rem;
    text-align: center;
}

/* --- Videos --- */
#featured-videos {
    margin-bottom: 3rem;
}

.video-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.video-col {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-col:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.video-col iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
}

.video-caption {
    font-size: 0.95rem;
    color: #444;
    margin-top: 0.5rem;
    text-align: center;
}

/* --- Education Timeline --- */
.education-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 3px solid #000;
    padding-left: 1rem;
}

.education-list li {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.education-info {
    max-width: 70%;
}

.education-list h3 {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
    color: #111;
}

.education-list p {
    margin: 0.2rem 0;
    color: #444;
}

.education-date {
    white-space: nowrap;
    color: #666;
    font-style: italic;
}

/* --- Experience Timeline --- */
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline li {
    display: grid;
    grid-template-columns: 130px 30px 1fr;
    position: relative;
    margin-bottom: 3rem;
}

/* Dates column */
.timeline-date {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    white-space: nowrap;
}

/* Vertical line */
.timeline-line {
    position: relative;
    width: 3px;
    display: flex;
    justify-content: center;
}

.timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 45%;
    background-color: #000;
    transform: translateX(-50%);
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #000;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.timeline-line .bottom-line {
    position: absolute;
    top: 55%;
    left: 50%;
    width: 3px;
    height: 45%;
    background-color: #000;
    transform: translateX(-50%);
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-first-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-first-row h3 {
    margin: 0;
    color: #111;
}

.timeline-location {
    font-style: italic;
    color: #666;
}


/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem 1rem;
    }
    .hero-left h1 {
        font-size: 2rem;
    }
    .hero-left p {
        font-size: 1rem;
    }
    .hero-links {
        margin-top: 1rem;
    }
    .hero-right {
        margin-top: 1.5rem;
    }
    .headshot {
        width: 140px;
        height: 140px;
        transform: rotate(-5deg);
    }
    .hero-art {
        max-width: 150px;
        margin: 1rem auto;
    }
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .pub-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .pub-thumb {
        width: 80%;
        max-width: 150px;
        margin-bottom: 0.5rem;
    }
    .video-row {
        flex-direction: column;
    }
    .video-col {
        flex: 1 1 100%;
        margin-bottom: 1.5rem;
    }
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    z-index: 20000;
    box-sizing: border-box;
  }
  
  /* Logo + Name inline */
  .logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    color: #111;
    text-decoration: none;
  }
  
  .nav-logo {
    width: 28px;
    height: 28px;
    margin-right: 0.5rem;
  }
  
  /* Nav links */
  .nav-right {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
  }
  
  .nav-right a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
  }
  
  /* Offset headings so they don’t get hidden by fixed nav */
  section {
    scroll-margin-top: 70px; /* equal or slightly larger than nav height */
  }
  
/* Nav links: hover/focus-only highlight */
.top-nav .nav-right a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 1rem;
    padding: .4rem .25rem;            /* bigger hit area */
    border-radius: 6px;               /* nicer focus ring */
    transition: color .2s ease, transform .1s ease;
  }
  
  /* underline animation (already in your theme) */
  .top-nav .nav-right a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: #ff6f61;        /* your accent */
    transition: width .25s ease;
  }
  
  /* show theme color + underline on hover */
  .top-nav .nav-right a:hover,
  .top-nav .nav-right a:focus-visible {
    color: #ff6f61;
  }
  
  .top-nav .nav-right a:hover::after,
  .top-nav .nav-right a:focus-visible::after {
    width: 100%;
  }
  
  /* tiny press feedback */
  .top-nav .nav-right a:active {
    transform: translateY(1px);
  }

  
  /* accessible focus outline (optional but recommended) */
  .top-nav .nav-right a:focus-visible {
    outline: 2px solid rgba(255,111,97,.35);
    outline-offset: 2px;
  }

  @media (max-width: 768px) {
    .top-nav {
      flex-direction: column;
      align-items: flex-start;
      padding: 1rem;
    }
  
    .nav-right {
      flex-wrap: wrap;
      margin-top: 0.5rem;
      gap: 0.75rem 1rem; /* tighter spacing */
    }
  
    .nav-right a {
      margin-left: 0;
    }
  }
  
  
  #talks ul {
    margin: 0;
    padding-left: 1.2rem;
  }
  
  #talks li {
    margin-bottom: 0.5rem;
    color: #444;
  }
  
  @media (max-width: 768px) {
    .timeline li {
      grid-template-columns: 1fr; /* single column */
      margin-bottom: 2rem;
    }
  
    .timeline-date {
      justify-content: flex-start;
      padding: 0;
      margin-bottom: 0.5rem;
      font-size: 0.85rem;
      color: #666;
    }
  
    .timeline-line {
      display: none; /* hide vertical line on mobile */
    }
  
    .timeline-content {
      padding-left: 0; /* no offset */
    }
  }
/* Position hamburger on right */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
  }
  
  /* Hamburger button */
  .menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    margin-left: auto; /* push it to the right */
  }
  .menu-btn span {
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  /* Mobile nav dropdown */
  @media (max-width: 768px) {
    .menu-btn {
      display: flex;
    }
  
    .nav-right {
      position: absolute;
      top: 60px;
      right: 0; /* align dropdown to the right */
      width: 200px;
      background: #fff;
      flex-direction: column;
      align-items: flex-start;
      gap: 0;
      padding: 0.5rem 1rem;
      display: none;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
  
    .nav-right a {
      display: block;
      width: 100%;
      padding: 0.75rem 0;
      border-bottom: 1px solid #eee;
    }
  
    .nav-right.active {
      display: flex;
    }
  
    /* Animate hamburger into X */
    .menu-btn.active span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-btn.active span:nth-child(2) {
      opacity: 0;
    }
    .menu-btn.active span:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }
  }
  