/*
Theme Name: Keen & Pandini
Description: A writing portfolio for Fiona Keen and Andy Pandini.
Version: 1.0.0
Text Domain: keen-pandini
*/

@font-face {
    font-family: "Instrument Serif";
    src: url(assets/fonts/instrument-serif.woff2) format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url(assets/fonts/instrument-serif-italic.woff2) format("woff2");
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "DM Sans";
    src: url(assets/fonts/dm-sans.woff2) format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --paper: #fbf6eb;
    --panel: #fffaf1;
    --ink: #211916;
    --muted: #5f4b42;
    --plum: #451c28;
    --plum-dark: #361722;
    --accent: #7a2e40;
    --gold: #f2cb8f;
    --line: #ddcdbc;
    --display: "Instrument Serif", Georgia, serif;
    --body: "DM Sans", Arial, sans-serif;
    color-scheme: light;
}

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1rem/1.6 var(--body);
}

img { max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
button, input, textarea, select { font: inherit; }
p, h1, h2, h3 { margin-top: 0; }

.shell { width: min(100% - 7rem, 1240px); margin-inline: auto; }

.skip-link {
    position: fixed;
    z-index: 10;
    top: .75rem;
    left: .75rem;
    padding: .6rem .85rem;
    background: var(--paper);
    color: var(--plum);
    transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header {
    background: var(--paper);
    border-bottom: 1px solid rgba(69, 28, 40, .13);
}

.header-inner, .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.header-inner { min-height: 79px; }

.wordmark {
    color: var(--plum);
    font: 400 2.15rem/.95 var(--display);
    letter-spacing: -.035em;
    white-space: nowrap;
    text-decoration: none;
}

.wordmark i { color: var(--accent); }

.site-nav, .footer-inner nav {
    display: flex;
    align-items: center;
    gap: clamp(.9rem, 2.8vw, 2.45rem);
}

.site-nav a, .footer-inner nav a {
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover, .footer-inner nav a:hover, .site-nav a[aria-current] {
    text-decoration: underline;
}

.site-nav .nav-contact {
    color: var(--plum);
    border: 1px solid #9e7581;
    border-radius: 999px;
    padding: .5rem .95rem;
}

.site-nav .nav-contact:hover {
    color: var(--paper);
    background: var(--plum);
    text-decoration: none;
}

.hero {
    overflow: hidden;
    background:
        radial-gradient(ellipse at 86% 35%, rgba(116, 52, 66, .64), transparent 54%),
        linear-gradient(130deg, var(--plum-dark) 12%, var(--plum) 78%);
    color: var(--paper);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.23fr) minmax(0, .9fr);
    align-items: center;
    gap: clamp(2.5rem, 5.7vw, 6rem);
    padding-block: clamp(3.2rem, 4.6vw, 4.9rem);
}

.hero-inner-text { grid-template-columns: minmax(0, 42rem); }
.hero-copy { min-width: 0; }

.eyebrow {
    letter-spacing: .13em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: .72rem;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--gold);
    margin-bottom: 1.38rem;
}

.hero-eyebrow::before {
    content: "";
    display: inline-block;
    width: 1.7rem;
    height: 1px;
    background: currentColor;
}

.hero h1 {
    margin-bottom: 1.45rem;
    font: 400 clamp(3.95rem, 6.8vw, 6.3rem)/.89 var(--display);
    letter-spacing: -.026em;
}

.hero h1 em { color: var(--gold); font-weight: 400; }

.hero-story {
    max-width: 34rem;
    color: #faebdf;
    font-size: 1rem;
    line-height: 1.58;
}

.hero-story p { margin: 0 0 .72rem; }

.button {
    display: inline-flex;
    align-items: center;
    gap: .9rem;
    width: fit-content;
    border-radius: 999px;
    background: var(--plum);
    color: var(--paper);
    padding: .68rem 1.15rem;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.button:hover { color: white; background: var(--accent); }
.hero-button { margin-top: .75rem; color: var(--plum-dark); background: var(--gold); }
.hero-button:hover { color: var(--plum-dark); background: #ffe0ac; }

.hero-portrait { max-width: 460px; margin-inline: auto; }
.photo-mat {
    padding: .8rem;
    background: #f7eee0;
    box-shadow: 0 18px 45px rgba(24, 8, 14, .42), 8px 8px 0 rgba(255, 211, 170, .14);
    transform: rotate(2deg);
}

.photo-mat img {
    display: block;
    width: 100%;
    height: auto;
    background: #281f20;
    filter: contrast(1.04) sepia(.10);
}

.hero-portrait figcaption {
    color: #f5d8c2;
    margin: 1rem -.25rem 0;
    font: italic 1.45rem/1.2 var(--display);
    text-align: center;
}

.work-section { padding-block: clamp(3.35rem, 5.3vw, 6.1rem); scroll-margin-top: 1.5rem; }
.section-heading { margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.section-heading h2 {
    margin-bottom: .6rem;
    color: var(--plum);
    font: 400 clamp(3.4rem, 6vw, 5.6rem)/.95 var(--display);
    letter-spacing: -.03em;
}

.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.work-card {
    padding: clamp(1.3rem, 2.8vw, 2.15rem);
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
}

.work-card h3 {
    margin: 0 0 .75rem;
    color: var(--plum);
    font: 400 clamp(2.5rem, 4vw, 3.6rem)/1 var(--display);
    letter-spacing: -.022em;
}

.work-card h3 a, .work-card li a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-decoration: none;
}

.work-card h3 a:hover, .work-card li a:hover { text-decoration: underline; }
.work-card h3 span, .work-card li span, .archive-piece h2 span {
    color: var(--accent);
    font: 400 1.05rem/1 var(--body);
}

.work-card ul { list-style: none; margin: 0; padding: 0; }
.work-card li { border-top: 1px solid #e9ddce; }
.work-card li a { padding-block: .55rem; font-weight: 600; }

.page-masthead {
    padding-block: clamp(2.3rem, 6vw, 5rem);
    color: var(--plum);
    background: #f2e6d5;
    border-bottom: 1px solid var(--line);
}

.page-masthead h1 {
    margin: 0;
    max-width: 60rem;
    font: 400 clamp(3.55rem, 8vw, 7.5rem)/.92 var(--display);
    letter-spacing: -.025em;
    overflow-wrap: break-word;
}

.post-masthead h1 { font-size: clamp(3.35rem, 7.5vw, 6.6rem); }
.back-link {
    display: inline-flex;
    gap: .5rem;
    margin-bottom: 1.15rem;
    font-size: .88rem;
    font-weight: 700;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    margin-bottom: .7rem;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.prose {
    font-size: clamp(1.02rem, 1.55vw, 1.17rem);
    line-height: 1.74;
    overflow-wrap: break-word;
}

.prose h2, .prose h3 {
    margin: 1.6em 0 .5em;
    color: var(--plum);
    font: 400 clamp(2.3rem, 5vw, 3.4rem)/1 var(--display);
}

.prose p { margin: 0 0 1.15em; }
.prose a { color: #74293d; }
.prose blockquote {
    margin: 2em 0;
    padding: 1.25rem 1.65rem;
    background: #f0e4d5;
    border-left: 3px solid var(--accent);
}

.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 1.7rem; }
.prose iframe, .prose video, .prose audio { max-width: 100%; }
.prose img { vertical-align: middle; }
.prose table, .prose pre { display: block; max-width: 100%; overflow-x: auto; }
.prose pre { padding: 1.25rem; background: #f0e4d5; white-space: pre-wrap; }
.prose td, .prose th { padding: .55rem .75rem; vertical-align: top; }
.prose .alignleft { float: left; margin: 0 1.3rem 1rem 0; }
.prose .alignright { float: right; margin: 0 0 1rem 1.3rem; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .wp-caption { max-width: 100%; }
.reading .jp-relatedposts-post-date { display: none; }
.reading .sharedaddy { margin-top: 2.1rem; }

.page-content, .reading, .reading-footer, .comments-section {
    max-width: 790px;
    padding-block: clamp(2.2rem, 5vw, 4.4rem);
}

.reading, .page-content { display: flow-root; }
.reading-footer { padding-top: 0; }
.reading-footer .button { color: var(--paper); }
.archive-content { max-width: 1000px; padding-block: clamp(2.2rem, 5vw, 4.7rem); }
.archive-piece { margin-bottom: 1.8rem; padding-bottom: 1.65rem; border-bottom: 1px solid var(--line); }
.archive-piece h2 { margin-bottom: .45rem; color: var(--plum); font: 400 clamp(2.45rem, 5vw, 3.7rem)/1 var(--display); }
.archive-piece h2 a { text-decoration: none; }
.archive-piece h2 a:hover { text-decoration: underline; }
.archive-piece p { max-width: 65ch; margin-bottom: 0; color: var(--muted); }

.profiles { max-width: 1080px; padding-block: clamp(2.5rem, 6vw, 5rem); }
.profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
    align-items: start;
    gap: clamp(1.5rem, 5vw, 4.9rem);
}

.profile + .profile { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.profile-text-only { grid-template-columns: 1fr; }
.profile-photo { padding: .6rem; background: var(--panel); border: 1px solid var(--line); }
.profile-photo img { display: block; width: 100%; }
.profile-copy h2 { margin: 0 0 .7em; font-size: clamp(2.7rem, 5.5vw, 4.25rem); }
.profile-copy hr, .profile-copy .featuredTitleContainer { display: none; }

.contact-content { min-height: 45vh; }
.contact-content :is(input:not([type="submit"]), textarea, select) {
    max-width: 100%;
    border: 1px solid #a88b7a;
    background: var(--panel);
    padding: .58rem .7rem;
    color: var(--ink);
    border-radius: .25rem;
}

.contact-content :is(button[type="submit"], input[type="submit"]) {
    border: none;
    border-radius: 999px;
    padding: .65rem 1.25rem;
    color: var(--paper);
    background: var(--plum);
    cursor: pointer;
}

.contact-content :is(.grunion-field-wrap, .grunion-field-wrap label) {
    color: var(--ink);
}

.site-footer { border-top: 1px solid var(--line); background: #f1e6d7; }
.footer-inner { min-height: 105px; }

@media (min-width: 1150px) {
    .hero-title-line { white-space: nowrap; }
}

@media (max-width: 940px) {
    .shell { width: calc(100% - 4rem); }
    .hero-inner { gap: 2.6rem; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr); }
    .hero h1 { font-size: clamp(3.4rem, 7.7vw, 6rem); }
    .hero-inner-text { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .shell { width: calc(100% - 2.4rem); }
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .hero-copy { display: contents; }
    .hero-eyebrow { order: 0; margin: 0; }
    .hero h1 { order: 1; margin: 0; font-size: clamp(3.25rem, 10.7vw, 5.6rem); }
    .hero-portrait { order: 2; max-width: min(100% - .55rem, 410px); margin: .65rem auto .15rem; }
    .hero-portrait figcaption { font-size: 1.27rem; }
    .hero-story { order: 3; }
    .hero-button { order: 4; justify-self: start; margin-top: -.1rem; }
    .work-grid { grid-template-columns: 1fr; }
    .profile { grid-template-columns: minmax(0, 1fr); }
    .profile-photo { justify-self: start; max-width: min(100%, 270px); }
}

@media (max-width: 510px) {
    .header-inner, .footer-inner { flex-wrap: wrap; gap: .85rem; padding-block: 1rem; }
    .header-inner .wordmark { flex-basis: 100%; font-size: 1.95rem; }
    .site-nav { gap: 1.05rem; }
    .site-nav a, .footer-inner nav a { font-size: .84rem; }
    .site-nav .nav-contact { padding: .28rem .72rem; }
    .hero-inner { padding-block: 2.7rem 3rem; }
    .hero-story { font-size: .96rem; }
    .prose .alignleft, .prose .alignright { float: none; margin: 0 auto 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
    .button, .site-nav .nav-contact { transition: background-color .16s ease, color .16s ease; }
}
