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

:root {
  --text-color: #592C38;
  --bg: #F3ECDC;
  --nav-gap: 28px;
  --nav-font-size: 18px;
  --dropdown-bg: rgba(242,240,208,0.98);
  --dropdown-border: rgba(89,44,56,0.06);
  --page-pad: 24px;
  --content-width: 1100px;
}

/* ── RESET (matches index.css exactly) ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background-color: var(--bg);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── NAVIGATION (identical to index.css) ── */
nav ul, nav a, nav button {
  font-family: 'EB Garamond', serif !important;
}

.nav-wrap {
  display: flex;
  justify-content: center;
  padding: 18px var(--page-pad);
  background: transparent;
}

/* hide hamburger on desktop */
.hamburger { display: none; }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--nav-gap);
  align-items: center;
  font-size: var(--nav-font-size);
}

nav li { position: relative; }

nav a, nav button {
  color: var(--text-color);
  text-decoration: none;
  background: none;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  font: inherit;
}

nav a:hover, nav button:hover { opacity: 0.7; }

.dropdown {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  min-width: 180px;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: 6px;
  padding: 8px 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  display: none;
  z-index: 200;
}

.dropdown a {
  display: block;
  padding: 8px 20px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 16px;
}

.dropdown a:hover { background: rgba(89,44,56,0.06); }

nav li:hover > .dropdown,
nav li:focus-within > .dropdown { display: block; }

/* ── ESSAYS PAGE ── */
main {
  padding-top: 100px;
}

.essays-page {
  width: min(var(--content-width), calc(100% - (var(--page-pad) * 2)));
  margin: 0 auto 70px;
  padding: 100px var(--page-pad) 0;
}

.essays-page h1 {
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 50px;
  padding-left: 0;
}

.essay-entry {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 60px;
  margin-bottom: 100px;
}

.essay-images {
  position: relative;
  flex-shrink: 0;
  width: 400px;
  height: 450px;
  margin-top: 18px;
}

.essay-img-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.10);
  object-fit: cover;
}

.essay-img-front {
  position: absolute;
  top: 70px;
  left: 70px;
  width: 300px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.14);
  object-fit: cover;
}

.essay-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 28px;
  max-width: 480px;
}

.essay-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 16px;
}

.essay-excerpt {
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 32px;
  font-style: italic;
  opacity: 0.92;
}

.essay-read-btn {
  align-self: flex-end;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  color: var(--text-color);
  background: transparent;
  border: 1px solid var(--text-color);
  border-radius: 4px;
  padding: 7px 22px;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.essay-read-btn:hover {
  background: var(--text-color);
  color: var(--bg);
}

/* ── FOOTER ── */
footer {
  margin-top: auto;
  padding: 10px 20px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  opacity: 0.85;
}

/* ── MOBILE ── */
@media (max-width: 720px) {

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    padding: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    left: 16px;
    top: 12px;
    z-index: 1100;
  }

  .hamburger .line {
    width: 20px;
    height: 4px;
    background: #592C38;
    border-radius: 3px;
    transition: transform .25s ease, opacity .2s ease;
    display: block;
  }

  .hamburger[aria-expanded="true"] .line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger[aria-expanded="true"] .line:nth-child(2) { opacity: 0; }
  .hamburger[aria-expanded="true"] .line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  nav { width: 100%; }
  nav ul { display: none; }

  .nav-wrap.open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 900;
    pointer-events: none;
  }

  .nav-wrap.open nav ul {
    display: flex;
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 280px;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg);
    z-index: 950;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    align-items: flex-start;
  }

  .nav-wrap.open nav ul li { width: 100%; }

  .nav-wrap.open nav ul a,
  .nav-wrap.open nav ul button {
    display: block;
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    font-size: 16px;
  }

  .nav-wrap.open nav ul .dropdown {
    position: static;
    transform: none;
    background: rgba(89,44,56,0.06);
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    margin-top: 4px;
  }

  .nav-wrap.open nav ul .dropdown a {
    padding: 8px 14px;
    font-size: 14px;
  }

  .essays-page {
    width: calc(100% - 32px);
    margin: 42px auto 60px;
    padding: 0;
  }

  .essays-page h1 {
    font-size: 28px;
    margin-bottom: 32px;
    padding-left: 0;
  }

  .essay-entry {
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 70px;
  }

  .essay-images {
    width: 280px;
    height: 310px;
    margin: 24px auto 24px;
  }

  .essay-img-back { width: 230px; }

  .essay-img-front {
    width: 230px;
    top: 60px;
    left: 60px;
  }

  .essay-content {
    max-width: 100%;
    width: 100%;
    align-items: center;
    text-align: center;
    margin-top: -80px;
  }

  .essay-read-btn { align-self: center; }

  footer {
    font-size: 12px;
  }
}