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

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #1f2933;
  background-color: #f5f7fa;
}

/* Layout container */

.layout {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.95)
    ),
    #f5f7fa;
}

/* ===== Sidebar / Navigation ===== */

.sidebar {
  background: #0f172a;
  color: #e5e7eb;
  padding: 2.5rem 2rem;
  width: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  position: sticky;
  top: 0;
  height: 100vh;
}

.navigation {
  width: 100%;
}

.name {
  margin: 0 0 2rem 0;
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.name a {
  color: #f9fafb;
  text-decoration: none;
}

.name a:hover,
.name a:focus-visible {
  text-decoration: underline;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.navigation li + li {
  margin-top: 0.5rem;
}

.navigation a {
  display: inline-block;
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0;
  position: relative;
}

.navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 0;
  height: 2px;
  background: #38bdf8;
  transition: width 0.18s ease-out;
}

.navigation a:hover::after,
.navigation a:focus-visible::after {
  width: 60%;
}

.navigation a:hover,
.navigation a:focus-visible {
  color: #f9fafb;
}

/* ===== Main Content ===== */

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 3rem 3.5rem;
}

.content {
  max-width: 740px;
  width: 100%;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #111827;
}

.content p {
  margin-top: 0;
  margin-bottom: 1.3rem;
}

.content p:first-child {
  font-family: "Merriweather", "Georgia", serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #111827;
}

.content a {
  color: #0369a1;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.25);
  transition: color 0.18s ease-out, border-color 0.18s ease-out,
    background-color 0.18s ease-out;
}

.content a:hover,
.content a:focus-visible {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.5);
  background-color: rgba(191, 219, 254, 0.25);
}

.content i {
  font-family: "Merriweather", "Georgia", serif;
}

/* Call-to-action line */

.cta {
  margin-top: 2rem;
  font-weight: 400;
}

.cta a {
  font-weight: 700;
  padding: 0.15rem 0.1rem;
}

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

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    padding: 1.25rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .name {
    margin-bottom: 0;
    font-size: 1.2rem;
  }

  .navigation ul {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .navigation li + li {
    margin-top: 0;
  }

  .navigation a {
    font-size: 0.8rem;
  }

  .main {
    padding: 2.25rem 1.5rem 2.5rem;
  }

  .content {
    font-size: 1rem;
  }
}

@media (max-width: 550px) {
  .sidebar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .navigation ul {
    justify-content: flex-start;
    gap: 0.75rem 1rem;
  }

  .main {
    padding: 1.75rem 1.25rem 2.25rem;
  }

  .content {
    font-size: 0.98rem;
  }
}

/* ===== Focus outlines (accessibility) ===== */

a:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
