/* Fonts: Goudy Bookletter 1911 (headings) and Josefin Sans (body) from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Goudy+Bookletter+1911&family=Josefin+Sans:wght@300;400;600;700&display=swap');

/* ==========================================================
   COLOR TOKENS (from your palette document)
   #BFE0F4 light blue   - base color (trust)
   #F5E5BF light yellow - optimism
   #F5C4BF light red    - passion and focus
   #3D6075 deep blue    - depth, name and text
   #75653D earthy brown - grounding accent
   ========================================================== */
:root {
  --blue-light:   #BFE0F4;
  --yellow-light: #F5E5BF;
  --red-light:    #F5C4BF;
  --blue-deep:    #3D6075;
  --brown:        #75653D;

  --color-bg-left:      var(--blue-light);
  --color-bg-right:     var(--yellow-light);
  --color-text:         var(--blue-deep);
  --color-heading:      var(--blue-deep);
  --color-accent:       var(--brown);
  --color-placeholder:  var(--red-light);
  --color-footer-bg:    var(--blue-deep);
  --color-footer-icon:  var(--yellow-light);
  --color-footer-hover: var(--red-light);

  --font-heading: "Goudy Bookletter 1911", "Goudy Old Style", Garamond, Georgia, serif;
  --font-body:    "Josefin Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(1.5rem, 5vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--yellow-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; color: var(--color-heading); margin: 0 0 0.75rem; line-height: 1.1; }
a { color: inherit; }
h1, h2, h3, p, a, li { overflow-wrap: break-word; }
a:hover { color: var(--color-accent); }
a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
img, video { max-width: 100%; }

/* ---------- Navigation ---------- */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem 1.25rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-weight: 700; display: inline-block; padding: 0.6rem 0.25rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.site-nav a:hover { color: var(--color-accent); }

/* ---------- Inner page header ---------- */
.site-header {
  background: var(--blue-light);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem var(--pad);
}
.brand { font-family: var(--font-heading); font-weight: 400; font-size: 1.5rem; text-decoration: none; color: var(--blue-deep); }
.page-title { background: var(--blue-light); padding: 1rem var(--pad) 3rem; }
.page-title h1 { font-size: clamp(2.5rem, 7vw, 5rem); letter-spacing: -0.03em; }
.page-title p { font-size: 1.25rem; margin: 0; max-width: 40ch; }

/* ---------- Inner page content ---------- */
.content { width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 1.5rem; }
.content section { margin-bottom: 3rem; }
.content h2 { font-size: 1.75rem; }
.content h3 { font-size: 1.25rem; margin-top: 1.5rem; }
.content a { text-underline-offset: 0.2em; }
.content ul { padding-left: 1.25rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; list-style: none; padding: 0; }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.content .grid { padding-left: 0; }

.card { background: var(--blue-light); padding: 1.25rem; min-width: 0; }
.card .media-placeholder { margin-bottom: 1rem; }
.card h2, .card h3 { margin-top: 0; }
.tag { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown); margin: 0 0 0.25rem; }
.piece dl { margin: 0; }
.piece dt { font-weight: 700; font-size: 0.85rem; margin-top: 0.75rem; }
.piece dd { margin: 0; }
.post { max-width: 720px; margin-bottom: 2rem; }

.skills { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0 !important; }
.skills li { background: var(--red-light); padding: 0.3rem 0.8rem; font-weight: 700; }

.btn:hover, .cta:hover { background: var(--brown); color: var(--blue-light); }

/* ---------- Media placeholders ---------- */
.media-placeholder {
  position: relative; background: var(--color-placeholder);
  display: grid; place-items: center; overflow: hidden;
}
.media-placeholder img, .media-placeholder video, .media-placeholder iframe, .media-placeholder object { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.media-placeholder .label { padding: 1rem; text-align: center; font-weight: 700; font-size: 0.95rem; }
.ratio-video    { aspect-ratio: 16 / 9; }
.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-square   { aspect-ratio: 1 / 1; }
.ratio-vertical { aspect-ratio: 9 / 16; } /* phone-style vertical video */
.ratio-letter   { aspect-ratio: 17 / 22; } /* portrait page, for PDFs */

/* ---------- Home: split screen ---------- */
.split { flex: 1; display: grid; grid-template-columns: 1fr 1fr; }
.panel-left {
  background: var(--color-bg-left); padding: var(--pad);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 3rem;
  min-height: calc(100vh - 8.5rem) /* minus top bar (4rem) and footer (4.5rem) */
}
.welcome { font-family: var(--font-heading); font-weight: 400; font-size: 1.25rem; margin: 0 0 0.75rem; }
.intro h1 { font-size: clamp(2rem, 6.5vw, 7rem); line-height: 0.95; letter-spacing: -0.03em; margin-bottom: 1.5rem; }
.intro .motto { max-width: 34ch; margin: 0 0 2rem; font-size: 1.25rem; }
.panel-right {
  background: var(--color-bg-right); padding: clamp(1rem, 2vw, 2rem);
  display: grid; gap: clamp(1rem, 2vw, 2rem); align-content: start;
}
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 2rem); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-footer-bg); color: var(--color-footer-icon);
  min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
}
.site-footer small { font-size: 0.85rem; }
.social-links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.ico { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--color-footer-icon); }
.ico:hover { color: var(--color-footer-hover); }
.ico::before { content: ""; width: 1.5rem; height: 1.5rem; background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ico-yt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.6 12 3.6 12 3.6s-7.5 0-9.4.5A3 3 0 0 0 .5 6.2C0 8.1 0 12 0 12s0 3.9.5 5.8a3 3 0 0 0 2.1 2.1c1.9.5 9.4.5 9.4.5s7.5 0 9.4-.5a3 3 0 0 0 2.1-2.1c.5-1.9.5-5.8.5-5.8s0-3.9-.5-5.8ZM9.6 15.6V8.4l6.2 3.6-6.2 3.6Z'/%3E%3C/svg%3E"); }
.ico-ig { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2c3.2 0 3.6 0 4.8.1 3.3.1 4.8 1.7 4.9 4.9.1 1.3.1 1.6.1 4.8s0 3.6-.1 4.8c-.1 3.2-1.7 4.8-4.9 4.9-1.3.1-1.6.1-4.8.1s-3.6 0-4.8-.1c-3.3-.1-4.8-1.7-4.9-4.9C2.2 15.6 2.2 15.2 2.2 12s0-3.6.1-4.8C2.4 3.9 4 2.4 7.2 2.3 8.4 2.2 8.8 2.2 12 2.2ZM12 0C8.7 0 8.3 0 7.1.1 2.7.3.3 2.7.1 7.1 0 8.3 0 8.7 0 12s0 3.7.1 4.9c.2 4.4 2.6 6.8 7 7C8.3 24 8.7 24 12 24s3.7 0 4.9-.1c4.4-.2 6.8-2.6 7-7 .1-1.2.1-1.6.1-4.9s0-3.7-.1-4.9c-.2-4.4-2.6-6.8-7-7C15.7 0 15.3 0 12 0Zm0 5.8a6.2 6.2 0 1 0 0 12.4 6.2 6.2 0 0 0 0-12.4ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm6.4-11.8a1.4 1.4 0 1 0 0 2.9 1.4 1.4 0 0 0 0-2.9Z'/%3E%3C/svg%3E"); }
.ico-li { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.4 20.5h-3.6v-5.6c0-1.3 0-3-1.8-3s-2.1 1.4-2.1 2.9v5.7H9.4V9h3.4v1.6h.1c.5-.9 1.6-1.8 3.4-1.8 3.6 0 4.3 2.4 4.3 5.5v6.2ZM5.3 7.4a2.1 2.1 0 1 1 0-4.1 2.1 2.1 0 0 1 0 4.1ZM7.1 20.5H3.6V9h3.5v11.5ZM22.2 0H1.8C.8 0 0 .8 0 1.7v20.6c0 .9.8 1.7 1.8 1.7h20.4c1 0 1.8-.8 1.8-1.7V1.7C24 .8 23.2 0 22.2 0Z'/%3E%3C/svg%3E"); }

/* ---------- Responsive ---------- */
/* iPad portrait and phones: stack the split screen */
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .panel-left { min-height: 0; gap: 2.5rem; }
  .intro h1 { font-size: clamp(2.75rem, 13vw, 5rem); }
  .site-footer { padding-block: 1.25rem; flex-direction: column; gap: 0.75rem; }
}

/* Phones */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .media-row { gap: 0.75rem; }
  .content { padding-inline: 1.25rem; }
  .site-header { flex-direction: column; align-items: flex-start; }
}

/* Large desktops: keep line lengths readable */
@media (min-width: 1600px) {
  .content { max-width: 1280px; }
}

/* ---------- Media: links and PDFs ---------- */
.media-placeholder > a { position: absolute; inset: 0; display: block; }
/* PDFs: the "Open the PDF" link shows when a browser (such as iPhone Safari) can't display PDFs inline */
.media-placeholder object { display: grid; place-items: center; text-align: center; }
.media-placeholder object a { font-weight: 700; padding: 1rem; }

/* ---------- Contact page hero ---------- */
:root { --scrim: rgba(61, 96, 117, 0.72); } /* deep-blue tint over the backdrop; raise the last number for more contrast */

.contact-hero, .page-hero {
  position: relative; isolation: isolate; flex: 1; min-height: 28rem;
  display: grid; place-items: center; text-align: center; padding: 3rem 1.5rem;
  color: var(--yellow-light);
}
.contact-hero .backdrop, .page-hero .backdrop { position: absolute; inset: 0; z-index: -1; max-width: 100%;}
.contact-hero .backdrop::after, .page-hero .backdrop::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.contact-hero .backdrop .label, .page-hero .backdrop .label { position: relative; z-index: 2; align-self: end; margin-bottom: 1rem; font-size: 0.85rem; color: var(--yellow-light); }
.page-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.page-hero .backdrop {
    position: absolute;
    inset: 0;
}

.page-hero .backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-content { display: grid; justify-items: center; gap: 2rem; }
.contact-hero h1, .page-hero h1 {
  margin: 0; color: var(--yellow-light); text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  font-size: clamp(3.25rem, 13vw, 10rem); line-height: 0.95; letter-spacing: -0.03em;
}
.hero-links { display: flex; justify-content: center; gap: clamp(1rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0; }
.hero-links .ico { width: 4.25rem; height: 4.25rem; border: 2px solid currentColor; border-radius: 50%; transition: background 0.2s ease, color 0.2s ease; }
.hero-links .ico::before { width: 2rem; height: 2rem; }
.hero-links .ico:hover { background: var(--yellow-light); color: var(--blue-deep); }
.hero-links .ico:focus-visible { outline: 3px solid var(--yellow-light); outline-offset: 4px; }
.hero-email { color: var(--yellow-light); font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; text-underline-offset: 0.25em; }
.hero-email:hover { color: var(--red-light); }

/* ---------- Media carousel (Photography card) ---------- */
.carousel { position: relative; margin-bottom: 1rem; }
.carousel-track {
  display: flex; align-items: flex-start; overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }
.carousel .slide { flex: 0 0 100%; min-width: 0; margin-bottom: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel-btn {
  position: absolute; top: calc(50% - 0.875rem); transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0 0 0.2rem;
  border: 0; border-radius: 50%; background: var(--blue-deep); color: var(--yellow-light);
  font: 700 1.75rem/1 var(--font-body); cursor: pointer; transition: background 0.2s ease;
}
.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }
.carousel-btn:hover { background: var(--brown); }
.carousel-btn:focus-visible { outline: 3px solid var(--yellow-light); outline-offset: 2px; }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-btn:disabled:hover { background: var(--blue-deep); }
.carousel-dots { display: flex; justify-content: center; gap: 0.25rem; margin-top: 0.25rem; }
.dot { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 0; background: none; cursor: pointer; }
.dot::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--blue-deep); opacity: 0.35; }
.dot[aria-current="true"]::before { opacity: 1; }
.dot:focus-visible { outline: 3px solid var(--brown); outline-offset: 1px; border-radius: 50%; }

/* ---------- Media carousel ---------- */
.carousel { position: relative; margin-bottom: 1rem; }
.carousel-track {
  display: flex; align-items: flex-start; overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }
.carousel .slide { flex: 0 0 100%; min-width: 0; margin-bottom: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.carousel-btn {
  position: absolute; top: calc(50% - 0.875rem); transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0 0 0.2rem;
  border: 0; border-radius: 50%; background: var(--blue-deep); color: var(--yellow-light);
  font: 700 1.75rem/1 var(--font-body); cursor: pointer; transition: background 0.2s ease;
}
.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }
.carousel-btn:hover { background: var(--brown); }
.carousel-btn:focus-visible { outline: 3px solid var(--yellow-light); outline-offset: 2px; }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-btn:disabled:hover { background: var(--blue-deep); }
.carousel-dots { display: flex; justify-content: center; gap: 0.25rem; margin-top: 0.25rem; }
.dot { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 0; background: none; cursor: pointer; }
.dot::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--blue-deep); opacity: 0.35; }
.dot[aria-current="true"]::before { opacity: 1; }
.dot:focus-visible { outline: 3px solid var(--brown); outline-offset: 1px; border-radius: 50%; }

/* About page: shorter hero that leads into the content below it */
.page-hero { flex: none; min-height: 100vh; }
.hero-sub { margin: 0; max-width: 36ch; font-size: clamp(1.1rem, 3vw, 1.5rem); }
.hero-cue { color: var(--yellow-light); font-weight: 700; text-underline-offset: 0.25em; }
.hero-cue:hover { color: var(--red-light); }
.hero-cue:focus-visible { outline: 3px solid var(--yellow-light); outline-offset: 4px; }

/* ---------- Brown nav bar with centered links (all pages) ---------- */
.site-header { background: var(--brown); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0; padding: 0.5rem var(--pad); }
.site-header .brand { color: var(--yellow-light); justify-self: start; }
.site-header .site-nav { grid-column: 2; }
.site-nav ul { justify-content: center; }
.site-header .site-nav a, .top-bar .site-nav a { color: var(--yellow-light); }
.site-header .site-nav a:hover, .top-bar .site-nav a:hover { color: var(--red-light); }
.site-header a:focus-visible, .top-bar a:focus-visible { outline-color: var(--yellow-light); }
.top-bar { justify-content: center; }
.page-title { padding-top: 2.5rem; }  /* the title band no longer continues the header colour */

/* Narrower screens: name on top, links centered underneath */
@media (max-width: 1000px) {
  .site-header { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-block: 0.75rem; }
  .site-header .brand { justify-self: center; }
  .site-header .site-nav { grid-column: 1; }
}

/* ---------- Home page: top bar + blue running the full page height ---------- */
.top-bar { background: var(--brown); min-height: 4rem; display: flex; align-items: center; padding: 0 var(--pad); }
@media (min-width: 801px) {
  .split { background: linear-gradient(to right, var(--color-bg-left) 50%, var(--color-bg-right) 50%); }
}

/* ---------- Home page: Work Preview carousel ---------- */
.work-preview h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.work-preview .carousel { margin-bottom: 0; }
.slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0.75rem 1rem; text-align: left;
  background: rgba(61, 96, 117, 0.9); color: var(--yellow-light); font-weight: 700;
}
.slide-tag { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-light); }


/* ---------- Updated home page: full-width layout with intro overlay ---------- */
.home-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  background: var(--yellow-light);
}

.home-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(65rem, 68vw, 48rem);
  overflow: hidden;
  background: var(--blue-deep);
}

.home-hero-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 110%;
  height: 190%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  background-size: 90% auto;
}

.intro-card {
  position: absolute;
  left: clamp(1rem, 4vw, 4rem);
  bottom: clamp(1rem, 4vw, 4rem);
  width: min(25rem, calc(100% - 2rem));
  height: min(15\7rem, calc(100% - 2rem));
  padding: clamp(1rem, 2vw, 1.75rem);
  background: var(--blue-light);
  border: 1px solid #75653D;
  color: var(--blue-deep);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.18);
}

.intro-card .welcome {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.intro-card h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.intro-card .motto {
  max-width: 42ch;
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.home-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  width: 100%;
  padding: clamp(1.25rem, 4vw, 4rem);
  background: var(--yellow-light);
}

.home-content .work-preview,
.home-content .media-row {
  width: 100%;
  min-width: 0;
}

.home-content .work-preview h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.home-content .media-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 650px) {
  .home-hero {
    min-height: 60rem;
  }

  .home-hero-image {
    object-position: center center;
  }

  .intro-card {
    left: 1rem;
    bottom: 1rem;
    width: min(30rem, calc(100% - 2rem));
    padding: 1rem;
  }

  .intro-card h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .home-content {
    padding: 1.25rem;
  }

  .home-content .media-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}
