/* ==========================================================================
   Design System (QuantEcon-inspired)
   ========================================================================== */

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

:root {
  /* Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc; /* Slate 50 */
  --bg-tertiary: #f1f5f9;  /* Slate 100 */
  
  --text-primary: #0f172a;   /* Slate 900 */
  --text-secondary: #334155; /* Slate 800 */
  --text-muted: #64748b;     /* Slate 500 */
  
  --accent-color: #0f766e;   /* Teal 700 */
  --accent-hover: #0d9488;   /* Teal 600 */
  --accent-light: #f0fdfa;   /* Teal 50 */
  
  --border-color: #e2e8f0;   /* Slate 200 */
  --border-focus: #94a3b8;   /* Slate 400 */
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Lora', Georgia, Cambria, "Times New Roman", Times, serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  
  /* Layout */
  --max-width: 1040px;
  --header-height: 70px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.625;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
}

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

a:hover {
  color: var(--accent-hover);
}

ul, ol {
  margin-bottom: 1.25rem;
  list-style-position: outside;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.2s ease;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--accent-color);
  font-weight: 400;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-color);
}

.nav-link.active {
  border-bottom-color: var(--accent-color);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Main Content Wrapper */
.main-content {
  margin-top: var(--header-height);
  padding: 3rem 0;
  min-height: calc(100vh - var(--header-height) - 100px);
}

/* Hero Section */
.hero {
  padding: 4rem 0 3.5rem 0;
  background: linear-gradient(180deg, var(--accent-light) 0%, rgba(255,255,255,0) 100%);
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.75rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero .tagline {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
  font-style: italic;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  list-style: none;
  padding-left: 0;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent-color);
}

/* ==========================================================================
   Page Specific Components
   ========================================================================== */

/* Biography Grid */
.bio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.profile-card {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.profile-image-container {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem auto;
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.profile-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

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

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

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s;
  background-color: var(--bg-primary);
}

.social-btn:hover {
  color: white;
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* Home Section Layout */
.home-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

/* Timeline Components */
.timeline {
  list-style: none;
  padding-left: 0;
  border-left: 2px solid var(--border-color);
  margin-left: 0.75rem;
  margin-bottom: 1.5rem;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-color);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent-light);
  transition: all 0.2s ease;
}

.timeline-item:hover::before {
  background-color: var(--accent-hover);
  transform: scale(1.25);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline-institution {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Education List */
.edu-list {
  list-style: none;
  padding-left: 0;
}

.edu-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.edu-badge {
  background-color: var(--accent-light);
  color: var(--accent-color);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  min-width: 60px;
  text-align: center;
}

.edu-details {
  flex: 1;
}

.edu-degree {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.edu-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Filter / Sorting Controls
   ========================================================================== */

.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-select {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 2rem 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748b' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position-x: calc(100% - 8px);
  background-position-y: 50%;
}

.filter-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-light);
}

.sort-btn-group {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sort-btn {
  background-color: var(--bg-primary);
  border: none;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sort-btn:hover {
  background-color: var(--bg-tertiary);
}

.sort-btn.active {
  background-color: var(--accent-color);
  color: white;
}

/* ==========================================================================
   Listings (Publications and Projects)
   ========================================================================== */

.list-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.list-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  opacity: 1;
}

.list-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Fade out/in transitions for filtering */
.list-item.fade-out {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.list-item.hidden {
  display: none;
}

.item-main {
  cursor: pointer;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1.5rem;
}

.item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.item-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.item-tag--journal {
  background-color: #ecfdf5;
  color: #059669;
}

.item-tag--chapter {
  background-color: #eff6ff;
  color: #2563eb;
}

.item-tag--book {
  background-color: #fdf2f8;
  color: #db2777;
}

.item-tag--project {
  background-color: #fef3c7;
  color: #d97706;
}

.item-tag--vinculacion {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.item-year {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  background-color: var(--accent-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.item-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.item-authors {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.item-cite {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.item-link {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-color);
  font-weight: 500;
}

.item-link:hover {
  text-decoration: underline;
}

.item-toggle-icon {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.list-item.open .item-toggle-icon {
  transform: rotate(180deg);
  color: var(--accent-color);
}

/* Abstract / Details section */
.item-details {
  display: none;
  border-top: 1px dashed var(--border-color);
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
  animation: slideDown 0.25s ease-out forwards;
}

.item-details h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Blog Styles
   ========================================================================== */

/* Blog Grid list */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
}

.blog-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.blog-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-card-category {
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
}

.blog-card-title {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

.blog-card-title a {
  color: var(--text-primary);
}

.blog-card-title a:hover {
  color: var(--accent-color);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.975rem;
}

.blog-card-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Individual Post Layout */
.post-header {
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.post-title {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-category {
  color: var(--accent-color);
  font-weight: 600;
}

.post-tags {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.post-tag {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
}

.post-body p {
  margin-bottom: 1.5rem;
}

.post-body h3 {
  font-size: 1.45rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.post-body ul, .post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1.25rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text-muted);
}

.post-updated {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
  color: var(--text-muted);
}

.post-footer {
  max-width: 760px;
  margin: 3rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background-color: var(--accent-light);
}

/* Teaching Grid Layout */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 820px) {
  h1 {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .bio-sidebar {
    max-width: 350px;
    margin: 0 auto;
  }
  
  .home-section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Mobile menu implementation */
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-md);
  }
  
  .nav-list.open {
    display: flex;
  }
  
  .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }
  
  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .sort-btn-group {
    width: 100%;
  }
  
  .sort-btn {
    flex: 1;
  }

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

/* Course Syllabus (Details / Summary Accordion) & Info Cards */
.syllabus-section {
  margin-top: 2.5rem;
}

.course-unit {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.course-unit[open] {
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-color);
}

.course-unit summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

/* Remove default browser marker */
.course-unit summary::-webkit-details-marker {
  display: none;
}

.course-unit summary::after {
  content: '\F2E5'; /* Bootstrap Icon unicode for chevron-down */
  font-family: 'bootstrap-icons';
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.course-unit[open] summary::after {
  transform: rotate(180deg);
  color: var(--accent-color);
}

.unit-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px dashed var(--border-color);
  background-color: var(--bg-secondary);
}

.resource-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.resource-item i {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.resource-link {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
}

.resource-link:hover {
  text-decoration: underline;
}

.course-info-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .course-info-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ==========================================================================
   Voice Narration Player Widget
   ========================================================================== */

.audio-narration-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.04) 0%, rgba(15, 118, 110, 0.08) 100%);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.audio-narration-player:hover {
  border-color: rgba(15, 118, 110, 0.25);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.06) 0%, rgba(15, 118, 110, 0.1) 100%);
}

.audio-player-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--accent-color);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(15, 118, 110, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-play-btn:hover {
  background-color: var(--accent-hover);
  transform: scale(1.06);
  box-shadow: 0 4px 10px -1px rgba(15, 118, 110, 0.35);
}

.audio-play-btn:active {
  transform: scale(0.96);
}

.audio-info {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.audio-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.audio-status {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.audio-controls-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.audio-speed-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.audio-speed-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--accent-color);
  border-color: rgba(15, 118, 110, 0.2);
}

.voice-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 28px;
  height: 20px;
}

.voice-wave span {
  display: block;
  width: 3px;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
  transition: height 0.2s ease;
}

/* Playing state animations */
.audio-narration-player.playing .voice-wave span {
  animation: bounceWave 1s ease-in-out infinite;
}

.audio-narration-player.playing .voice-wave span:nth-child(1) {
  animation-delay: 0.1s;
}

.audio-narration-player.playing .voice-wave span:nth-child(2) {
  animation-delay: 0.3s;
}

.audio-narration-player.playing .voice-wave span:nth-child(3) {
  animation-delay: 0.0s;
}

.audio-narration-player.playing .voice-wave span:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes bounceWave {
  0%, 100% {
    height: 4px;
  }
  50% {
    height: 18px;
  }
}

@media (max-width: 576px) {
  .audio-narration-player {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  
  .audio-controls-right {
    width: 100%;
    justify-content: space-between;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
  }
}

