@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&display=swap');
:root {
  --bg: #d7c9bc;
  --text: #08322e;
--left-width: 31vw;
--left-max: 390px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* LEFT: fixed name + menu */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(var(--left-width), var(--left-max));
  height: 100vh;
  padding: 22px 28px;
  background: var(--bg);
}

.sidebar h1 {
  margin: 0 0 20px 0;
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1.1;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar nav a {
  text-decoration: none;
  color: var(--text);
  display: block;
}

/* main items */
.sidebar nav > a:not(.sub-link) {
  font-size: clamp(18px, 1.7vw, 26px);
  line-height: 1.15;
  font-weight: 500;
  margin-left: 0;
}

/* subsection items: clearly smaller + indented */
.sidebar nav > a.sub-link {
  font-size: clamp(12px, 0.975vw, 15px) !important;
  line-height: 1.1;
  font-weight: 400;
  margin-left: 22px;
  opacity: 0.95;
}

/* RIGHT: scrolling area */
.content {
  margin-left: min(var(--left-width), var(--left-max));
  min-height: 100vh;
  border-left: 1px solid #111; /* black vertical divider */
}

/* anchor positioning */
section[id] {
  scroll-margin-top: 24px;
}

/* landing */
.landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: center;
  gap: 48px;                 
  padding: 0 54px 0 32px;    
}

.landing-about {
  max-width: 680px;
}

.landing-about h2 {
  margin-bottom: 8px;
}

.profile-photo {
  display: block;
  width: min(33vw, 520px);
  max-height: 80vh;
  height: auto;
  object-fit: contain;
  margin-right: 16px;       
}

/* content sections */
section:not(.landing) {
  padding: 42px 48px 40px 48px;
}

h2 {
  margin: 0 0 10px 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
}

h3 {
  margin: 16px 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

p, li {
  font-size: 19px;
  line-height: 1.45;
}

ul {
  margin-top: 6px;
  padding-left: 1.15em;
}

.pub-link {
  margin-left: 6px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.9em;
  white-space: nowrap;
}

iframe {
  width: 100%;
  height: 820px;
  border: none;
  background: #fff;
}

/* mobile */
.cv-mobile-link { display: none; }

@media (max-width: 980px) {
  .cv-embed { display: none; }
  .cv-mobile-link { display: block; }
  body {
  font-family: "Cormorant Garamond", Georgia, serif;
}
  .sidebar {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 12px 10px 8px;
    z-index: 10;
    border-bottom: 1px solid rgba(8, 50, 46, 0.35);
  }

  .sidebar h1 {
    font-size: 24px;
    margin-bottom: 6px;
    white-space: nowrap;
  }

  .sidebar nav {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }

 .sidebar nav > a:not(.sub-link) {
  font-size: clamp(14px, 3.4vw, 17px);
  white-space: nowrap;
  line-height: 1;
}

.sidebar nav > a.sub-link {
  display: none !important;
}
  .content {
    margin-left: 0;
    border-left: none;
    border-top: none;
  }

  section[id] {
    scroll-margin-top: 110px;
  }

  /* only requested mobile landing adjustment:
     move content up so About + photo fit on first screen */
  .landing {
  min-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 25px;              /* more space between photo and text */
  padding: 34px 16px 12px;/* more space below menu bar */
}

.profile-photo {
  order: 1;
  width: min(76vw, 380px);
  max-height: 35vh;       /* keeps photo+text fitting on one screen */
  align-self: center;
  margin: 0;
}
  
.landing-about {
  order: 2; /* text second */
  max-width: 100%;
}

.landing-about p {
  margin: 0;
}

  section:not(.landing) {
    padding: 28px 16px;
  }

  h2 { font-size: 30px; }
  h3 { font-size: 24px; }
  p, li { font-size: 20px; }

  iframe {
    height: 72vh;
  }
}
