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

/* ── Base ──────────────────────────────────────────────────────────────────── */

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  font-family: 'Lora', serif;
  background-color: #D5E4F9;
  display: block;
  flex-direction: column;
  min-height: 100vh;
  align-items: flex-start;
  justify-content: center;
}

h1, h2, h3 {
  font-weight: normal;
}

a {
  color: #8B4513;
  text-decoration: none;
}

a:hover {
  color: #5C2E0C;
  text-decoration: underline;
}

footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */

.container {
  display: flex;
  width: 100%;
  align-items: stretch;
  margin-top: 5vh;
}

.sidebar {
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  margin-left: 80px;
  flex-shrink: 0;
  justify-content: flex-start;
  position: sticky;
  top: 5vh;
  height: auto;
  margin-bottom: 5vh;
}

.sidebar img {
  width: 140px;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border: none;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  text-align: center;
}

main {
  width: 650px;
  max-width: 650px;
  line-height: 1.6;
  padding: 1.8rem 2rem 0.5rem 2rem;
  overflow: visible;
  display: block;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: 100px;
  margin-bottom: 5vh;
  min-height: 100%;
}

.bottom-photo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2rem auto 1rem auto;
}

/* ── Navigation ────────────────────────────────────────────────────────────── */

.sidebar button {
  background-color: transparent;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  width: 100%;
  max-width: 160px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.sidebar button:hover,
.sidebar button.active {
  background-color: transparent;
  color: #8B4513;
  transform: translateY(-2px);
}

.nav-link {
  display: block;
  background-color: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  cursor: pointer;
  padding: 0.5rem 1rem;
  width: 100%;
  max-width: 160px;
  margin: 0 auto;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: #8B4513;
  transform: translateY(-2px);
  text-decoration: none;
}

.nav-link.active {
  color: #8B4513;
}

/* ── Main page: tabs ───────────────────────────────────────────────────────── */

section {
  display: none;
}

section.active {
  display: block;
}

.section-divider {
  border: none;
  border-top: 3px solid #0a1a3c;
  margin: 2rem 0;
  opacity: 0.4;
}

/* ── Main page: experience/projects items ──────────────────────────────────── */

.item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #0a1a3c33;
}

.item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.item h3 {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-style: italic;
  font-weight: normal;
  opacity: 0.8;
}

.no-border {
  border-bottom: none !important;
  padding-bottom: 0;
}

.see-more {
  background: none;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  color: #8B4513;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
  margin-top: 0.5rem;
  font-style: italic;
}

.see-more:hover {
  color: #5C2E0C;
}

.more-text img {
  border-radius: 4px;
}

/* ── Blog listing ──────────────────────────────────────────────────────────── */

.post-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #0a1a3c33;
}

.post-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.post-item h3 {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.post-item h3 a {
  color: inherit;
  text-decoration: none;
}

.post-item h3 a:hover {
  color: #8B4513;
  text-decoration: underline;
}

.post-item h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1rem;
  font-style: italic;
  font-weight: normal;
  opacity: 0.8;
}

.post-date {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.65;
}

/* ── Blog post ─────────────────────────────────────────────────────────────── */

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #0a1a3c33;
}

.post-header h2 {
  margin-bottom: 0.25rem;
}

.post-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-style: italic;
  font-weight: normal;
  opacity: 0.8;
}

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

.post-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1rem 0;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 800px) {
  body {
    flex-direction: column;
    justify-content: flex-start;
  }

  .container {
    flex-direction: column;
    margin-top: 0;
  }

  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: center;
    margin-left: 0;
    padding: 1rem;
    position: static;
  }

  main {
    width: 90%;
    max-width: 90%;
    margin: 1rem auto;
    padding: 2rem 1rem;
    height: auto;
    justify-content: flex-start;
    border-radius: 10px;
  }
}
