/* Patrick Boniface — single-page portfolio
   Styled after the A4 landscape portfolio PDF: dark gradient masthead,
   wide-tracked titles, dotted rules and a fixed "Links to" sidebar. */

:root {
  --ink: #111;
  --title: #0f2830;
  --muted: #6d6d6d;
  --dots: #b8b8b8;
  --active-bg: #a9a9a9;
  --quote-cool: #a8b5b8;
  --quote-warm: #cbc5b2;
  --side: clamp(210px, 15vw, 250px);
  --gutter: clamp(24px, 12vw, 200px);
  --dark-gradient: linear-gradient(100deg, #030505 0%, #0b1110 30%, #2f3b38 48%, #4b5955 53%, #26302e 60%, #0b100f 76%, #050606 100%);
  --display: "Saira", "Barlow", system-ui, sans-serif;
  --body: "Barlow", "DIN Alternate", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 17px/1.45 var(--body);
}

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

a { color: inherit; }

.main { margin-right: var(--side); }

/* ---------- Fixed sidebar ---------- */

.sidenav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--side);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  z-index: 20;
  font-family: var(--display);
  text-transform: uppercase;
  scrollbar-width: thin;
}

.sidenav ul { list-style: none; margin: 0; padding: 0; }

.nav-title {
  margin: 0;
  height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 0 0 18px 28px;
  background: var(--dark-gradient);
  background-size: 400% 100%;
  background-position: 70% 0;
  color: #fff;
  font: 500 20px/1 var(--display);
  letter-spacing: 0.22em;
}

.dotted-b {
  background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.7px) 28px 100% / 7px 4px repeat-x;
  padding-bottom: 6px;
}

.nav-primary {
  padding-top: 6px;
  background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.7px) 0 0 / 4px 7px repeat-y;
}

.sidenav a {
  display: block;
  padding: 3px 12px 3px 30px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.sidenav .group { padding: 14px 0 8px; }

.sidenav .group-label {
  display: block;
  padding: 3px 12px 2px 30px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
}

.sidenav .sub a {
  padding-left: 40px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-primary > ul > li > a { padding-top: 12px; padding-bottom: 12px; }

.sidenav a:hover,
.sidenav a:focus-visible { background: #e6e6e6; color: #333; }

.sidenav a[aria-current] { background: var(--active-bg); color: #fff; }

.mobile-bar, .menu-toggle { display: none; }

/* ---------- Cover ---------- */

.cover { display: block; }

.masthead {
  background: var(--dark-gradient);
  color: #fff;
  text-align: center;
  padding: clamp(60px, 9vw, 140px) 20px;
  border-bottom: 10px solid #0c1413;
}

.masthead p { margin: 0; }

.brand-name {
  display: block;
  font: 500 clamp(30px, 5.5vw, 88px)/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
}

.brand-tag {
  display: block;
  margin-top: 0.9em;
  font: 600 clamp(11px, 1.4vw, 20px)/1.3 var(--body);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero {
  aspect-ratio: 2193 / 996;
  max-height: 75vh;
  width: 100%;
  background: #2a3236 url("../images/hero-lake.jpg") center 35% / cover no-repeat;
}

/* ---------- Sections ---------- */

.section {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  padding: 90px 0 70px;
  scroll-margin-top: 0;
}

.section + .section { border-top: 1px solid #ececec; }

.section-head { grid-column: 2; padding-right: 32px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font: 500 13px/1 var(--display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0 0 18px;
  color: var(--title);
  font: 500 clamp(30px, 3.4vw, 54px)/1.05 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Dotted rule under the title: a short run in the gutter, then the main run. */
.rule {
  grid-column: 1 / 3;
  height: 4px;
  background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.7px) 0 0 / 7px 4px repeat-x;
  -webkit-mask: linear-gradient(90deg, #000 calc(var(--gutter) - 40px), transparent calc(var(--gutter) - 40px), transparent var(--gutter), #000 var(--gutter));
          mask: linear-gradient(90deg, #000 calc(var(--gutter) - 40px), transparent calc(var(--gutter) - 40px), transparent var(--gutter), #000 var(--gutter));
}

.content {
  grid-column: 2;
  padding: 36px 48px 0 0;
  min-width: 0;
}

/* ---------- Typography helpers ---------- */

.lead p { margin: 0 0 1em; }

.dropcap::first-letter {
  float: left;
  margin: 0.02em 0.12em 0 0;
  font: 500 6.6em/0.78 var(--display);
  color: #111;
}

.bar {
  margin: 1.6em 0 0.5em;
  padding: 0.35em 0.6em;
  max-width: 470px;
  background: var(--dark-gradient);
  color: #fff;
  font: 700 1.2em/1.2 var(--body);
}

.bar:first-child { margin-top: 0; }

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 470px));
  gap: 0 80px;
}

.columns p { margin: 0 0 1em; }

.caption { font-style: italic; font-size: 15px; line-height: 1.3; }
.caption b { font-weight: 700; }

.bar-rule {
  border-left: 14px solid #1a1a1a;
  border-radius: 7px 0 0 7px;
  padding-left: 14px;
}

/* ---------- Overview ---------- */

.overview .portrait {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin-top: 40px;
  width: calc(var(--gutter) - 40px);
}

/* ---------- Magazines & journals ---------- */

.mag-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 40px 50px;
  align-items: start;
}

.spreads { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }

.spreads img, .tilted {
  border: 1px solid #ddd;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.tilted { transform: rotate(3deg); max-width: 520px; }

/* ---------- Books ---------- */

.books-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 40px;
  align-items: start;
}

.books-intro .tilted { transform: rotate(-1.5deg); margin-top: -60px; }

.book-shelf {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 22px;
}

.book-shelf img {
  width: 100%;
  aspect-ratio: 165 / 232;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s;
}

.book-shelf li:hover img { transform: translateY(-4px); }

/* ---------- Full-bleed photo sections ---------- */

.photo-section {
  min-height: 100vh;
  align-content: start;
  background: #222 var(--photo) center / cover no-repeat;
  border-top: 0 !important;
}

.photo-section .section-head h2 { color: var(--photo-title, #fff); }
.photo-section .eyebrow { color: var(--photo-title, #fff); opacity: 0.85; }

.photo-section .rule {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1.3px, transparent 1.7px);
  -webkit-mask: linear-gradient(90deg, transparent var(--gutter), #000 var(--gutter));
          mask: linear-gradient(90deg, transparent var(--gutter), #000 var(--gutter));
}

.photo-section .caption {
  display: inline-block;
  margin: 0;
  padding: 10px 14px;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.8);
  color: #111;
}

.landscape { --photo: url("../images/ballyquin-beach.jpg"); --photo-title: #fff; }
.naval-two { --photo: url("../images/hms-kent-albion.jpg"); --photo-title: var(--title); }

/* ---------- Naval one ---------- */

.naval-one-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 120px;
  gap: 30px;
  align-items: end;
  margin-top: 30px;
}

.naval-one-grid .caption { font-size: 14px; }

/* ---------- Broadcasting audio ---------- */

.audio-clip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: center;
  margin-top: 40px;
  max-width: 470px;
}

.audio-clip audio { grid-column: 1 / -1; width: 100%; }

.audio-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--dark-gradient);
  display: grid; place-items: center;
}

/* ---------- Clients ---------- */

.client-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 40px;
  max-width: 1050px;
}

.client-cols ul { list-style: none; margin: 0; padding: 0; font-weight: 500; line-height: 1.4; }

/* ---------- Testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 80px;
  max-width: 1080px;
  align-items: start;
}

.quote {
  position: relative;
  margin: 0 0 40px;
  padding: 0 0 0 86px;
  font-style: italic;
  font-weight: 300;
  color: #333;
}

.quote::before,
.quote::after {
  font: 700 120px/1 Georgia, "Times New Roman", serif;
  color: var(--quote-cool);
}

.quote::before { content: "\201C"; position: absolute; left: 0; top: -14px; }
.quote::after { content: "\201D"; display: block; height: 0.45em; text-align: right; margin-top: -0.2em; }

.quote.warm::before, .quote.warm::after { color: var(--quote-warm); }

.quote p { margin: 0 0 0.8em; }

.quote cite {
  display: block;
  font-weight: 700;
  font-style: italic;
  color: var(--title);
  max-width: 75%;
}

.quote.warm cite { color: #4b4535; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.6fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: start;
  max-width: 1080px;
}

.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 0; }
.contact-list dt { font-weight: 700; }
.contact-list dd { margin: 0; }
.contact-list a { color: #0b6cc0; }

/* ---------- Awards ---------- */

.award-text {
  border-left: 14px solid #1a1a1a;
  border-radius: 7px 0 0 7px;
  padding: 0 0 0 14px;
  max-width: 420px;
}

.award-text p { margin: 0 0 1em; }

.award-fig { margin: 40px 0 0 28px; max-width: 240px; }
.award-fig figcaption { margin-top: 18px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark-gradient);
  color: #fff;
  padding: 28px var(--gutter);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .content { padding-right: 32px; }
  .columns { grid-template-columns: 1fr; }
  .mag-grid, .books-intro { grid-template-columns: 1fr; }
  .tilted, .books-intro .tilted { margin-top: 0; max-width: 360px; }
  .naval-one-grid { grid-template-columns: 1fr 1fr; }
  .naval-one-grid .caption { grid-column: 1 / -1; }
  .quotes { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .main { margin-right: 0; }

  /* Fixed bar with a menu button replaces the sidebar. */
  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    padding: 12px 16px;
    background: var(--dark-gradient);
    color: #fff;
  }

  .mobile-bar .brand { text-decoration: none; min-width: 0; }
  .mobile-bar .brand-name { font-size: 19px; letter-spacing: 0.14em; text-shadow: none; }
  .mobile-bar .brand-tag { font-size: 8.5px; letter-spacing: 0.14em; margin-top: 5px; }

  .menu-toggle {
    display: inline-flex;
    flex: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font: 600 12px/1 var(--display);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 10px 12px;
    cursor: pointer;
  }

  .main { padding-top: var(--bar-h, 64px); }

  .sidenav {
    display: none;
    top: var(--bar-h, 64px);
    left: 0;
    width: auto;
    bottom: auto;
    max-height: calc(100vh - var(--bar-h, 64px));
    background: #1d2322;
    padding-bottom: 16px;
  }

  .nav-open .sidenav { display: block; }

  .nav-title { display: none; }
  .sidenav a, .sidenav .group-label { color: #fff; }
  .sidenav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
  .sidenav a[aria-current] { background: #fff; color: #222; }
  .nav-primary { background: none; }
  .dotted-b { --dots: rgba(255, 255, 255, 0.4); }

  /* The fixed bar already carries the name, so the cover is just the photo. */
  .masthead { display: none; }
  .hero { aspect-ratio: 4 / 3; }

  .section { display: block; padding: 56px 0 50px; scroll-margin-top: var(--bar-h, 64px); }
  .section-head { padding: 0 16px; }
  .rule { -webkit-mask: none; mask: none; }
  .content { padding: 26px 16px 0; }

  .overview .portrait { width: 140px; margin: 26px 0 0 16px; }

  .spreads { grid-template-columns: 1fr; }
  .book-shelf { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 14px; }
  .naval-one-grid { grid-template-columns: 1fr; }
  .client-cols { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .quote { padding-left: 58px; }
  .quote::before, .quote::after { font-size: 84px; }

  .photo-section { min-height: 85vh; }
  .site-footer { padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
