/* Professional, responsive styling (desktop + mobile drawer)
   Keep content text as provided; layout/formatting only. */

:root{
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #111213;
  --muted: #5b6068;
  --border: rgba(17,18,19,.12);
  --accent: #8b1e3f;
  --shadow: 0 10px 30px rgba(17,18,19,.10);
  --radius: 18px;
  --max: 980px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(1200px 700px at 20% 0%, rgba(139,30,63,.10), transparent 55%),
    radial-gradient(1200px 700px at 80% 0%, rgba(40,90,140,.08), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(139,30,63,.55);
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
a:hover{ color: var(--accent); border-bottom-color: var(--accent); }

a:focus-visible, button:focus-visible{
  outline: 3px solid rgba(40,90,140,.35);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ===== Header ===== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 110;
  backdrop-filter: blur(10px);
  background: rgba(246,245,242,.78);
  border-bottom: 1px solid var(--border);
}

.topbar{
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 14px 6px;
  display: flex;
  align-items: center;
  justify-content: center; /* keeps title centered */
}

.site-title{
  font-weight: 700;
  letter-spacing: .06em;
  font-size: 20px;
  text-align: center;
  white-space: nowrap;
}

.header-logo{
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border-bottom: none !important;
  padding: 0 !important;
}
.header-logo img{
  height: 54px;
  width: auto;
  display: block;
}

/* Desktop nav row */
.navbar{
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 14px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.navbar a{
  border: 1px solid rgba(17,18,19,.14);
  background: rgba(255,255,255,.70);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: none !important;
}
.navbar a:hover{
  background: rgba(139,30,63,.07);
  color: var(--text);
}

/* Hamburger button (hidden on desktop) */
.hamburger{
  display: none;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 1px solid rgba(17,18,19,.14);
  background: rgba(255,255,255,.70);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;   /* stack bars vertically */
  gap: 4px;
  padding: 0;
  z-index: 120;
}
.hamburger span{
  display:block;
  width: 18px;
  height: 2px;
  background: rgba(17,18,19,.80);
  border-radius: 2px;
}

/* Backdrop for mobile drawer */
.menu-backdrop{
  display: none;
}

/* ===== Main content card (inner pages in iframe) ===== */
article{
  float: none !important;
  width: min(var(--max), calc(100% - 36px)) !important;
  margin: 26px auto 70px !important;
  padding: 22px !important;
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* About page layout helper */
.about-grid{
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: start;
}
.about-photo img{
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(17,18,19,.06);
}
@media (max-width: 820px){
  .about-grid{ grid-template-columns: 1fr; }
}

/* ===== Iframe sizing ===== */
iframe{
  display:block;
  width: 100%;
  border: none;
  height: calc(100vh - 140px);
  background: transparent;
}

/* ===== Mobile: drawer nav ===== */
@media (max-width: 640px){
  .site-title{ font-size: 16px; }
  .header-logo{ right: 10px; }
  .header-logo img{ height: 42px; }

  .hamburger{ display: inline-flex; }

  /* Turn navbar into a left drawer */
  .navbar{
    position: fixed;
    inset: 0 auto 0 0;
    height: 100vh;
    width: min(86vw, 320px);
    margin: 0;
    padding: 88px 14px 18px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    background: rgba(246,245,242,.98);
    border-right: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(17,18,19,.18);
    transform: translateX(-110%);
    transition: transform .22s ease;
    overflow-y: auto;
    z-index: 100;
  }

  .navbar a{
    text-align: left;
    padding: 11px 12px;
    font-size: 15px;
  }

  .menu-backdrop{
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(0,0,0,.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 90;
  }

  body.menu-open .navbar{ transform: translateX(0); }
  body.menu-open .menu-backdrop{ opacity: 1; pointer-events: auto; }

  iframe{ height: calc(100vh - 84px); }
}

/* Landscape phones: slightly tighter */
@media (max-width: 760px) and (orientation: landscape){
  @media (max-width: 640px){
    .topbar{ padding-top: 10px; padding-bottom: 4px; }
    .header-logo img{ height: 38px; }
    .navbar{ padding-top: 76px; }
    iframe{ height: calc(100vh - 76px); }
  }
}
