/* =============================================================================
   style.css — Global Stylesheet for Angelina Gualdoni Portfolio
   -----------------------------------------------------------------------------
   Mobile-first. Uses CSS Grid for page layouts, Flexbox for component alignment.
   Loaded by /includes/header.php on every public page.
   ============================================================================= */

/* --- Design Tokens (CSS Custom Properties) ---------------------------------- */
:root {
    --color-bg:        #ffffff;
    --color-bg-alt:    #f8f9fa;
    --color-bg-alt-footer: rgba(248, 248, 248, 0.9); /* footer background per task spec */
    --color-text:      #777777;
    --color-heading:   #777777 ;
    --color-accent:    #222222;
    --color-border:    #e5e5e5;
    --color-divider:   #eaeaea;

    --font-body:       'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --max-width:       1200px;
    --space-sm:        0.5rem;
    --space-md:        1rem;
    --space-lg:        2rem;
    --space-xl:        4rem;

    --header-height:   70px;
}

/* --- Responsive Reset ------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
}

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

a {
    color: var(--color-heading);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

h1, h2, h3, h4 {
    color: var(--color-heading);
    font-weight: 500;
    line-height: 1.2;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: none;
}

/* --- Utility Container ------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* =============================================================================
   INTRO / ARTIST STATEMENT — Narrow, centered, elegant typography
   ============================================================================= */
.intro {
    padding: var(--space-xl) 0;
}

.intro-text {
    max-width: 79ch;
    margin: 0 auto;
    text-align: left;
}

.intro-text h1 {
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.intro-text p {
    font-size: 1.32rem;
    line-height: 1.85;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.intro-text p:last-of-type {
    margin-bottom: var(--space-lg);
}

/* Center the "More About the Artist" button */
.intro-text .btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* Horizontal divider after the intro button, before Contact */
.intro-divider {
    border: 0;
    border-top: 1px solid var(--color-divider);
    margin: var(--space-lg) auto var(--space-lg);
    max-width: var(--max-width);
    padding: 0 var(--space-md);
}

/* --- Button Styles ---------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.65rem 1.5rem;
    border: 1px solid var(--color-heading);
    border-radius: 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--color-heading);
}

.btn-outline:hover {
    background: var(--color-heading);
    color: #fff;
    opacity: 1;
}

/* =============================================================================
   CONTACT SECTION
   ============================================================================= */
.contact {
    padding: 0 0 var(--space-xl) 0;
}

.contact-heading {
    text-align: left;
    font-size: 2rem;
    font-weight: 200;
    letter-spacing: 0em;
    text-transform: uppercase;
    color: var(--color-heading);
    margin: 0;
}

/* --- Contact Grid (mobile: stack, desktop: 3-col) --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: start;
}

/* --- Contact Info (left column) --- */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* --- Contact Links (email + Instagram) --- */
.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-heading);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-link:hover {
    opacity: 0.7;
}

/* --- Contact Icons — strict size constraint to prevent giant SVGs --- */
.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* --- Obfuscated Email --- */
.obfuscated-email .email-display {
    font-size: 0.95rem;
}

/* --- Mailing List Form --- */
.mailing-list {
    margin-top: var(--space-sm);
}

.mailing-list label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: 0.5rem;
}

.mailing-list-form {
    display: flex;
    gap: 0.5rem;
    max-width: 360px;
}

.mailing-list-form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s ease;
}

.mailing-list-form input[type="email"]:focus {
    border-color: var(--color-heading);
}

.mailing-list-form button {
    flex-shrink: 0;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    background: var(--color-heading);
    border: 1px solid var(--color-heading);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.mailing-list-form button:hover {
    background: #444;
    border-color: #444;
}

/* =============================================================================
   PAGE GRID LAYOUT — Shared Left/Right Rail Pattern
   Used by /about and /news. Mobile: 1-col stack. Desktop: 2-col CSS Grid
   with a narrow label rail (250px) on the left and content on the right.
   ============================================================================= */
.page-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: calc(var(--space-xl) + 3rem) var(--space-md) var(--space-xl);
}

/* Each logical row spans the full width. On mobile it stacks; on desktop
   it becomes a 2-column grid matching the parent's column template. */
.grid-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: calc(var(--space-lg) + 0.75rem);
    padding-top: calc(var(--space-lg) + 0.75rem);
    border-top: 1px solid var(--color-divider);
}

/* First row has no top border or margin (clean start) */
.grid-row:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* No-border variant — for pages where the first grid-row is not :first-child */
.grid-row--no-border {
    border-top: none;
    margin-top: var(--space-lg);
    padding-top: 0;
}

.grid-row--no-border:first-of-type {
    margin-top: 0;
}

/* Left column: label, date, or image */
.grid-left {
    font-size: 1.65rem;
    font-weight: 200;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0em;
    color: var(--color-text);
}

.grid-left img {
    width: 100%;
    height: auto;
    display: block;
}

.grid-left sup {
    font-size: 0.7rem;
    font-weight: 400;
    font-style: normal;
    text-transform: none;
    display: block;
    margin-top: 0.35rem;
    color: var(--color-text);
}

/* Right column: body copy */
.grid-right {
    font-size: 1.17rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-text);
}

/* CV category headers: NOT uppercase, smaller, heavier weight, tighter line-height */
.grid-left--category {
    font-size: 1.17rem;
    font-weight: 500;
    font-style: normal;
    text-transform: none;
    letter-spacing: 0em;
    line-height: 1.3;
    color: var(--color-heading);
}

.grid-right p {
    margin-bottom: 0.75rem;
}

.grid-right p:last-child {
    margin-bottom: 0;
}

.grid-right a {
    color: var(--color-heading);
    text-decoration: none;
}

.grid-right a:hover {
    opacity: 0.7;
}

/* --- CV Clean List (no bullets, no padding) --- */
.cv-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cv-list li {
    margin-bottom: 0.35rem;
    line-height: 1.6;
}

.cv-list li:last-child {
    margin-bottom: 0;
}

/* Year sub-headings inside CV lists */
.cv-year {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.cv-year:first-child {
    margin-top: 0;
}

/* --- CV Header Row (name + inline PDF icon) --- */
.cv-header-text {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cv-header-text .cv-name-block {
    flex: 1;
    min-width: 0;
}

.cv-header-text .cv-pdf-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-heading);
    transition: opacity 0.2s ease;
}

.cv-header-text .cv-pdf-link:hover {
    opacity: 0.7;
}

.cv-header-text .cv-pdf-link svg {
    display: block;
}

/* --- Shared Section Title class — one source of truth for all major labels --- */
/* Used on: .detail-label (show pages), CV label (about), news heading, etc.   */
.section-title {
    font-size: 1.65rem;
    font-weight: 200;
    font-style: normal;     /* never italic */
    text-transform: uppercase;
    letter-spacing: 0em;
    color: var(--color-text);
    line-height: 1.65rem;
}

/* CV rows on About page: slightly smaller body text than the bio paragraph */
.grid-row:has(.grid-left--category) .grid-right,
.grid-row:has(.cv-header-text) .grid-right {
    font-size: 1.05rem;
}
/* --- About Page Heading --- */
.about-page-heading {
    margin-top: 50px;
}

/* --- News Page Heading --- */
.news-page-heading {
    margin: 50px 0 var(--space-lg) 0;
    padding: 0;
}

/* --- News Item (Flexbox: image beside text) --- */
.news-item {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-item img {
    width: 140px;
    height: auto;
    flex-shrink: 0;
    object-fit: cover;
}

.news-item .news-text {
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-text);
}

.news-item .news-text a {
    color: #3366cc;
    text-decoration: none;
}

.news-item .news-text a:hover {
    opacity: 0.7;
}

/* --- Site Footer ----------------------------------------------------------- */
.site-footer {
    background: var(--color-bg-alt-footer);
    padding: 1.5rem 0;            /* minimal vertical breathing room */
    margin: 0;                     /* remove unnecessary outer margins */
    color: var(--color-text);
    font-size: 0.85rem;
}

.site-footer .container {
    text-align: right;             /* right-align copyright + name */
}

.site-footer span {
    display: inline-block;
}

/* =============================================================================
   RESPONSIVE: TABLET (≥768px)
   ============================================================================= */
@media (min-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 5rem;
    }

    /* Intro: larger heading on tablet+ */
    .intro-text h1 {
        font-size: 2rem;
    }

    /* Contact: 3-column grid */
    .contact-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: var(--space-xl);
    }

    .contact-heading {
        font-size: 2rem;
        margin: 0;
    }

    /* Page Grid: switch to 2-column left/right rail */
    .grid-row {
        grid-template-columns: 250px 1fr;
        column-gap: 2.6rem;
        row-gap: 0;
        align-items: start;
    }

    .grid-left {
        margin-bottom: 0;
        padding-top: 0.2rem;
    }

    .news-item img {
        width: 180px;
    }
}

/* Desktop nav rules (≥1024px) live in nav.css to keep nav styles co-located */


/* =============================================================================
   RESPONSIVE: LARGE DESKTOP (≥1280px)
   ============================================================================= */
@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-lg);
    }

    .grid-row {
        grid-template-columns: 280px 1fr;
        column-gap: 5.2rem;
    }
}

/* =============================================================================
   ACCESSIBILITY HELPERS
   ============================================================================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* Press / catalog / print links are styled in show.css
   (always-on 2-column grid with fixed 120px thumbnail). */
