/* andrewgkelly.net
   Palette taken from the landscapes: fog, basalt, tide water, lichen, stone. */
:root {
  --fog: #eef0ec;
  --basalt: #1b2023;
  --tide: #3f5c68;
  --tide-deep: #2c4450;
  --lichen: #7f8f7a;
  --stone: #c9ccc4;
  --ink-soft: #4a5257;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--fog); color: var(--basalt); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--tide); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--basalt); }
:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.5rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 1rem; left: 1rem; z-index: 99; background: var(--basalt); color: var(--fog); padding: .5rem 1rem; }
.quiet { color: var(--ink-soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.35rem; border-radius: 3px; font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.btn-light { background: var(--fog); color: var(--basalt); }
.btn-light:hover { background: #fff; color: var(--basalt); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(0,0,0,.08); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-outline { background: transparent; color: var(--basalt); border-color: var(--stone); }
.btn-outline:hover { border-color: var(--basalt); color: var(--basalt); }
.btn-linkedin { background: #0a66c2; color: #fff; }
.btn-linkedin:hover { background: #084f96; color: #fff; }
.btn-linkedin svg { width: 17px; height: 17px; fill: currentColor; }
.btn-block { width: 100%; justify-content: center; margin-top: 1.5rem; background: var(--basalt); color: var(--fog); }
.btn-block:hover { background: var(--tide-deep); color: #fff; }

/* Header: sits over the photo, turns solid on scroll */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; color: #fff; transition: background .3s, color .3s, box-shadow .3s; }
.site-header::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(rgba(10,14,16,.45), transparent); pointer-events: none; transition: opacity .3s; }
.site-header.is-solid { background: var(--fog); color: var(--basalt); box-shadow: 0 1px 0 var(--stone); }
.site-header.is-solid::before { opacity: 0; }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem var(--gutter); }
.brand { display: flex; align-items: center; gap: .85rem; color: inherit; text-decoration: none; }
.brand .ak-logo { width: 46px; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; }
.site-nav { display: flex; gap: 2rem; }
.site-nav a { color: inherit; text-decoration: none; font-size: .95rem; font-weight: 500; opacity: .88; padding: .25rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { opacity: 1; color: inherit; }
.site-nav a[aria-current] { opacity: 1; border-bottom-color: currentColor; }
.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; color: inherit; }
.nav-toggle span:not(.sr) { display: block; width: 24px; height: 2px; background: currentColor; margin: 6px 0; }

/* Hero */
.hero, .banner, .closing, .path { background: linear-gradient(160deg, var(--tide) 0%, var(--tide-deep) 45%, var(--basalt) 100%); }
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-img, .banner-img, .closing-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .banner::after, .closing::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,16,18,.62), rgba(12,16,18,.1) 55%, rgba(12,16,18,.15)); }
.hero-copy { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(3rem, 9vh, 6.5rem); max-width: 60rem; }
.hero h1 { font-size: clamp(3.4rem, 10vw, 8.5rem); font-weight: 300; line-height: .95; margin-bottom: .25em; }
.hero-sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.85rem); margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Banner (inner pages) */
.banner { position: relative; min-height: 68svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.banner-short { min-height: 46svh; }
.banner-post { min-height: 72svh; }
.banner-copy { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(2.5rem, 7vh, 4.5rem); max-width: 56rem; }
.banner h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 300; margin-bottom: .2em; }
.banner-lede { font-size: 1.15rem; max-width: 36rem; margin: 0; opacity: .95; }
.banner a { color: #fff; }
.kicker { font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin: 0 0 .6rem; }
.kicker a { color: inherit; text-decoration: none; }

/* Intro */
.intro { display: grid; grid-template-columns: minmax(0, var(--measure)); gap: clamp(2rem, 6vw, 6rem); padding: clamp(4rem, 10vw, 8rem) var(--gutter); justify-content: center; align-items: center; }
.intro:has(.intro-portrait) { grid-template-columns: minmax(220px, 360px) minmax(0, var(--measure)); }
.intro-portrait { margin: 0; }
.intro-portrait img { width: 100%; height: auto; aspect-ratio: 3/4; object-fit: cover; object-position: center 30%; }
.intro-text p { font-size: 1.12rem; }

/* Three paths: full-bleed image tiles */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--basalt); }
.path { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; color: #fff; text-decoration: none; }
.path img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.path::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,16,18,.6), transparent 60%); }
.path:hover img { transform: scale(1.04); }
.path:hover { color: #fff; }
.path-copy { position: absolute; z-index: 1; left: clamp(1.25rem, 3vw, 2.5rem); bottom: clamp(1.25rem, 3vw, 2.25rem); display: grid; gap: .25rem; }
.path-title { font-family: var(--serif); font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: 1; }
.path-desc { font-size: .98rem; opacity: .92; }

/* Latest entries */
.latest, .list-page { padding: clamp(4rem, 8vw, 6.5rem) var(--gutter); max-width: 1320px; margin: 0 auto; }
.list-page { padding-top: 3rem; }
.latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--stone); padding-bottom: 1rem; }
.latest-head h2 { margin: 0; }
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 3rem 2.25rem; }
.entry-link { display: block; color: var(--basalt); text-decoration: none; }
.entry-img { overflow: hidden; margin-bottom: 1.1rem; }
.entry-img img { aspect-ratio: 3/2; width: 100%; object-fit: cover; transition: transform 1s ease; }
.entry-link:hover .entry-img img { transform: scale(1.03); }
.entry-link:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.entry-meta { font-size: .88rem; color: var(--ink-soft); margin: 0 0 .4rem; }
.entry h3 { font-size: 1.6rem; margin-bottom: .4rem; }
.entry-summary { margin: 0; color: var(--ink-soft); }
.empty-note { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--ink-soft); text-align: center; padding: 2rem var(--gutter); margin: 0; }
.list-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 3rem; }

/* Photo strip */
.strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; background: var(--basalt); }
.strip img { aspect-ratio: 1; width: 100%; object-fit: cover; transition: opacity .3s; }
.strip a:hover img { opacity: .8; }

/* Closing band */
.closing { position: relative; min-height: 70svh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.closing-copy { position: relative; z-index: 1; padding: 0 var(--gutter); max-width: 44rem; }
.closing h2 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 300; margin-bottom: .15em; }
.closing p { font-size: 1.2rem; margin: 0 0 2rem; }

/* Posts */
.post-plainhead { padding: 9rem var(--gutter) 1rem; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; }
.post-plainhead h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 3.5rem var(--gutter) 0; font-family: var(--serif); font-size: 1.28rem; line-height: 1.7; }
.prose p, .prose li { color: #262c30; }
.post-summary { font-size: 1.5rem; line-height: 1.45; color: var(--basalt) !important; font-style: italic; }
.prose h2 { font-size: 2rem; margin-top: 2.5rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 2.5rem 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--lichen); font-size: 1.65rem; font-style: italic; line-height: 1.35; }
.prose img { margin: 2.5rem 0; }
.linkedin-embed, .post-foot { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.linkedin-embed { margin-top: 3rem; }
.linkedin-embed h2 { font-size: 1.5rem; }
.linkedin-embed iframe { background: #fff; border: 1px solid var(--stone); }
.post-foot { padding-top: 3rem; padding-bottom: 6rem; }
.share { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: 2rem; border-top: 1px solid var(--stone); margin-bottom: 2.5rem; }
.cta { background: var(--basalt); color: var(--fog); padding: 2rem 2.25rem; margin-bottom: 2.5rem; }
.cta-title { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 .3rem; }
.cta p { margin: 0 0 .5rem; color: #cfd4cf; }
.cta-phones { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1rem !important; }
.cta-phones a { color: #fff; font-weight: 600; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 5rem); padding: clamp(3.5rem, 7vw, 6rem) var(--gutter); max-width: 1180px; margin: 0 auto; align-items: start; }
.contact-line { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--stone); color: var(--basalt); text-decoration: none; font-size: 1.15rem; }
.contact-line span { color: var(--ink-soft); font-size: .9rem; }
.contact-line:hover { color: var(--tide); }
.contact-form { display: grid; gap: 1.1rem; }
.contact-form label { display: grid; gap: .4rem; font-size: .92rem; font-weight: 500; }
.contact-form input, .contact-form textarea, .contact-form select { background: #fff; border: 1px solid var(--stone); color: var(--basalt); border-radius: 3px; padding: .8rem .9rem; font: inherit; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: 2px solid var(--tide); outline-offset: 0; border-color: transparent; }
.contact-form .btn { justify-self: start; background: var(--basalt); color: var(--fog); }
.contact-form .btn:hover { background: var(--tide-deep); }
.hp { display: none; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; padding: 2.5rem var(--gutter) 0; max-width: 1500px; margin: 0 auto; }
.filters-sub { padding-top: .75rem; }
.filters-sub[hidden] { display: none; }
.filters-sub .chip { font-size: .82rem; padding: .35rem .9rem; }
.chip { background: transparent; border: 1px solid var(--stone); color: var(--ink-soft); padding: .45rem 1.05rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; }
.chip:hover { border-color: var(--basalt); color: var(--basalt); }
.chip.is-active { background: var(--basalt); border-color: var(--basalt); color: var(--fog); }
.gallery-wrap { padding: 2rem var(--gutter) 6rem; max-width: 1500px; margin: 0 auto; }
.gallery { columns: 3 340px; column-gap: 1.25rem; }
.g-item { break-inside: avoid; margin: 0 0 1.5rem; }
.g-item[hidden] { display: none; }
.g-open { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; overflow: hidden; }
.g-open img { width: 100%; transition: transform .8s ease; }
.g-open:hover img { transform: scale(1.025); }
.g-item figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-top: .6rem; font-size: .9rem; }
.g-title { font-family: var(--serif); font-size: 1.1rem; }
.g-meta { color: var(--ink-soft); text-align: right; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(14, 18, 20, .96); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: 92vw; }
.lightbox img { max-height: 82vh; max-width: 92vw; margin: auto; }
.lightbox figcaption { color: var(--fog); text-align: center; padding-top: 1rem; display: grid; gap: .2rem; }
.lb-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; }
.lb-caption { color: #b5bbb5; font-size: .92rem; }
.lb-close, .lb-prev, .lb-next { position: fixed; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev { left: 1.25rem; top: calc(50% - 24px); }
.lb-next { right: 1.25rem; top: calc(50% - 24px); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.12); }

/* Footer */
.site-footer { background: var(--basalt); color: var(--fog); padding: 4.5rem var(--gutter) 2rem; }
.site-footer a { color: var(--fog); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr .6fr; gap: 2.5rem; max-width: 1320px; margin: 0 auto; }
.footer-brand { display: flex; gap: 1.5rem; align-items: center; }
.footer-brand .ak-logo { width: 84px; flex: none; }
.footer-name { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 .25rem; }
.site-footer .quiet { color: #a9b0aa; margin: 0; }
.footer-phones { margin: 0; display: grid; gap: .6rem; }
.footer-phones div { display: flex; gap: 1rem; }
.footer-phones dt { width: 4rem; color: #a9b0aa; }
.footer-phones dd { margin: 0; }
.footer-links { display: grid; gap: .6rem; align-content: start; }
.footer-legal { max-width: 1320px; margin: 3.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid #343b3f; font-size: .85rem; color: #a9b0aa; }

/* Responsive */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--fog); color: var(--basalt); padding: .5rem var(--gutter) 1.25rem; display: none; box-shadow: 0 1px 0 var(--stone); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem 0; border-bottom: 1px solid var(--stone); font-size: 1.05rem; opacity: 1; }
  .site-nav a[aria-current] { border-bottom-color: var(--stone); color: var(--tide); }
  .intro, .contact-layout, .footer-inner { grid-template-columns: 1fr; }
  .intro-portrait { max-width: 300px; }
  .strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .paths { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.1rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .prose { font-size: 1.15rem; }
}
