/* ============================================================
   VARIABLES & BASE STYLES
   ============================================================ */
@font-face {
    font-family: BebasNeueBook;
    font-display: auto;
    src: url("../fonts/BebasNeueBook.eot");
    src: url("../fonts/BebasNeueBook.woff2") format("woff2"), url("../fonts/BebasNeueBook.woff") format("woff"), url("../fonts/BebasNeueBook.ttf") format("truetype"), url("../fonts/BebasNeueBook.svg") format("svg"), url("../fonts/BebasNeueBook.eot%3F") format("embedded-opentype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: BebasNeueRegular;
    font-display: auto;
    src: url("../fonts/BebasNeueRegular.eot");
    src: url("../fonts/BebasNeueRegular.woff2") format("woff2"), url("../fonts/BebasNeueRegular.woff") format("woff"), url("../fonts/BebasNeueRegular.ttf") format("truetype"), url("../fonts/BebasNeueRegular.svg") format("svg"), url("../fonts/BebasNeueRegular.eot%3F") format("embedded-opentype");
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Colors */
    --color-bg: #fff;
    --color-fg: #111;
    --color-border: #cdcdcd;
    --color-muted: #555;
    --color-overlay: rgba(0,0,0,0.5);
    --color-accent: #666;
    --color-bg-alt: #f2f2f2;

    --color-btn-bg: #fff;
    --color-btn-text: #111;
    --color-btn-hover: #ddd;

    --color-hero-text: #fff;
    --text-color: #191919;
    
    --color-img-border-box: #1b1b1b;
    --color-main-background: #dcdcdc;
    
    --intro-categroy-color: rgb(34 34 34);
    --intro-text-color: rgb(94 94 94);

    /* Galleries */
    --color-gallery-border: #1c1c1c;
    --color-gallery-hover-border: #cfcfcf;

    /* Fonts (semantic) */
    --font-body: "Roboto Slab", serif;
    --font-heading: "Montserrat", sans-serif;
    --font-category: "Montserrat", sans-serif;
    --font-nav: "BebasNeueRegular", sans-serif;
    --font-button: "Montserrat", sans-serif;
    --font-footer: "Roboto Slab", serif;
    --font-subtext: "Libre Baskerville", serif;
    --font-label: "BebasNeueRegular", sans-serif;
    --font-copyright: "Libre Baskerville", sans-serif;
    --font-hero-text: "Libre Baskerville", sans-serif;
    --font-banner: "BebasNeueBook", sans-serif;
    --font-intro-title: "BebasNeueRegular", sans-serif;
    --font-gallery-caption: "BebasNeueRegular", sans-serif;

    /* height header and footer */
    --header-h: 40px;
    --footer-h: 40px;

    --rail-max-width: 1200px;
}

/* Base */
html, body {
    height: 100%;
}

/* ============================================================
   LAYOUT WITH FIXED HEADER/FOOTER
   ============================================================ */
body {
    margin: 0;
    font-family: var(--font-body), sans-serif;
    color: var(--color-fg);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header / Navbar */
/* Removed duplicate .navbar definition */

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--header-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 0 1rem;
}

/* Header content cap (left-anchored, background stays full width) */
header.navbar { padding-left: 0; padding-right: 0; }
header.navbar .header-rail {
    width: 100%;
    max-width: var(--rail-max-width); /* change this number to adjust the cap */
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0 1rem;   /* simple gutter */
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ============================================================
   FOOTER
   ============================================================ */
footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 1rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-muted);
    font-family: var(--font-footer), sans-serif;
    font-size: .875rem;
    box-sizing: border-box;
}

/* Footer content cap (same behavior as navbar/header) */
footer { padding-left: 0; padding-right: 0; }
footer .footer-rail {
    width: 100%;
    max-width: var(--rail-max-width); /* change this number to adjust the cap */
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0 1rem; /* simple gutter */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* footer content left-aligned */
}

/* Main content */
main {
    flex: 1;
    overflow-y: auto;
    padding-top: var(--header-h);
    margin-bottom: var(--footer-h);
    box-sizing: border-box;
    background-color: var(--color-main-background);
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
header, nav {
    padding: 1rem;
}

header {
    grid-row: 1;
}

.logo a {
    font-family: var(--font-nav), sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-fg);
    text-decoration: none;
    display: inline-block;
    padding: .25rem 0;
}

/* Explicitly define .nav-links for desktop */
.nav-links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Navigation Links */
.nav-links,
nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-links a,
nav a {
    font-family: var(--font-nav), sans-serif;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--color-fg);
    text-decoration: none;
    display: block;
    padding: .5rem;
}

.header-rail {
    position: relative;
    overflow: visible;
    z-index: auto;
}


/* ============================================================
   MAIN CONTENT & CONTAINERS
   ============================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background-color: lightgray;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.intro {
    background-color: var(--color-bg-alt, #f2f2f2);
    width: 100%;
    text-align: left;
    font-family: var(--font-body), sans-serif;
    line-height: 1.8;
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-border);
}

/* Intro content cap (match header/footer behavior) */
.intro .intro-rail {
    width: 100%;
    max-width: var(--rail-max-width); /* keep in sync with header/footer cap */
    margin: 0 auto;    /* center within the full-bleed section */
    box-sizing: border-box;
    padding: 0.5rem 1rem; /* simple horizontal gutter */
}

.intro .category {
    font-family: var(--font-category), sans-serif;
    text-transform: uppercase;
    font-size: clamp(11px, 1.2vw, 12px);
    font-weight: 400;
    line-height: 20px;
    margin-top: 0;
    letter-spacing: 5px;
    margin-bottom: 1px;
    -webkit-font-smoothing: antialiased;
    color: var(--intro-categroy-color);
}

.intro .title {
    font-family: var(--font-intro-title), sans-serif;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
}

.intro .text {
    font-family: "Libre Baskerville", sans-serif;
    color: var(--intro-text-color);
    letter-spacing: 0.05em;
    font-size: clamp(13px, 1.4vw, 15px);
    line-height: 1.6;
}


/* 
  GALLERY/PORTFOLIO
 */

.photo-mat {
    width: 85%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;;
    border: 7px solid var(--color-gallery-border);
    padding: 20px;
    box-sizing: border-box;
    margin: auto;
    pointer-events: auto;
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.25), /* inner shadow for frame depth */
        0 4px 10px rgba(0, 0, 0, 0.25),
        0 10px 25px rgba(0, 0, 0, 0.15);
}

.photo-mat-without-expansion {
    background: #fafafa;;                                  /* mat area */
    border: 10px solid var(--color-gallery-border);     /* outer frame */
    padding: 20px;                                      /* mat thickness */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 90%;
    max-height: 90%;
    margin: 0 auto;
}

.photo-mat img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid #d1d1d1;                            /* border around actual image */
    display: block;
}

.portfolio-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 2rem 2rem;
    box-sizing: border-box;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.portfolio-grid figure {
    margin: 0;
    text-align: center;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.portfolio-grid figure > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.portfolio-grid figcaption {
    color: var(--text-color, #333);
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 400;
    font-family: var(--font-gallery-caption), sans-serif;
    letter-spacing: 2px;
    margin-top: 0;
}

.portfolio-grid figure a:hover .photo-mat {
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
    transition: all 0.3s ease;
}
