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

html,
body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--surface-1);
  color: var(--text-1);
  font-size: var(--size-2);
  line-height: 1.6;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  width: 100%;
  box-sizing: border-box;
}

main.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-5);
  align-items: start;
}

.dashboard-main {
  min-width: 0;
  min-width: 300px;
}

.dashboard-sidebar {
  min-width: 0;
  min-width: 280px;
}

.author-main {
  grid-column: 1 / -1;
  min-width: 0;
}

.author-sidebar {
  grid-column: 1 / -1;
  min-width: 0;
}

.session-main {
  min-width: 0;
  min-width: 300px;
}

.session-stats-card {
  min-width: 0;
  min-width: 300px;
}

.book-main {
  grid-column: 1 / -1;
  min-width: 0;
}

.book-progress {
  min-width: 0;
  min-width: 250px;
}

.book-reviews {
  grid-column: 1 / -1;
  min-width: 0;
}

header {
  background: var(--color-primary);
  color: var(--text-inv);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  margin: 0 auto var(--space-5);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  width: 100%;
  box-sizing: border-box;
}

header h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--size-5);
}

.navbar {
  background: var(--color-primary);
  color: var(--text-inv);
  padding: var(--space-3) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-1);
  margin-bottom: var(--space-5);
  width: 100%;
}

.navbar-content {
  margin: 0 2%;
  padding: 0 var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar .nav-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav-brand h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--size-4);
  color: var(--text-inv);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-meta span {
  font-size: var(--size-1);
  opacity: 0.9;
}

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

nav a {
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-s);
}

nav a:hover,
nav a:focus-visible,
nav a.active {
  background: var(--color-primary-600);
  outline: none;
}

nav a.active {
  font-weight: bold;
}

section,
.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
  padding: var(--space-6);
  margin: var(--space-5) auto;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

h2,
h3 {
  font-family: var(--font-sans);
  color: var(--color-primary);
  margin: 0 0 var(--space-3);
}

img {
  display: block;
  width: fit-content;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-1);
  max-height: 500px;
}

lord-icon.book-icon-home {
  display: flex;
  height: var(--icon-large);
  width: var(--icon-large);
  justify-self: center;
}

svg.icon {
  display: inline;
  height: 2em;
  width: 2em;
  vertical-align: top;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.stats div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}

.stats div:last-child {
  border-bottom: none;
}

.stats dt {
  font-weight: 600;
  color: var(--text-2);
}

.stats dd {
  font-weight: bold;
  color: var(--color-primary);
  font-size: var(--size-3);
}

.author-layout {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.author__photo {
  flex-shrink: 0;
  width: 200px;
  height: auto;
}

.author__content {
  flex: 1;
}

.book-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
}

.book-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}

.book-list li:last-child {
  border-bottom: none;
}

.book-list a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.book-list a:hover {
  text-decoration: underline;
}

.session-preview {
  background: var(--surface-3);
  padding: var(--space-4);
  border-radius: var(--radius-s);
  margin-top: var(--space-4);
}

.session-preview h3 {
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  font-size: var(--size-2);
}

.session-preview p {
  margin: var(--space-1) 0;
  font-size: var(--size-1);
}

.book-layout {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.book-cover {
  flex-shrink: 0;
}

.book-cover img {
  width: 160px;
  height: auto;
}

.book-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.book-info div {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.book-info dt {
  font-weight: 600;
  color: var(--text-2);
  font-size: var(--size-1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.book-info dd {
  color: var(--text-1);
  font-size: var(--size-2);
}

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

.book-info a:hover {
  text-decoration: underline;
}

.progress-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.progress-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2);
  background: var(--surface-3);
  border-radius: var(--radius-s);
}

.progress-item .label {
  font-weight: 500;
  color: var(--text-2);
}

.progress-item .value {
  font-weight: bold;
  color: var(--color-primary);
  font-size: var(--size-2);
}

.reviews {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 0;
}

.review {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  margin-bottom: var(--space-3);
}

.review:last-child {
  margin-bottom: 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}

.review-meta {
  font-size: var(--size-1);
  color: var(--text-2);
}


.session-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2);
  background: var(--surface-3);
  border-radius: var(--radius-s);
}

.stat-item .label {
  font-weight: 500;
  color: var(--text-2);
}

.stat-item .value {
  font-weight: bold;
  color: var(--color-primary);
  font-size: var(--size-2);
}

@media (max-width: 1024px) {
  main.container {
    gap: var(--space-4);
  }

  .container {
    padding: 0 var(--space-4);
  }

  header {
    margin: 0 auto var(--space-4);
    padding: var(--space-4);
  }
}

@media (max-width: 768px) {
  main.container {
    gap: var(--space-3);
  }

  .author-layout,
  .book-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
  }

  .author__photo {
    width: 200px;
  }

  .book-cover img {
    width: 180px;
  }


  .book-info,
  .author__content {
    text-align: left;
    max-width: 500px;
  }

  .container {
    padding: 0 var(--space-3);
  }

  header {
    margin: 0 auto var(--space-3);
    padding: var(--space-4);
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: var(--space-3) 0;
  }

  .navbar-content {
    flex-direction: column;
    gap: var(--space-3);
    padding: 0 var(--space-2);
  }

  .nav-brand h2 {
    font-size: var(--size-3);
  }

  .navbar .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  nav a {
    padding: var(--space-2) var(--space-3);
    font-size: var(--size-1);
  }

  .container {
    padding: 0 var(--space-2);
  }

  header {
    margin: 0 auto var(--space-3);
    padding: var(--space-3);
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }

  header h1 {
    font-size: var(--size-4);
  }

  main.container {
    gap: var(--space-2);
  }

  section,
  .card {
    padding: var(--space-4);
    margin: var(--space-2) auto;
  }

  .stats div,
  .progress-item,
  .stat-item {
    flex-direction: column;
    gap: var(--space-1);
    text-align: center;
    padding: var(--space-3);
  }

  .author__photo {
    width: 150px;
  }

  .book-cover img {
    width: 140px;
  }


  .book-info,
  .author__content {
    max-width: 100%;
  }
}
