/*
Minimal, fresh system font stack and neutral chrome that lets artwork pop.
No inline styles anywhere; reuse utility classes and semantic structure.
*/
:root {
    --bg: #f8f4f0;
    --ink: #0f0f14;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #0f0f14;
    --accent1: #ce30a6;
    --accent2: #55c1cf;
    --accent3: #eca88c;
    --accent4: #e99e80;
    /* keep UI neutral; artwork is the color */
    --maxw: 1200px;
    --gap: 1rem;
    /* gap between images */
    --radius: 14px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(0, 0, 0, .08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


.container {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 1rem;
}

.muted {
    color: var(--muted);
}

.brand-banner {
    display: block;
    width: 100%;
    max-width: 438px;
    height: auto;
    margin: 0;
}

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* =========================================
   TYPOGRAPHY SYSTEM
   ========================================= */

:root {
    --font-title: "Arima", sans-serif;
    --font-accent: "Fira Sans Extra Condensed", sans-serif;
    --font-body: "Work Sans", sans-serif;

    --font-size-base: 1rem;
    --font-size-lg: 1.15rem;
    --font-size-xl: 2rem;
    --font-size-xxl: 3rem;

    --line-height-base: 1.65;
}

/* Body text */
body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--ink);
}

/* Main page titles */
h1,
.page-title {
    font-family: var(--font-title);
    font-size: var(--font-size-xxl);
    font-weight: 700;
    margin: 0 0 1.2rem;
    letter-spacing: -0.3px;
}

/* Section / blog post titles */
h2,
.blog-card-title {
    font-family: var(--font-title);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0 0 0.6rem;
}

/* Subheadings inside posts */
h3,
h4 {
    font-family: var(--font-title);
    font-weight: 600;
    margin: 2rem 0 0.5rem;
}

/* Paragraphs */
p,
.blog-card-excerpt,
.post-content p {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    margin-bottom: 1.2rem;
}

/* Lede text under main titles */
.lede {
    font-size: var(--font-size-lg);
    color: var(--muted);
    max-width: 40rem;
    margin-bottom: 2rem;
}

/* Navigation links */
.site-nav a {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.3px;
    font-size: var(--font-size-lg);
}

/* Header */
.site-header {
    background: var(--bg);
    backdrop-filter: saturate(120%) blur(8px);
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand {
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
    letter-spacing: .2px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.site-nav a {
    color: var(--ink);
    text-decoration: none;
    padding: .375rem .5rem;
    border-radius: 8px;
}

.site-nav a:focus,
.site-nav a:hover {
    color: var(--accent1);
}


/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}


/* Homepage grid */
/* Masonry gallery using CSS columns (wide browser support) */

/* container */
.masonry {
  column-width: 340px;     /* browser decides how many columns fit */
  column-gap: var(--gap);  /* horizontal spacing between columns */
  margin-top: 1rem;
}

/* responsive column width targets */
@media (max-width: 1024px) { .masonry { column-width: 300px; } }
@media (max-width: 768px)  { .masonry { column-width: 260px; } }
@media (max-width: 480px)  { .masonry { column-width: 100%; } }

/* items */
.work-card {
  /* IMPORTANT for masonry: prevent items from splitting between columns */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;

  display: inline-block;   /* required so margins are honored in columns */
  width: 100%;
  margin: 0 0 var(--gap);  /* vertical spacing between items */

  border-radius: 0;        /* no rounded corners */
  overflow: hidden;        /* keeps any shadows tight to the image */
  background: transparent; /* no white box behind smaller images */
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.06), 0 16px 40px rgba(0,0,0,.12);
}

/* images keep native aspect ratio */
.work-card img {
  display: block;
  width: 100%;
  height: auto;        /* native aspect ratio */
  object-fit: unset;   /* no cropping */
}

/* Page headings */
.page-title {
    font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
    margin: 2rem 0 1rem;
    letter-spacing: .2px;
}

.lede {
    max-width: 60ch;
    color: var(--muted);
    margin-bottom: 2rem;
}


/* ============================
   About Page
   ============================ */

/* The bio section is a normal block container */
.bio {
    display: block;
    margin-bottom: 3rem;
}

/* Floated portrait for text wrapping */
.bio-portrait-float {
    float: left;
    width: 180px;
    margin: 0 1.5rem 1rem 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Paragraph spacing */
.bio p {
    margin: 0 0 1rem;
}

/* Optional: keep original portrait styling available */
.bio-portrait {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Accessibility utility */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile layout: remove float and center image */
@media (max-width: 800px) {
    .bio-portrait-float {
        float: none;
        display: block;
        margin: 0 auto 1.5rem auto;
        width: 60%;
        max-width: 250px;
    }
}

/* ============================
   Blog
   ============================*/

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

/* Individual post cards */
.blog-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03),
        0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.blog-card:hover,
.blog-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(15, 23, 42, 0.10);
}

/* Title + link */
.blog-card-title {
    font-size: 1.1rem;
    margin: 0 0 0.35rem;
    letter-spacing: 0.01em;
}

.blog-card-title a {
    color: var(--ink);
    text-decoration: none;
}

.blog-card-title a:hover,
.blog-card-title a:focus {
    text-decoration: underline;
}

/* Meta (date, etc.) */
.blog-card-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

/* Excerpt */
.blog-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink);
}

.blog-card-excerpt p {
    margin: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    align-items: center;
    margin: 0 0 3rem;
    font-size: 0.9rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--ink);
}

.pagination .page-numbers.current {
    background: var(--ink);
    color: #ffffff;
}

.pagination .page-numbers:not(.current):hover,
.pagination .page-numbers:not(.current):focus {
    border-color: var(--line);
    background: #f9fafb;
}

/* Single post */

.post-single {
    margin: 2.5rem auto 4rem;
    max-width: 60rem;
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

/* Body copy */
.post-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-content p {
    margin: 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* Images inside posts */
.post-content img,
.post-content figure {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: var(--radius);
}

/* Prev/next navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    font-size: 0.9rem;
}

.post-nav a {
    color: var(--ink);
    text-decoration: none;
}

.post-nav a:hover,
.post-nav a:focus {
    text-decoration: underline;
}

/* Scroll and spacing polish */

section {
    margin-bottom: 4rem;
}

.post-content img {
    margin: 1.5rem 0;
    border-radius: var(--radius);
}

.post-content blockquote {
    border-left: 3px solid var(--ink);
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
    color: var(--muted);
}

.post-content ul,
.post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Home blog masonry overrides + overlay */

/* Use masonry columns instead of flex when .masonry is present */
.blog-list.masonry {
    display: block;
    /* overrides .blog-list flex layout */
}

/* Masonry blog cards reuse .work-card for the column behavior */
.blog-masonry-card {
    position: relative;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

/* Clickable area */
.blog-masonry-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Title overlay */
.blog-masonry-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.75rem 1rem;
    background: rgba(248, 244, 240, 0.85);
    /* based on --bg, semi-transparent */
    color: var(--ink);
}

/* Title text */
.blog-masonry-title-text {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 600;
}

/* ============================
   Contact Page
   ============================*/

.contact-content {
    max-width: 50rem;
}

.contact-content p {
    margin-bottom: 1rem;
}

/* Home */
.home-hero {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--ink);
}

.home-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2rem;
    align-items: center;
}

.home-hero-portrait img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (max-width: 800px) {
    .home-hero-inner {
        grid-template-columns: 1fr;
    }

    .home-hero-portrait {
        order: -1;
        text-align: center;
    }
}

.home-section {
    margin-bottom: 3rem;
}

.home-section p {
    max-width: 500px;
}

.home-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-section-header h2 {
    margin: 0;
}

.home-section-link {
    font: var(--font-accent);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--bg);
    background-color: var(--accent3);
    padding: .75rem 2rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.home-section-link:hover,
.home-section-link:focus {
    text-decoration: none;
    background-color: var(--accent4);
}

.home-blog-list .blog-card {
    /* reuse your blog-card styles; this just lets them sit nicely under home */
    margin-bottom: 1.5rem;
}

/* ============================
   Mobile layout
   ============================*/
@media (max-width: 768px) {

    /* Stack header + nav vertically */
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .site-nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .site-nav ul li {
        flex: 1 1 100%;
    }

    .site-nav a {
        display: block;
        width: 100%;
    }

    /* Stack section heading + link on home sections */
    .home-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-section-link {
        align-self: flex-start;
        margin-bottom: 0;
    }
}

/* ============================
   Tweaks
   ============================*/

.top1rem {margin-top: 1rem;}
.top2rem {margin-top: 2rem;}
.top3rem {margin-top: 3rem;}
.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.bottomline {border-bottom: 1px solid var(--ink);}