/* williamhansch.com -- the one stylesheet. Edit this file directly; nothing is minified.
   Colours come from the photograph on the first screen: the slate of the Elbe under cloud,
   and the verdigris of Dresden's copper roofs as the single accent. */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Lora';
    src: url('../fonts/lora.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink: #17212b;
    --slate: #47535f;
    --mute: #66727f;
    --paper: #ffffff;
    --mist: #f3f5f6;
    --rule: #dce1e5;
    --verdigris: #1d6964;
    --verdigris-deep: #144b47;
    
    /* the names the pages and their own styles already use */
    --primary: var(--verdigris);
    --primary-dark: var(--verdigris-deep);
    --accent: var(--verdigris);
    --text: var(--ink);
    --text-light: var(--slate);
    --text-lighter: var(--mute);
    --text-primary: var(--ink);
    --text-secondary: var(--slate);
    --bg: var(--paper);
    --bg-light: var(--mist);
    --bg-lighter: #e9edf0;
    --bg-secondary: var(--mist);
    --border: var(--rule);
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Lora', Georgia, 'Times New Roman', serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.75rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4.5rem;
    --radius: 0.5rem;
    --radius-sm: 0.375rem;
    --shadow-sm: 0 1px 2px 0 rgba(23, 33, 43, 0.06);
    --shadow-md: 0 3px 10px -2px rgba(23, 33, 43, 0.14);
    --shadow-lg: 0 10px 24px -6px rgba(23, 33, 43, 0.18);
    --shadow-xl: 0 18px 36px -10px rgba(23, 33, 43, 0.22);
}

body {
    font-family: var(--font-base);
    color: var(--text);
    line-height: 1.7;
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: var(--spacing-sm);
}

h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

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

:focus-visible {
    outline: 2px solid var(--verdigris);
    outline-offset: 3px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

strong {
    font-weight: 600;
    color: var(--text);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    font-size: 2.5rem;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* Navigation */
.nav {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.3125rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.logo:hover {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--ink);
    background: var(--bg-light);
}

.nav-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -0.5rem;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0.6875rem;
    width: 1.375rem;
    height: 2px;
    border-radius: 1px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero Section */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: min(80vh, 780px);
    padding: 0;
    overflow: hidden;
    background: #1b2631;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(13, 20, 27, 0.86) 0%, rgba(13, 20, 27, 0.55) 30%, rgba(13, 20, 27, 0) 62%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    width: 100%;
    padding-top: 7rem;
    padding-bottom: 3.5rem;
}

.hero-title {
    font-size: clamp(2.75rem, 7.2vw, 5.5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.9rem;
}

.hero-subtitle {
    font-size: clamp(1.0625rem, 2vw, 1.375rem);
    color: rgba(255, 255, 255, 0.94);
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.84);
    max-width: 34rem;
    margin: 0 0 1.9rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 64%;
}

.hero-credit {
    position: absolute;
    right: var(--spacing-md);
    bottom: 1.1rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.78);
}

.hero-credit:hover {
    color: #fff;
}

.hero .btn-primary {
    background: #fff;
    color: var(--ink);
    box-shadow: none;
}

.hero .btn-primary:hover {
    background: var(--mist);
    color: var(--ink);
}

.hero .btn-secondary {
    background: rgba(13, 20, 27, 0.25);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: none;
}

.hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #fff;
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8125rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.btn-primary {
    background: var(--ink);
    color: white;
}

.btn-primary:hover {
    background: var(--verdigris-deep);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* About Section */
.about-content {
    max-width: 100%;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text p {
    font-size: 1.0625rem;
}

/* Work Section */
.work-intro {
    max-width: 100%;
    margin: 0 auto var(--spacing-lg);
}

.work-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.work-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-top: 3px solid var(--verdigris);
}

.work-card h3 {
    color: var(--text);
    margin-bottom: var(--spacing-xs);
}

.work-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* Blog Preview */
.blog-preview {
    max-width: 100%;
    margin: var(--spacing-xl) auto 0;
}

.blog-preview h3 {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 2rem;
}

.blog-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.blog-card h4 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.blog-card p {
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.blog-meta {
    color: var(--text-lighter);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Photography Section */
.photography-intro {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
}

.photo-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.photo-category-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.photo-category-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--slate);
}

.photo-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}

.photo-category-card h3 {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-xs);
    color: var(--text);
    font-size: 1.375rem;
    margin: 0;
}

.photo-category-card p {
    padding: 0 var(--spacing-md);
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
}

.photo-category-card .link {
    display: inline-block;
    padding: 0 var(--spacing-md) var(--spacing-md);
    color: var(--primary);
    font-weight: 500;
}

.link {
    color: var(--primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s ease;
}

.link:hover {
    gap: 0.5rem;
    color: var(--primary-dark);
}

/* Contact Section */
.contact-links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    min-width: 140px;
}


.contact-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Footer */
.footer {
    background: var(--mist);
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-lighter);
    margin: 0;
    font-size: 0.9375rem;
}

.footer a {
    color: var(--text-light);
    font-weight: 500;
}

.footer a:hover {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-placeholder {
        height: 300px;
    }
    
    .work-highlights,
    .photo-categories {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ===========================
   WHpictures Logo Styling
   =========================== */
.section-logo {
    height: 60px;
    width: auto;
    margin-right: var(--spacing-sm);
    vertical-align: middle;
    display: inline-block;
}

.inline-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
    display: inline-block;
    margin: 0 4px;
}

.btn-logo {
    height: 20px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
    filter: brightness(0) invert(1);
}

.btn-secondary .btn-logo {
    filter: none;
}

@media (max-width: 768px) {
    .section-logo {
        height: 40px;
    }
    
    .inline-logo {
        height: 20px;
    }
}

/* ===========================
   Gallery Grid
   =========================== */
.gallery-count {
    text-align: center;
    color: var(--text-lighter);
    font-size: 1rem;
    margin-top: var(--spacing-sm);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 4/3;
    background: var(--bg-lighter);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    padding: var(--spacing-md);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h4 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.gallery-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* ===========================
   Article Page
   =========================== */
.article-header {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    background: var(--mist);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--ink);
    max-width: 1030px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    color: var(--text-lighter);
    font-size: 1rem;
    font-weight: 500;
}

.article-container {
    max-width: 1030px;
    margin: 0 auto;
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-content h1 {
    font-size: 2rem;
    margin: var(--spacing-lg) 0 var(--spacing-md);
    color: var(--text);
}

.article-content h2 {
    font-size: 1.75rem;
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--text);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--text);
}

.article-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
}

.article-content ul,
.article-content ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.article-content li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

.article-content img,
.article-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: var(--spacing-lg) 0;
    box-shadow: var(--shadow-md);
}

.article-content figure {
    margin: var(--spacing-lg) 0;
}

.article-content .wp-block-image {
    margin: var(--spacing-lg) 0;
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card-link:hover {
    box-shadow: var(--shadow-lg);
}

.blog-card-link h4 {
    color: var(--text);
}

.blog-card-link:hover h4 {
    color: var(--primary);
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 {
        font-size: 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.375rem;
    }
}

/* ===========================
   Blog Grid for Multiple Articles
   =========================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.blog-grid .blog-card {
    height: 100%;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Clickable Gallery Items
   =========================== */
a.gallery-item {
    text-decoration: none;
    color: inherit;
}

a.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.read-more {
    display: inline-block;
    color: white;
    font-weight: 600;
    margin-top: var(--spacing-xs);
    font-size: 0.9375rem;
}

/* ===========================
   About Section Image Update
   =========================== */
.about-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

@media (max-width: 768px) {
    .about-image img {
        max-width: 100%;
    }
}

/* ===========================
   Thoughts Page & Quote Previews
   =========================== */

/* Page Header for Thoughts Page */
.page-header {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    background: var(--mist);
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-header .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 100%;
    margin: 0 auto;
}

/* Latest Thoughts on Homepage - Quote Style */
.latest-thoughts {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.latest-thoughts h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.thought-preview {
    margin-bottom: 2rem;
}

.thought-preview-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.thought-preview-link:hover .quote-footer cite {
    text-decoration: underline;
}

.thought-quote-preview {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    padding: 2rem;
    margin: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.thought-preview-link:hover .thought-quote-preview {
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent);
}

.quote-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.quote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.quote-footer cite {
    font-style: normal;
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.quote-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Thoughts List Page */
.thoughts-list {
    max-width: 100%;
    margin: 0 auto;
}

.thought-item {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.thought-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.thought-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.thought-date,
.thought-category {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 20px;
}

.thought-category {
    background: var(--primary);
    color: white;
}

.thought-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.thought-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.thought-title a:hover {
    color: var(--primary);
}

.thought-excerpt {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.thought-excerpt p {
    margin-bottom: 1rem;
}

.thought-quote {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-primary);
}

.thought-read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.thought-read-more:hover {
    color: var(--accent);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .quote-text {
        font-size: 1.1rem;
    }
    
    .thought-item {
        padding: 1.5rem;
    }
    
    .thought-title {
        font-size: 1.5rem;
    }
}

/* ===========================
   MOBILE OPTIMIZATION
   Reduces scrolling by ~40%
   Single codebase, zero maintenance overhead
   =========================== */

@media (max-width: 768px) {
    /* Override spacing variables for mobile */
    :root {
        --spacing-xs: 0.375rem;   /* was 0.5rem */
        --spacing-sm: 0.75rem;    /* was 1rem */
        --spacing-md: 1.25rem;    /* was 2rem - 38% reduction */
        --spacing-lg: 2rem;       /* was 4rem - 50% reduction */
        --spacing-xl: 3rem;       /* was 6rem - 50% reduction */
    }
    
    /* Global section spacing */
    .section {
        padding: 3rem 0;  /* Uses new --spacing-xl value */
    }
    
    .section-title {
        font-size: 1.875rem;  /* was 2.5rem */
        margin-bottom: 1.5rem;  /* was 4rem */
    }
    
    .container {
        padding: 0 1.25rem;  /* Slightly tighter horizontal padding */
    }
    
    /* Navigation - more compact */
    .nav {
        padding: 0.75rem 0;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-menu a {
        font-size: 0.875rem;
    }
    
    .hero {
        min-height: min(74vh, 640px);
    }

    .hero .container {
        padding-bottom: 3.25rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-cta {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;  /* Slightly smaller buttons */
        font-size: 0.9375rem;
    }
    
    /* About Section - more compact */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .about-image {
        order: -1;  /* Image first on mobile */
    }
    
    .about-image img {
        max-width: 280px;  /* Smaller image on mobile */
        margin: 0 auto;
        display: block;
    }
    
    .about-text p {
        font-size: 0.9375rem;
    }
    
    /* Work Section - 40% more compact */
    .work-intro {
        margin-bottom: 2rem;  /* was 4rem */
    }
    
    .work-highlights {
        gap: 1.25rem;  /* was 2rem */
        margin-bottom: 2rem;
    }
    
    
    .work-card {
        padding: 1.25rem;  /* was 2rem */
    }
    
    .work-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .work-card p {
        font-size: 0.875rem;  /* was 0.9375rem */
        line-height: 1.6;
    }
    
    /* Latest Thoughts - more compact quotes */
    .latest-thoughts {
        margin-top: 2rem;  /* was 3rem */
        padding-top: 2rem;  /* was 3rem */
    }
    
    .latest-thoughts h3 {
        font-size: 1.75rem;  /* was 2rem */
        margin-bottom: 1.5rem;  /* was 2rem */
    }
    
    .thought-preview {
        margin-bottom: 1rem;  /* was 2rem */
    }
    
    .thought-quote-preview {
        padding: 1.25rem;  /* was 2rem */
    }
    
    .quote-text {
        font-size: 1rem;  /* was 1.25rem */
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }
    
    .quote-footer {
        padding-top: 0.75rem;
        font-size: 0.875rem;
        gap: 0.75rem;
    }
    
    .quote-footer cite {
        font-size: 0.9375rem;
    }
    
    .quote-date {
        font-size: 0.8125rem;
    }
    
    /* Photography Section - more compact tiles */
    .photography-intro {
        margin-bottom: 2rem;  /* was 3rem */
    }
    
    .projects-grid {
        gap: 1.25rem;  /* was 2rem */
    }
    
    .project-card {
        padding: 1rem;  /* was default */
    }
    
    .project-image-placeholder,
    .project-image-placeholder img {
        height: 200px;  /* Shorter tiles */
    }
    
    .project-card h3 {
        font-size: 1.125rem;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .project-card p {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    /* Contact Section */
    .contact-links {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .contact-link {
        font-size: 0.9375rem;
        padding: 0.75rem 1.5rem;
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0;  /* was 3rem */
        font-size: 0.875rem;
    }
    
    /* Blog/Article Cards */
    .blog-card {
        padding: 1.25rem;  /* was 1.5rem */
    }
    
    .blog-card h4 {
        font-size: 1.125rem;
    }
    
    .blog-card p {
        font-size: 0.875rem;
    }
    
    /* Gallery Pages */
    .gallery-grid {
        gap: 1rem;  /* was 1.5rem */
    }
    
    .gallery-item {
        height: auto;  /* full column width, 4:3 */
    }
    
    /* Article Pages */
    .article-header {
        padding: 2.75rem 0 1.75rem;
    }
    
    .article-title {
        font-size: 1.75rem;  /* was 2rem+ */
    }
    
    .article-content {
        font-size: 1rem;  /* was 1.0625rem */
    }
    
    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .article-image {
        margin: 1.5rem 0;  /* was 2rem */
    }
}

/* Additional mobile optimization for very small screens */
@media (max-width: 480px) {
    .section-title {
        font-size: 1.625rem;
    }
    
    .container {
        padding: 0 1rem;  /* Tighter padding on small screens */
    }
}

/* ===========================
   Combined Contact & Newsletter Section
   =========================== */
.contact-intro {
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    font-size: 1.05rem;
    line-height: 1.7;
}

.contact-newsletter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.newsletter-box,
.social-box {
    background: var(--bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.contact-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--spacing-sm);
}

.newsletter-description,
.social-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Compact Newsletter Form */
.newsletter-form-compact {
    text-align: left;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-md);
}

.form-group-compact label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
}

.form-group-compact input {
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-base);
    transition: all 0.2s ease;
    background: var(--bg);
}

.form-group-compact input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group-compact input::placeholder {
    color: var(--text-lighter);
}

.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.btn-newsletter-compact {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-newsletter-compact:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

#mce-responses {
    margin-top: var(--spacing-sm);
}

#mce-responses .response {
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

#mce-error-response {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

#mce-success-response {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Compact Social Links */
.contact-links-compact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.contact-link-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.contact-link-compact:hover {
    background: var(--bg-lighter);
    border-color: var(--primary);
    transform: translateX(4px);
}

.contact-link-compact .contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-link-compact .contact-label {
    font-weight: 500;
    font-size: 1rem;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .contact-newsletter-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .newsletter-box,
    .social-box {
        padding: var(--spacing-md);
    }
    
    .form-row-compact {
        grid-template-columns: 1fr;
    }
    
    .contact-intro {
        font-size: 1rem;
    }
}

/* ===========================
   Gallery pages: the head above the grid
   =========================== */
.category-hero {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    background: var(--mist);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.category-title {
    font-size: 2.75rem;
    margin-bottom: var(--spacing-xs);
}

.category-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin: 0;
}

.back-link {
    display: inline-block;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-light);
}

.back-link:hover {
    color: var(--ink);
}

/* ===========================
   Contact links: what it is, then whose
   =========================== */
.contact-link-compact .contact-kind {
    font-size: 0.8125rem;
    color: var(--text-lighter);
    min-width: 5.25rem;
}

/* ===========================
   Plain text pages (privacy, not found)
   =========================== */
.text-page {
    max-width: 44rem;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.75;
}

.text-page h2 {
    font-size: 1.5rem;
    margin: var(--spacing-lg) 0 var(--spacing-xs);
}

.text-page p,
.text-page li {
    color: var(--text-light);
}

.text-page ul {
    margin: 0 0 var(--spacing-sm);
    padding-left: 1.25rem;
}

.text-page li {
    margin-bottom: 0.4rem;
}

.text-page .updated {
    color: var(--text-lighter);
    font-size: 0.9375rem;
}

.not-found {
    text-align: center;
    padding: calc(var(--spacing-xl) * 1.4) 0;
    min-height: 62vh;
}

.not-found h1 {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.not-found p {
    max-width: 30rem;
    margin: 0 auto var(--spacing-md);
}

.not-found .hero-cta {
    justify-content: center;
}

/* ===========================
   Jumping to a section lands below the fixed navigation
   =========================== */
section[id],
[id="thoughts"] {
    scroll-margin-top: 4.5rem;
}

/* Pages that open with a title band: the content starts sooner. */
.article-header + .section,
.category-hero + .section,
.page-header + .section {
    padding-top: var(--spacing-lg);
}

.category-hero + .section .gallery-grid,
.article-content > :first-child,
.article-content > figure:first-child img {
    margin-top: 0;
}

/* ===========================
   Phone navigation
   =========================== */
@media (max-width: 640px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a {
        display: block;
        padding: 0.875rem 0.25rem;
        font-size: 1.0625rem;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }

    .nav-menu li:last-child a {
        border-bottom: 0;
    }

    .category-title {
        font-size: 2rem;
    }

    /* The first screen on a phone: the photograph on top, the name on ink below it. */
    .hero {
        display: block;
        min-height: 0;
        background: var(--ink);
    }

    .hero-photo {
        position: static;
        display: block;
        height: auto;
        aspect-ratio: 4 / 3;
        object-position: 50% 50%;
    }

    .hero::before {
        inset: 0 0 auto 0;
        z-index: 0;
        height: 75vw;
        background: linear-gradient(to top, var(--ink) 0%, rgba(23, 33, 43, 0.55) 16%, rgba(23, 33, 43, 0) 42%);
    }

    .hero .container {
        padding-top: 0.5rem;
        padding-bottom: 2.5rem;
    }

    .hero-description br {
        display: none;
    }

    .hero-credit {
        top: calc(75vw - 2.6rem);
        right: 1.25rem;
        bottom: auto;
        text-shadow: 0 1px 3px rgba(13, 20, 27, 0.6);
    }
}

/* Touch screens have no hover: show each photo's title on the gallery tiles. */
@media (hover: none) {
    .gallery-item-overlay {
        opacity: 1;
        padding-top: 2.5rem;
        background: linear-gradient(to top, rgba(13, 20, 27, 0.78) 0%, rgba(13, 20, 27, 0.3) 62%, rgba(13, 20, 27, 0) 100%);
    }

    .gallery-item-overlay .read-more {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
