/* ========================================
   BRUTALIST + ZINE DESIGN SYSTEM
   ======================================== */

/* CSS Variables */
:root {
    --deep-blue: #1B365D;
    --black: #000;
    --white: #fff;
    --cream: #FFFEF2;
    --light-peach: #FFF8E7;
    --border-thick: 5px;
    --border-medium: 4px;
    --border-thin: 3px;
    --border-subtle: 2px;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--light-peach);
    padding: 20px;
}

/* ========================================
   BRUTALIST STRUCTURE - OFF-CENTER LAYOUT
   ======================================== */

.container {
    max-width: 820px;
    margin-left: 15vw;
    margin-right: auto;
    margin-top: 40px;
    margin-bottom: 40px;
    background-color: var(--cream);
    padding: 40px;
    border: var(--border-thick) solid var(--deep-blue);
    box-shadow: 12px 12px 0 var(--black);
    transform: rotate(-0.3deg);
}

/* ========================================
   TYPOGRAPHY - BOLD & UPPERCASE
   ======================================== */

h1 {
    font-size: 2.5em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--black);
    line-height: 1.1;
    margin-bottom: 0.3em;
}

h2 {
    font-size: 1.8em;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--black);
    border-bottom: var(--border-medium) solid var(--deep-blue);
    padding-bottom: 0.3em;
    margin-top: 1em;
    margin-bottom: 0.8em;
}

h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--black);
    margin-top: 1em;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
}

.tagline {
    font-style: normal;
    font-weight: bold;
    color: var(--royal-blue);
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.15em;
    margin-bottom: 1em;
}

/* Accent text for zine-style callouts */
.accent-text {
    color: var(--royal-blue);
    font-weight: bold;
}

/* ========================================
   LINKS
   ======================================== */

a {
    color: var(--royal-blue);
    text-decoration: underline;
    font-weight: bold;
}

a:hover {
    background-color: var(--royal-blue);
    color: var(--white);
    text-decoration: none;
}

a:visited {
    color: #551a8b;
}

/* ========================================
   NAVIGATION - BOLD BUTTONS
   ======================================== */

nav {
    margin: 1.5em 0;
    padding: 1em 0;
}

nav a {
    display: inline-block;
    border: var(--border-thin) solid var(--black);
    padding: 0.6em 1.2em;
    margin-right: 0.5em;
    margin-bottom: 0.5em;
    background-color: var(--white);
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.05em;
    color: var(--black);
    transition: all 0.2s;
}

nav a:hover {
    background-color: var(--deep-blue);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--black);
}

nav a:visited {
    color: var(--black);
}

nav a:visited:hover {
    color: var(--white);
}

/* ========================================
   ASCII ART DIVIDERS
   ======================================== */

hr {
    border: none;
    margin: 2.5em 0;
    height: auto;
    text-align: center;
    font-family: monospace;
    font-size: 1em;
    line-height: 1;
}

hr::before {
    display: block;
    letter-spacing: 0.1em;
    content: "* * * * * * * * * * * * * * * * * * * * * * * * * *";
    color: var(--black);
}

/* ========================================
   SECTIONS & STRUCTURE
   ======================================== */

section {
    margin-bottom: 2.5em;
    padding: 1.5em;
    border: var(--border-medium) solid var(--deep-blue);
    background-color: var(--white);
    position: relative;
}

/* Asymmetric variations */
section:nth-child(odd) {
    margin-left: 1em;
    border-color: var(--deep-blue);
}

section:nth-child(even) {
    margin-right: 1em;
    border-color: var(--black);
}

header {
    margin-bottom: 1.5em;
    padding-bottom: 1.5em;
    border-bottom: var(--border-medium) solid var(--deep-blue);
    position: relative;
}

/* ========================================
   SOCIAL ICONS - BRUTALIST STYLE
   ======================================== */

.social-icons {
    display: flex;
    gap: 0.5em;
    margin-top: 1em;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: var(--border-thin) solid var(--black);
    background-color: var(--white);
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
}

.social-icon:hover {
    background-color: var(--deep-blue);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--black);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--black);
    transition: fill 0.2s;
}

.social-icon:hover svg {
    fill: var(--white);
}

/* Alternating border colors for social icons */
.social-icon:nth-child(odd) {
    border-color: var(--deep-blue);
}

.social-icon:nth-child(even) {
    border-color: var(--black);
}

/* ========================================
   STAMPS & BADGES
   ======================================== */

/* Base stamp styling */
.stamp {
    position: relative;
}

/* Header stamp - "HANDCRAFTED" */
header::after {
    content: "★ HANDCRAFTED";
    position: absolute;
    top: -15px;
    right: -30px;
    padding: 0.4em 0.8em;
    border: var(--border-thin) solid var(--black);
    background-color: var(--white);
    color: var(--black);
    font-family: monospace;
    font-weight: bold;
    font-size: 0.7em;
    text-transform: uppercase;
    transform: rotate(12deg);
    box-shadow: 3px 3px 0 var(--black);
    z-index: 10;
}

/* New stamp - ONLY stamp with color accent */
.stamp-new {
    position: relative;
}

.stamp-new::after {
    content: "★ NEW ★";
    position: absolute;
    top: -10px;
    right: -25px;
    padding: 0.4em 0.8em;
    border: var(--border-thin) solid var(--deep-blue);
    background-color: var(--deep-blue);
    color: var(--white);
    font-family: monospace;
    font-weight: bold;
    font-size: 0.7em;
    text-transform: uppercase;
    transform: rotate(-5deg);
    box-shadow: 2px 2px 0 var(--black);
    z-index: 10;
}

/* Featured stamp */
.stamp-featured {
    position: relative;
}

.stamp-featured::after {
    content: "FEATURED";
    position: absolute;
    top: -12px;
    right: -20px;
    padding: 0.3em 0.7em;
    border: var(--border-thin) dashed var(--deep-blue);
    background-color: var(--white);
    color: var(--deep-blue);
    font-family: monospace;
    font-weight: bold;
    font-size: 0.7em;
    text-transform: uppercase;
    transform: rotate(8deg);
    box-shadow: 2px 2px 0 var(--deep-blue);
    z-index: 10;
}

/* Approved stamp */
.stamp-approved {
    position: relative;
}

.stamp-approved::after {
    content: "✓ APPROVED";
    position: absolute;
    top: -15px;
    right: -30px;
    padding: 0.4em 0.8em;
    border: var(--border-thin) solid var(--deep-blue);
    color: var(--deep-blue);
    background-color: var(--white);
    font-family: monospace;
    font-weight: bold;
    font-size: 0.7em;
    text-transform: uppercase;
    transform: rotate(12deg);
    box-shadow: 2px 2px 0 var(--deep-blue);
    z-index: 10;
}

/* ========================================
   LISTS
   ======================================== */

ul, ol {
    margin-left: 2em;
    margin-bottom: 1em;
}

li {
    margin-bottom: 0.5em;
}

/* ========================================
   PUBLICATION/PROJECT ITEMS
   ======================================== */

.item {
    margin-bottom: 1.5em;
    padding: 1em;
    border: var(--border-thin) solid var(--deep-blue);
    background-color: var(--white);
    position: relative;
}

/* Alternate border colors */
.item:nth-child(even) {
    border-color: var(--black);
}

.item-title {
    font-weight: bold;
    margin-bottom: 0.25em;
    font-size: 1.1em;
}

.item-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5em;
    font-family: monospace;
}

.item-description {
    color: #444;
}

/* ========================================
   ALBUM LINKS
   ======================================== */

.album-link {
    margin-bottom: 1.5em;
    padding: 1em;
    border: var(--border-thin) solid var(--deep-blue);
    background-color: var(--white);
    transition: all 0.2s;
}

.album-link:nth-child(even) {
    border-color: var(--black);
}

.album-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--black);
}

.album-link a {
    font-size: 1.1em;
    text-decoration: none;
}

.album-link a:hover {
    text-decoration: underline;
}

.album-link p {
    margin-top: 0.5em;
    margin-bottom: 0;
    color: #666;
    font-size: 0.9em;
}

/* ========================================
   BLOG POST LIST
   ======================================== */

.blog-post-item {
    margin-bottom: 1.5em;
    padding: 1em;
    border: var(--border-thin) solid var(--deep-blue);
    background-color: var(--white);
    position: relative;
}

/* Alternate border colors */
.blog-post-item:nth-child(even) {
    border-color: var(--black);
}

.blog-post-item:last-child {
    border-bottom: var(--border-thin) solid inherit;
}

.blog-post-title {
    font-weight: bold;
    font-size: 1.2em;
}

.blog-post-date {
    color: #666;
    font-size: 0.9em;
    font-family: monospace;
}

/* ========================================
   BLOG POST CONTENT
   ======================================== */

.blog-content {
    margin-top: 2em;
}

.blog-content h1 {
    border-bottom: var(--border-medium) solid var(--deep-blue);
    padding-bottom: 0.3em;
    margin-bottom: 0.5em;
}

.blog-content h1 + .blog-post-date {
    margin-top: -0.3em;
    margin-bottom: 1.5em;
    color: #666;
    font-size: 0.9em;
    font-family: monospace;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
    border: var(--border-thin) solid var(--black);
}

.blog-content code {
    background-color: var(--cream);
    padding: 2px 6px;
    border: var(--border-subtle) solid var(--black);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.blog-content pre {
    background-color: var(--cream);
    padding: 1em;
    overflow-x: auto;
    border-left: var(--border-medium) solid var(--deep-blue);
    border: var(--border-thin) solid var(--black);
    margin: 1em 0;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    border: none;
}

.blog-content blockquote {
    border-left: var(--border-medium) solid var(--deep-blue);
    padding-left: 1em;
    margin: 1em 0;
    color: #333;
    font-style: italic;
    font-weight: bold;
}

/* Blog image figures with captions */
.blog-content figure.blog-image {
    margin: 1.5em 0;
    padding: 0;
    border: var(--border-thin) solid var(--black);
    background-color: var(--white);
    max-width: 100%;
}

.blog-content figure.blog-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border: none;
}

.blog-content figure.blog-image figcaption {
    padding: 0.8em;
    background-color: var(--cream);
    border-top: var(--border-subtle) solid var(--black);
    font-family: monospace;
    font-size: 0.85em;
    color: var(--black);
    font-style: italic;
}

/* Footnotes section */
.blog-content .footnotes {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: var(--border-medium) solid var(--deep-blue);
}

.blog-content .footnotes hr {
    display: none;
}

.blog-content .footnotes ol {
    margin-left: 1.5em;
    font-size: 0.9em;
    line-height: 1.6;
}

.blog-content .footnotes li {
    margin-bottom: 0.8em;
    color: #333;
}

.blog-content .footnote-ref {
    font-weight: bold;
    text-decoration: none;
    color: var(--deep-blue);
    padding: 0 0.2em;
}

.blog-content .footnote-ref:hover {
    background-color: var(--deep-blue);
    color: var(--white);
}

.blog-content .footnote-backref {
    font-weight: bold;
    text-decoration: none;
    color: var(--deep-blue);
    padding: 0 0.2em;
    margin-left: 0.3em;
}

.blog-content .footnote-backref:hover {
    background-color: var(--deep-blue);
    color: var(--white);
}

/* ========================================
   GALLERY - ASYMMETRIC & ORGANIC
   ======================================== */

.gallery {
    margin: 2em 0;
    padding: 1.5em;
    border: var(--border-medium) solid var(--deep-blue);
    background-color: var(--white);
}

.gallery h3 {
    margin-bottom: 1em;
    text-transform: uppercase;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5em;
    margin-top: 1em;
    align-items: start;
}

.photo-item {
    border: var(--border-thin) solid var(--black);
    padding: 0;
    background-color: var(--white);
    box-shadow: 4px 4px 0 var(--deep-blue);
}

/* Organic rotations with alternating shadow colors */
.photo-item:nth-child(5n+1) {
    transform: rotate(-1deg);
    box-shadow: 4px 4px 0 var(--deep-blue);
}

.photo-item:nth-child(5n+2) {
    transform: rotate(1deg);
    box-shadow: 4px 4px 0 var(--black);
}

.photo-item:nth-child(5n+3) {
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 var(--deep-blue);
}

.photo-item:nth-child(5n+4) {
    transform: rotate(1.5deg);
    box-shadow: 4px 4px 0 var(--black);
}

.photo-item img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center top;
    display: block;
    border: none;
    background-color: var(--white);
}

.photo-caption {
    padding: 0.8em;
    background-color: var(--white);
    border-top: var(--border-thin) solid currentColor;
    font-family: monospace;
    font-size: 0.85em;
    color: var(--black);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    margin-top: 2em;
    padding-top: 1.5em;
    text-align: center;
    color: #666;
    border-top: var(--border-medium) solid var(--black);
}

footer a {
    color: #666;
    font-weight: bold;
}

footer a:hover {
    color: var(--white);
    background-color: var(--deep-blue);
}

footer img {
    margin-top: 1em;
    border: var(--border-thin) solid var(--black);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet breakpoint - revert to centered */
@media (max-width: 900px) {
    .container {
        margin-left: auto;
        margin-right: auto;
        transform: rotate(0deg);
    }

    section:nth-child(odd),
    section:nth-child(even) {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Mobile breakpoint */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        border-width: var(--border-medium);
        box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    h3 {
        font-size: 1.1em;
    }

    nav a {
        display: block;
        margin-right: 0;
        margin-bottom: 0.5em;
    }

    section {
        border-width: var(--border-thin);
        padding: 1em;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Hide stamps on small screens */
    header::after,
    .stamp-new::after,
    .stamp-featured::after,
    .stamp-approved::after {
        display: none;
    }
}

/* ========================================
   LIGHTBOX - BRUTALIST MODAL
   ======================================== */

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background-color: var(--cream);
    border: var(--border-thick) solid var(--deep-blue);
    box-shadow: 15px 15px 0 var(--black);
    padding: 20px;
    transform: rotate(-0.5deg);
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: var(--black);
    color: var(--white);
    border: var(--border-medium) solid var(--black);
    padding: 0.6em 1.2em;
    font-family: monospace;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    z-index: 10;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 var(--black);
    transform: rotate(5deg);
    transition: all 0.2s;
}

.lightbox-close:hover {
    background-color: var(--deep-blue);
    transform: rotate(5deg) translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--black);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white);
    color: var(--black);
    border: var(--border-medium) solid var(--black);
    padding: 1em 1.5em;
    font-family: monospace;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 5px 5px 0 var(--black);
}

.lightbox-prev {
    left: -80px;
    transform: translateY(-50%) rotate(-2deg);
}

.lightbox-next {
    right: -80px;
    transform: translateY(-50%) rotate(2deg);
}

.lightbox-nav:hover {
    background-color: var(--deep-blue);
    color: var(--white);
}

.lightbox-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: calc(90vh - 180px);
    background-color: var(--black);
    border: var(--border-thin) solid var(--black);
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 180px);
    width: auto;
    height: auto;
    display: block;
    border: none;
    transition: opacity 0.3s;
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-family: monospace;
    font-weight: bold;
    font-size: 1.5em;
    text-transform: uppercase;
    display: none;
    background-color: var(--black);
    padding: 1em 2em;
    border: var(--border-medium) solid var(--white);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.lightbox-caption {
    margin-top: 15px;
    padding: 1em;
    background-color: var(--white);
    border: var(--border-thin) solid var(--black);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-family: monospace;
}

.lightbox-caption-text {
    flex: 1;
    font-size: 0.9em;
    line-height: 1.4;
}

.lightbox-counter {
    font-weight: bold;
    color: var(--white);
    background-color: var(--deep-blue);
    padding: 0.3em 0.8em;
    border: var(--border-subtle) solid var(--black);
    margin-left: 1em;
    white-space: nowrap;
}

/* Hover effect for gallery thumbnails */
.photo-item:hover {
    cursor: pointer;
    transform: scale(1.02);
    transition: transform 0.2s;
    z-index: 5;
}

/* Mobile responsive */
@media (max-width: 900px) {
    .lightbox-container {
        max-width: 95vw;
        padding: 15px;
        transform: rotate(0deg);
        box-shadow: 8px 8px 0 var(--black);
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 600px) {
    .lightbox-container {
        padding: 10px;
        border-width: var(--border-thin);
    }

    .lightbox-close {
        top: 5px;
        right: 5px;
        padding: 0.4em 0.8em;
        font-size: 0.9em;
        transform: rotate(0deg);
    }

    .lightbox-nav {
        bottom: 10px;
        top: auto;
        transform: none;
        padding: 0.6em 1em;
        font-size: 0.85em;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    .lightbox-caption {
        flex-direction: column;
        font-size: 0.85em;
    }

    .lightbox-counter {
        margin-left: 0;
        margin-top: 0.5em;
    }
}

/* ========================================
   RETRO & UTILITY CLASSES
   ======================================== */

.under-construction {
    display: inline-block;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.loading {
    color: #999;
    font-style: italic;
}
