:root {
  /* Primary colors */
  --color-primary: #239e93;
  --color-primary-dark: #084f49;
  --color-primary-light: #b8f5e8;

  /* Text colors */
  --color-text: #333;
  --color-text-muted: #666;
  --color-text-light: #888;
  --color-text-darker: #061624;

  /* Background colors */
  --color-bg: #fafafa;
  --color-bg-white: #fff;

  /* Border colors */
  --color-border: #e2e2e2;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

/* Page load animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

main h1 {
  animation: slideUp 0.6s ease-out;
}

main > p,
main > div:not(.hero):not(.book-grid):not(.info-grid) {
  animation: slideUp 0.6s ease-out 0.1s both;
}

.hero {
  animation: fadeIn 0.8s ease-out;
}

.hero .profile-photo {
  animation: slideInLeft 0.7s ease-out 0.2s both;
}

.hero-text {
  animation: slideInRight 0.7s ease-out 0.2s both;
}

.info-grid {
  animation: slideUp 0.6s ease-out 0.3s both;
}

.info-section {
  animation: slideUp 0.5s ease-out both;
}

.info-section:nth-child(1) {
  animation-delay: 0.4s;
}

.info-section:nth-child(2) {
  animation-delay: 0.5s;
}

.book-grid {
  animation: fadeIn 0.5s ease-out 0.2s both;
}

.book-card {
  animation: slideUp 0.5s ease-out both;
}

.book-card:nth-child(1) {
  animation-delay: 0.1s;
}
.book-card:nth-child(2) {
  animation-delay: 0.2s;
}
.book-card:nth-child(3) {
  animation-delay: 0.3s;
}
.book-card:nth-child(4) {
  animation-delay: 0.4s;
}
.book-card:nth-child(5) {
  animation-delay: 0.5s;
}

main > h2,
main > h3 {
  animation: slideUp 0.5s ease-out 0.2s both;
}

main > ul {
  animation: slideUp 0.5s ease-out 0.3s both;
}

.btn {
  animation: slideUp 0.5s ease-out 0.4s both;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
header {
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

header nav {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

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

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-primary);
  font-weight: 600;
}

.nav-links a.nav-btn {
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.nav-links a.nav-btn:hover {
  background: var(--color-primary-dark);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.nav-links a.nav-btn::after {
  display: none;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger to X animation */
.menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: calc(100vh - 200px);
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

h2 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--color-text);
}

p {
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font: 700;
}

.subtitle-description {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Lists */
ul {
  margin: 1rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-bg-white) 100%);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.profile-photo {
  width: 400px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-primary-light);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.profile-photo-about:hover,
.profile-photo:hover {
  transform: scale(1.05);
}

.profile-photo-about {
  width: 225px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-primary-light);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.hero-text .subtitle {
  margin-bottom: 0.5rem;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.contact-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.contact-btn:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.contact-btn svg {
  flex-shrink: 0;
}

/* Tags */
.tag {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
}

.tag:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.license-tags {
  margin-top: 0.5rem;
}

.license-tags .tag {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
}

.license-tags .tag:hover {
  background: var(--color-primary-dark);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Info Sections */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.info-grid .info-section {
  margin-top: 0;
  padding: 1.5rem;
  border-top: none;
  background: var(--color-bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

.info-grid .info-section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.info-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.info-section h2 {
  margin-top: 0;
  color: var(--color-primary);
}

.note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-white);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

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

.book-cover {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.book-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.book-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.book-meta {
  font-size: 0.75rem;
  color: var(--color-text-darker) !important;
  margin: 0.1rem 0;
}

.book-meta + p:not(.book-meta) {
  margin-top: 0.5rem;
}

.audio-wrapper {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.audio-wrapper audio {
  display: none;
}

.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.play-btn:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.play-btn:active {
  transform: translateY(0);
}

.play-btn svg {
  flex-shrink: 0;
}

/* Credentials Grid */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.credential-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all 0.3s ease;
  animation: slideUp 0.5s ease-out both;
}

.credential-card:nth-child(1) {
  animation-delay: 0.1s;
}
.credential-card:nth-child(2) {
  animation-delay: 0.2s;
}
.credential-card:nth-child(3) {
  animation-delay: 0.3s;
}
.credential-card:nth-child(4) {
  animation-delay: 0.4s;
}

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

.credential-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.credential-card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.credential-card .btn {
  margin: 0;
  margin-top: auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-light);
  font-size: 0.9rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-white);
}

/* Responsive - Navigation */
@media (max-width: 850px) {
  header nav {
    position: relative;
    flex-wrap: nowrap;
  }

  .logo {
    font-size: 1.1rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    background: var(--color-bg-white);
    text-align: center;
    padding: 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
    box-shadow: none;
  }

  .nav-links a {
    padding: 0.75rem 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .menu-toggle:checked ~ .nav-links {
    max-height: 450px;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
  }

  .menu-toggle:checked ~ .nav-links a {
    opacity: 1;
    transform: translateY(0);
  }

  .menu-toggle:checked ~ .nav-links a:nth-child(1) {
    transition-delay: 0.1s;
  }
  .menu-toggle:checked ~ .nav-links a:nth-child(2) {
    transition-delay: 0.15s;
  }
  .menu-toggle:checked ~ .nav-links a:nth-child(3) {
    transition-delay: 0.2s;
  }
  .menu-toggle:checked ~ .nav-links a:nth-child(4) {
    transition-delay: 0.25s;
  }
  .menu-toggle:checked ~ .nav-links a:nth-child(5) {
    transition-delay: 0.3s;
  }
  .menu-toggle:checked ~ .nav-links a:nth-child(6) {
    transition-delay: 0.35s;
  }
}

/* Responsive - Layout (Tablet) */
@media (max-width: 850px) {
  .hero .profile-photo {
    width: 180px;
    height: 180px;
  }
}

/* Responsive - Layout (Mobile) */
@media (max-width: 600px) {
  main {
    padding: 2rem 1rem;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .hero .profile-photo {
    width: 160px;
    height: 160px;
  }

  .profile-photo-about {
    float: none;
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 200px;
    height: 267px;
  }

  h1:has(+ .profile-photo-about) {
    text-align: center;
  }

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

  .contact-info {
    justify-content: center;
  }
}
