/* ============================================================
   Kelsey Cotton -- Portfolio Stylesheet
   ============================================================
   Layout : Nav fixed RIGHT, content on LEFT
   Palette: near-white background, magenta accent
   ============================================================ */

/* ----- Custom Properties ----------------------------------- */
:root {
  /* Colors */
  --color-bg:          rgba(254, 254, 254, 1);
  --color-text:        rgba(0, 0, 0, 0.85);
  --color-text-full:   rgba(0, 0, 0, 1);
  --color-accent:      #ee43f4;
  --color-muted:       rgba(0, 0, 0, 0.4);
  --color-rule:        rgba(0, 0, 0, 1);
  --color-link-border: rgba(127, 127, 127, 0.2);

  /* Layout */
  --nav-width:         31%;
  --content-padding:   3rem;
  --text-max-width:    66rem;

  /* Typography */
  --font-body:         "Paysage", "Helvetica Neue", Helvetica, sans-serif;
  --font-heading:      "MovementDB", "Helvetica Neue", Helvetica, sans-serif;
  --font-system:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                        Oxygen, Ubuntu, Cantarell, "Open Sans",
                        "Helvetica Neue", sans-serif;
  --font-caption:      "Helvetica Neue", Helvetica, sans-serif;

  /* Sizes (rem based on 62.5% root = 10px per rem) */
  --size-body:         2.6rem;
  --size-heading:      6.5rem;
  --size-nav:          3.8rem;
  --size-caption:      1.4rem;
  --size-nav-padding:  2.4rem;

  /* Transitions */
  --transition-fade:   opacity 0.4s ease, transform 0.45s ease;
}


/* ============================================================
   @font-face Declarations
   All font files served from ../fonts/ relative to this CSS.
   ============================================================ */

/* --- Movement family -------------------------------------- */
@font-face {
  font-family: "MovementDB";
  src: url("../fonts/Movement-DirectBlack.woff2") format("woff2"),
       url("../fonts/Movement-DirectBlack.otf")   format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MovementDT";
  src: url("../fonts/Movement-DirectThin.woff2") format("woff2"),
       url("../fonts/Movement-DirectThin.otf")   format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MovementIB";
  src: url("../fonts/Movement-IndirectBlack.woff2") format("woff2"),
       url("../fonts/Movement-IndirectBlack.otf")   format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MovementIT";
  src: url("../fonts/Movement-IndirectThin.woff2") format("woff2"),
       url("../fonts/Movement-IndirectThin.otf")   format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

/* --- Paysage family --------------------------------------- */
@font-face {
  font-family: "Paysage";
  src: url("../fonts/Paysage-Regular.woff2") format("woff2"),
       url("../fonts/Paysage-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Paysage";
  src: url("../fonts/Paysage-Medium.woff2") format("woff2"),
       url("../fonts/Paysage-Medium.woff")  format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Paysage";
  src: url("../fonts/Paysage-Bold.woff2") format("woff2"),
       url("../fonts/Paysage-Bold.woff")  format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Paysage";
  src: url("../fonts/Paysage-Black.woff2") format("woff2"),
       url("../fonts/Paysage-Black.woff")  format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- DINdong ---------------------------------------------- */
@font-face {
  font-family: "DINdong";
  src: url("../fonts/DINdong.woff2") format("woff2"),
       url("../fonts/DINdong.woff")  format("woff"),
       url("../fonts/DINdong.otf")   format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Zara ------------------------------------------------- */
@font-face {
  font-family: "Zara";
  src: url("../fonts/Zara-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zara";
  src: url("../fonts/Zara-Oblique.woff") format("woff"),
       url("../fonts/Zara-Oblique.otf")  format("opentype");
  font-weight: 400;
  font-style: oblique;
  font-display: swap;
}

/* --- CirrusCumulus ---------------------------------------- */
@font-face {
  font-family: "CirrusCumulus";
  src: url("../fonts/CirrusCumulus.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Ductus Mono family ----------------------------------- */
@font-face {
  font-family: "DuctusMonoRegular";
  src: url("../fonts/DuctusMonoRegular.ttf") format("truetype"),
       url("../fonts/DuctusMonoRegular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DuctusMonoCalligraphic";
  src: url("../fonts/DuctusMonoCalligraphic.ttf") format("truetype"),
       url("../fonts/DuctusMonoCalligraphic.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DuctusMonoGeometric";
  src: url("../fonts/DuctusMonoGeometric.ttf") format("truetype"),
       url("../fonts/DuctusMonoGeometric.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DuctusMonoSquared";
  src: url("../fonts/DuctusMonoSquared.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;               /* 1rem = ~10px at default browser size   */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-body);     /* 2.2rem = ~22px                         */
  font-weight: 500;
  font-style: normal;
  line-height: 1;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}


/* ============================================================
   Typography
   ============================================================ */

h1, h2 {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: var(--size-heading);
  line-height: 1;
  color: var(--color-text);
  margin: 0;
  padding: 0;
}

h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  padding: 0;
}

h3 { font-size: 3.8rem; }
h4 { font-size: 3.1rem; }
h5 { font-size: 2.6rem; }
h6 { font-size: 2.2rem; }

p {
  margin: 0;
  padding: 0;
  line-height: 1.25;
}

small {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: var(--size-heading);
  line-height: 1;
  color: var(--color-text-full);
}

i, em   { font-style: italic; }
b, strong { font-weight: bolder; }
s       { text-decoration: line-through; }

sub, sup {
  position: relative;
  vertical-align: baseline;
  font-size: 0.75em;
}
sub { top: 0.3em; }
sup { top: -0.4em; }

blockquote {
  margin: 0;
  padding: 0 0 0 2em;
}

ul, ol {
  margin: 0;
  padding: 0 0 0 2.5em;
}

hr {
  border: 0;
  height: 1px;
  background: var(--color-rule);
  display: block;
  margin: 2rem 0;
}


/* ============================================================
   Links
   ============================================================ */

a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 0;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

a:active {
  opacity: 0.7;
}

a.active,
.page a.active {
  color: var(--color-accent);
}

a.image-link,
a.image-link:hover {
  border-bottom: 0;
  padding-bottom: 0;
}


/* ============================================================
   Images
   ============================================================ */

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
  padding: 0;
}

.content img {
  float: none;
  margin-bottom: 0;
}

figure {
  margin: 0;
}

figcaption,
.image-caption {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-caption);
  font-size: var(--size-caption);
  font-weight: 400;
  font-style: normal;
  line-height: 1.3;
  color: var(--color-muted);
}


/* ============================================================
   Text Width Limiter
   Constrains body copy / prose to a readable measure.
   ============================================================ */

.text-limit {
  display: inline-block;
  max-width: var(--text-max-width);
}


/* ============================================================
   Layout : Nav fixed RIGHT, content on LEFT
   Navigation pinned to the right side of the viewport.
   Content fills the left side.
   ============================================================ */

.site-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- Backdrop / Wallpaper --------------------------------- */
/* Hidden on inner pages; only visible on homepage via body.page-home */
.backdrop {
  display: none;
}

/* --- Main content panel (LEFT side) ----------------------- */
main {
  width: calc(100% - var(--nav-width));
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background-color: var(--color-bg);
}

/* --- Navigation -- Fixed RIGHT Overlay -------------------- */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: var(--nav-width);
  height: 100vh;
  z-index: 100;
  padding: var(--size-nav-padding);
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  pointer-events: none;           /* allow clicks to pass through */
  overflow-y: auto;
}

.site-nav > * {
  pointer-events: auto;           /* re-enable clicks on actual nav content */
}


/* ============================================================
   Homepage Layout
   Full-viewport backdrop image covering the entire screen.
   Nav overlaid on the right. Main content hidden.
   ============================================================ */

body.page-home .backdrop {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background-color: transparent;
}

body.page-home .backdrop img,
body.page-home .backdrop video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-home main {
  display: none;
}

body.page-home .site-nav {
  background: transparent;
}

body.page-home .menu-toggle {
  display: none;
}


/* ============================================================
   Page Sections
   Each "page" is a full-height section inside <main>.
   ============================================================ */

.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

.page--auto {
  min-height: auto;
}

.page-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: transparent;
}


/* ============================================================
   Content Container
   Padding and alignment within each page section.
   ============================================================ */

.content {
  padding: var(--content-padding);
  text-align: left;
}


/* ============================================================
   Navigation Styles
   ============================================================ */

/* -- Site title -------------------------------------------- */
.site-nav__title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: var(--size-nav);
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 0.5em;
}

.site-nav__title a {
  color: inherit;
}

.site-nav__title a:hover {
  color: var(--color-accent);
}

/* -- Subtitle / tagline (emoji line, etc.) ----------------- */
.site-nav__subtitle {
  font-size: var(--size-nav);
  line-height: 1.2;
  margin-bottom: 1em;
}

/* -- Navigation link list ---------------------------------- */
.site-nav__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav__links li {
  margin-bottom: 0.25em;
}

.site-nav__links a {
  font-family: var(--font-body);
  font-size: var(--size-nav);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-accent);
  transition: opacity 0.2s ease;
}

.site-nav__links a:hover {
  opacity: 0.7;
  color: var(--color-accent);
}

.site-nav__links a.active {
  opacity: 0.5;
}


/* ============================================================
   Mobile Menu (hamburger toggle)
   Hidden by default on desktop; visible on mobile via media query.
   ============================================================ */

.menu-toggle {
  display: none;                   /* hidden on desktop */
  position: fixed;
  top: 1.4rem;
  right: 2rem;
  z-index: 200;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--color-text);
  font-size: 3.3rem;
  line-height: 1;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Three-line hamburger icon via pseudo-elements */
.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  display: block;
  width: 2.4rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle__icon {
  position: relative;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle__icon::before { top: -7px; }
.menu-toggle__icon::after  { top:  7px; }

/* Animate to X when open */
.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  transform: rotate(-45deg);
  top: 0;
}


/* ============================================================
   Gallery & Thumbnails
   ============================================================ */

.gallery {
  display: grid;
  gap: 1rem;
}

.gallery--2col { grid-template-columns: repeat(2, 1fr); }
.gallery--3col { grid-template-columns: repeat(3, 1fr); }
.gallery--4col { grid-template-columns: repeat(4, 1fr); }

.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  margin: -0.5rem;
  justify-content: flex-start;
}

.thumbnail {
  padding: 0.5rem;
}

.thumbnail__image {
  display: block;
  width: 100%;
  height: auto;
}

.thumbnail__title {
  margin-top: 0.8rem;
  margin-bottom: 0.2rem;
  font-family: var(--font-caption);
  font-size: var(--size-caption);
  font-weight: 400;
  font-style: normal;
  line-height: 1.2;
  color: var(--color-text);
}

.thumbnail__tags {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-caption);
  font-size: var(--size-caption);
  font-weight: 400;
  font-style: normal;
  line-height: 1.3;
  color: var(--color-muted);
}

.thumbnail__tags a {
  color: rgba(0, 0, 0, 0.35);
  border-bottom: 0;
  text-decoration: none;
}


/* ============================================================
   Audio Player (minimal)
   ============================================================ */

.audio-player {
  max-width: 36rem;
  height: 3.3rem;
  outline: 1px solid rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.6);
  background: #fff;
  font-family: var(--font-system);
  font-size: var(--size-caption);
  font-weight: 400;
  font-style: normal;
  line-height: 1.3;
  text-align: left;
  margin: 1px 1px 1em 1px;
  display: flex;
  align-items: center;
}


/* ============================================================
   Scroll / Fade-in Transitions
   Apply .reveal to any element you want to animate on scroll.
   JavaScript adds .is-visible when the element enters viewport.
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: var(--transition-fade);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   Rotate Animation (decorative spinner)
   ============================================================ */

.rotate {
  display: inline-block;
  animation: rotate 7s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ============================================================
   Utility Classes
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.text-accent { color: var(--color-accent); }
.text-muted  { color: var(--color-muted); }

.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }
.font-dindong { font-family: "DINdong", var(--font-body); }
.font-zara    { font-family: "Zara", var(--font-body); }
.font-cirrus  { font-family: "CirrusCumulus", var(--font-body); }


/* ============================================================
   Responsive -- Tablet (max 1024px)
   Nav collapses, content goes full width.
   ============================================================ */

/* ============================================================
   Responsive -- Mobile (max 768px)
   Hamburger menu, nav becomes full-screen overlay.
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --content-padding: 2rem;
    --size-body:       2.2rem;
    --size-heading:    4.4rem;
    --size-nav:        2.8rem;
  }

  /* Show hamburger, hide nav links by default */
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 100%;
    height: 100vh;
    background: rgba(20, 20, 20, 0.95);
    z-index: 150;
    text-align: left;
    padding: 2rem 3rem 9rem 3rem;
    flex-direction: column;
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    pointer-events: auto;
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav__title,
  .site-nav__subtitle {
    color: rgba(255, 255, 255, 0.9);
  }

  .site-nav__links {
    flex-direction: column;
    gap: 0;
  }

  .site-nav__links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 2.4rem;
    display: block;
    padding: 0.5em 0;
  }

  .site-nav__links a:hover {
    opacity: 1;
    color: var(--color-accent);
  }

  .site-nav__links a.active {
    opacity: 0.4;
  }

  /* Content full width on mobile */
  main {
    width: 100%;
  }

  .page {
    min-height: auto;
  }

  /* Gallery collapses */
  .gallery--2col,
  .gallery--3col,
  .gallery--4col {
    grid-template-columns: 1fr;
  }

  .audio-player {
    max-width: 100%;
  }

  /* Homepage: backdrop still fills viewport */
  body.page-home .backdrop {
    display: block;
    position: fixed;
    width: 100vw;
    height: 100vh;
  }

  body.page-home main {
    display: none;
  }

  body.page-home .menu-toggle {
    display: none;
  }

  body.page-home .site-nav {
    position: fixed;
    width: auto;
    height: 100vh;
    right: 0;
    left: auto;
    text-align: right;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    background: transparent;
    transform: none;
  }

  body.page-home .site-nav__title,
  body.page-home .site-nav__subtitle {
    color: var(--color-text);
  }

  body.page-home .site-nav__links a {
    color: var(--color-accent);
    font-size: var(--size-nav);
  }
}


/* ============================================================
   Responsive -- Small Mobile (max 480px)
   ============================================================ */

@media (max-width: 480px) {
  :root {
    --content-padding: 1.5rem;
    --size-heading:    3.4rem;
    --size-nav:        2.4rem;
  }
}


/* ============================================================
   Print
   ============================================================ */

@media print {
  .site-nav,
  .menu-toggle,
  .backdrop {
    display: none;
  }

  main {
    width: 100%;
    margin: 0;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}
