/* ============================================================
   CUSTOM FONTS
   ============================================================ */

@font-face {
  font-family: 'Canela';
  src: url('fonts/Canela Text-Regular No 2.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Canela';
  src: url('fonts/Canela Text-Regular No 2 Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Canela';
  src: url('fonts/Canela Text-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
   RESET & BASE
   ============================================================ */

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

:root {
  --bg:         #f7f4ef;
  --ink:        #1c1a17;
  --muted:      #9a9590;
  --rule:       #e0dbd3;
  --sidebar:    260px;
  --gap:        30px;
  --font:       'Canela', Georgia, serif;
  --tracking:   0.02em;
  --font-small: 13px;
    --font-medium: 16px;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}


/* ============================================================
   PAGE LAYOUT
   ============================================================ */

.page {
  display: flex;
  min-height: 100vh;
  padding: var(--gap) var(--gap) var(--gap) 38px;
  gap: var(--gap);
  max-width: 1200px;
  margin: 0;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  flex: 0 0 var(--sidebar);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
}

.sidebar-name {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: var(--tracking);
  margin-bottom: 10px;
  line-height: 1.25;
}

.sidebar-bio {
  font-size: var(--font-small);
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: var(--tracking);
  margin-bottom: 32px;
  
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

.sidebar-nav a {
  font-size: var(--font-medium);
  color: var(--ink);
  letter-spacing: var(--tracking);
  text-transform: none;
  transition: color 0.2s;
  display: inline-block;
  padding: 1px 0;
  font-style: normal;
  
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--muted);
}



/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.content {
  flex: 1;
  min-width: 0;
}


/* ============================================================
   IMAGE VIEWER
   ============================================================ */

.viewer {
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.viewer img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  object-position: left top;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.viewer img.loaded {
  opacity: 1;
}

.viewer-counter {
  margin-left: 0;
  font-size: var(--font-small);
  color: var(--muted);
  letter-spacing: var(--tracking);
}


/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-text {
  max-width: 520px;
  font-size: var(--font-medium);
  line-height: 1.65;
  letter-spacing: var(--tracking);
  margin-bottom: 48px;
  padding-top: 6px;
}

.about-text p {
  margin-bottom: 1.5em;
}

.about-text p + p {
  margin-top: 0;
}

.about-text p + p.small {
  margin-top: 4.5em;
}

.about-text a {
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.about-text a:hover {
  border-bottom-color: var(--ink);
}

.small {
  font-size: var(--font-small);
  color: var(--muted);
  letter-spacing: var(--tracking);
  line-height: 1.6;
  margin-top: 3em;
}

.video-wrap {
  width: 100%;
  max-width: 720px;
  margin-bottom: 0px;
   background: #000000;
}

.video-169 {
  aspect-ratio: 16 / 9;
  margin-bottom: 1em;
}


.essay-credit {
  margin-top: 0;
}

.essay-quote {
  margin: 0 0 1.5em 2em;
  padding: 0;
  border: none;
}

.essay-quote p {
  font-size: var(--font-small);
  margin-bottom: 1em;
}

.essay-quote p:last-child {
  margin-bottom: 0;
}

.video-wrap iframe,
.video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 680px) {
  .page {
    flex-direction: column;
    padding: 20px 14px 40px;  /* top | left&right | bottom */
    gap: 28px; /* space between sidebar and content */
  }

  .sidebar {
    flex: none;
    padding-top: 0;
    display: grid;
    grid-template-areas:
      "name nav"
      "bio  bio";
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0 20px;
  }

  .sidebar-name {
    grid-area: name;
    margin-bottom: 0;
  }

  .sidebar-bio {
    grid-area: bio;
    margin-bottom: 16px;
    margin-top: 12px;
  }

  .sidebar-nav {
    grid-area: nav;
    flex-direction: row;
    gap: 20px;
    align-self: baseline;
  }

  .viewer img {
    max-height: 60vh;
  }

  .video-wrap {
    height: calc(100vw * 0.5625);
  }
}

.viewer {
  cursor: pointer;
}

.viewer.hover-left {
  cursor: pointer;
}