/* Radiant-inspired minimal - dev.giobi.com */

/* Google Fonts - Pixelify Sans */
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');

/* TODO: Televideo font (RAI classic)
 * Source: https://it.fonts2u.com/televideo.carattere
 * Requires: Download → Convert to WOFF2 → Host in /assets/fonts/
 * Application: Logo, [data-theme="televideo"] elements
 */

/* Font imports from local files */
@font-face {
    font-family: 'RethinkSans';
    src: url('/assets/fonts/RethinkSans.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'RethinkSans';
    src: url('/assets/fonts/RethinkSans-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/assets/fonts/IBMPlexMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/assets/fonts/IBMPlexMono-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/assets/fonts/IBMPlexMono-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

:root {
    --color-orange: #ef7d57;
    --color-foreground: #1a1a1a;
    --color-headers: #000;
    --color-background: #c1bfbf;
    --color-dim: #555;
    --color-dimmer: #888;
    --color-subtle: #ddd;
    --color-highlight: #223377;
}

/* Theme: Ocean */
[data-theme="ocean"] {
    --color-orange: #ff6b6b;
    --color-foreground: #2c3e50;
    --color-headers: #1a252f;
    --color-background: #e3f2fd;
    --color-dim: #546e7a;
    --color-dimmer: #90a4ae;
    --color-subtle: #b3d9ff;
    --color-highlight: #0277bd;
}

/* Theme: Forest */
[data-theme="forest"] {
    --color-orange: #ff9800;
    --color-foreground: #2e3b28;
    --color-headers: #1b2419;
    --color-background: #f1f8e9;
    --color-dim: #558b2f;
    --color-dimmer: #7cb342;
    --color-subtle: #c5e1a5;
    --color-highlight: #33691e;
}

/* Theme: Dark */
[data-theme="dark"] {
    --color-orange: #00ff88;
    --color-foreground: #e0e0e0;
    --color-headers: #ffffff;
    --color-background: #0a0a0a;
    --color-dim: #a0a0a0;
    --color-dimmer: #666666;
    --color-subtle: #1a1a1a;
    --color-highlight: #00ff88;
}

/* Theme: Geocities (90s Hell) */
[data-theme="geocities"] {
    --color-orange: #ff00ff;
    --color-foreground: #ff0000;
    --color-headers: #0000ff;
    --color-background: #ffff00;
    --color-dim: #00ff00;
    --color-dimmer: #ff00ff;
    --color-subtle: #00ffff;
    --color-highlight: #ff0000;
}

[data-theme="geocities"] body {
    font-family: 'Comic Sans MS', 'Comic Sans', cursive !important;
    background-image: url('https://gifdb.com/images/high/twinkling-stars-background-p9zyl79hdbt5n6rk.gif');
    background-attachment: fixed;
    animation: rainbow-bg 5s infinite;
}

[data-theme="geocities"] h1,
[data-theme="geocities"] h2,
[data-theme="geocities"] h3,
[data-theme="geocities"] h4,
[data-theme="geocities"] h5,
[data-theme="geocities"] h6 {
    font-family: 'Comic Sans MS', cursive !important;
    text-shadow: 2px 2px 0px #ff00ff, -2px -2px 0px #00ffff;
    animation: blink 1s infinite;
}

[data-theme="geocities"] .site-header {
    background: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3) !important;
    background-size: 200% 100% !important;
    animation: rainbow 3s linear infinite !important;
    border-bottom: 5px dashed #ff00ff !important;
}

[data-theme="geocities"] .site-footer {
    background: linear-gradient(90deg, #9400d3, #4b0082, #0000ff, #00ff00, #ffff00, #ff7700, #ff0000) !important;
    background-size: 200% 100% !important;
    animation: rainbow 3s linear infinite !important;
}

[data-theme="geocities"] a {
    color: #0000ff !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

[data-theme="geocities"] a:hover {
    color: #ff00ff !important;
    text-decoration: blink !important;
}

[data-theme="geocities"] .container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background-image: url('https://media.tenor.com/sflXdo-dCM8AAAAi/under-construction-sign.gif');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 9999;
    pointer-events: none;
}

[data-theme="geocities"] .post-card-small,
[data-theme="geocities"] .project-card {
    border: 3px solid #ff00ff !important;
    box-shadow: 5px 5px 0px #00ffff !important;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

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

@keyframes rainbow-bg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Theme: Colorblind (Hostile) - SCIENTIFICALLY CALCULATED RED/GREEN confusion
   Based on deuteranopia confusion lines: colors with same L/(L+M) ratio
   All pairs tested with CVD simulators - IDENTICAL for deuteranopes
   For normal vision: Obvious red vs green
   For deuteranopes: Everything is muddy brown/beige - UNREADABLE */
[data-theme="colorblind"] {
    --color-orange: hsl(15, 68%, 52%);      /* Orange-red accent */
    --color-foreground: hsl(82, 42%, 35%);  /* Dark olive - SAME as red text */
    --color-headers: hsl(8, 58%, 40%);      /* Red-brown - SAME as green headers */
    --color-background: hsl(75, 35%, 78%);  /* Pale green - SAME as pink bg */
    --color-dim: hsl(88, 40%, 45%);         /* Green dim - SAME as red-orange */
    --color-dimmer: hsl(10, 50%, 48%);      /* Burnt orange - SAME as green */
    --color-subtle: hsl(12, 45%, 75%);      /* Pale red - SAME as pale green bg */
    --color-highlight: hsl(0, 65%, 45%);    /* Pure red - SAME as yellow-green */
}

[data-theme="colorblind"] .site-header {
    background: hsl(75, 35%, 78%);          /* GREEN header */
    border-bottom: 2px solid hsl(3, 52%, 42%); /* RED border - disappears */
}

[data-theme="colorblind"] .site-footer {
    background: hsl(12, 45%, 75%);          /* RED footer - same as green header */
    border-top: 2px solid hsl(95, 38%, 40%); /* GREEN border - invisible */
}

[data-theme="colorblind"] .post-card-small,
[data-theme="colorblind"] .project-card {
    background: hsl(75, 35%, 78%);          /* GREEN cards */
    border-color: hsl(5, 55%, 38%);         /* RED borders - blend completely */
}

[data-theme="colorblind"] .status {
    background: hsl(72, 50%, 50%);          /* Chartreuse - looks brown */
    color: hsl(5, 55%, 38%);                /* RED text on GREEN - INVISIBLE */
}

/* MAXIMUM EVIL: Red links on green background */
[data-theme="colorblind"] a {
    color: hsl(0, 65%, 45%) !important;     /* PURE RED links */
}

[data-theme="colorblind"] a:hover {
    color: hsl(85, 48%, 43%) !important;    /* GREEN hover - SAME perceived color */
}

/* Red text on green bg everywhere */
[data-theme="colorblind"] p {
    color: hsl(5, 55%, 38%);                /* RED text */
}

[data-theme="colorblind"] h1,
[data-theme="colorblind"] h2,
[data-theme="colorblind"] h3 {
    color: hsl(78, 45%, 38%) !important;    /* GREEN headers - blend with red */
}

/* Theme: RAI Televideo (pagina 777 vibes) */
[data-theme="televideo"] {
    --color-orange: #f6ff00;        /* neon yellow headlines */
    --color-foreground: #f2f5d0;    /* teletext pale white */
    --color-headers: #fffb96;       /* more intense yellow */
    --color-background: #000000;    /* CRT black */
    --color-dim: #00b8ff;           /* cyan highlights */
    --color-dimmer: #0059ff;        /* deep royal blue */
    --color-subtle: #111111;        /* dark strips */
    --color-highlight: #ff2c4b;     /* magenta/red callouts */
}

[data-theme="televideo"] body {
    font-family: 'IBM Plex Mono', 'VT323', monospace;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background-color: #000;
    background-image: repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.05) 0,
        rgba(255, 255, 255, 0.05) 1px,
        transparent 1px,
        transparent 3px
    );
    color: var(--color-foreground);
}

[data-theme="televideo"] .site-header,
[data-theme="televideo"] .site-footer,
[data-theme="televideo"] .mobile-bottom-nav {
    font-family: 'IBM Plex Mono', 'VT323', monospace;
    background: #000;
    border-color: var(--color-dimmer);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--color-dimmer);
}

[data-theme="televideo"] .site-header {
    border-bottom: 4px solid var(--color-dim);
}

[data-theme="televideo"] .site-header a,
[data-theme="televideo"] nav a {
    color: var(--color-orange);
    text-decoration: none;
}

[data-theme="televideo"] nav a:hover {
    color: var(--color-highlight);
}

[data-theme="televideo"] .logo a {
    font-weight: 700;
    color: var(--color-headers);
    text-shadow: -1px 0 var(--color-dimmer), 0 1px var(--color-dimmer), 1px 0 var(--color-dimmer), 0 -1px var(--color-dimmer);
}

[data-theme="televideo"] .container {
    border-left: 4px solid var(--color-dim);
    border-right: 4px solid var(--color-highlight);
    padding-top: 2.5rem;
    background: #050505;
    box-shadow: inset 0 0 0 2px #000;
}

[data-theme="televideo"] .section-title {
    background: #003cff;
    color: #fff;
    padding: 0.4rem 0.6rem;
    display: inline-block;
    border: 3px solid #000;
    box-shadow: 6px 6px 0 var(--color-highlight);
}

[data-theme="televideo"] .post-card-small,
[data-theme="televideo"] .project-card {
    border: 4px solid var(--color-dimmer);
    background: #000;
    color: var(--color-foreground);
    box-shadow: 6px 6px 0 var(--color-highlight);
    text-transform: uppercase;
}

[data-theme="televideo"] .project-card h3,
[data-theme="televideo"] .post-card-small h3 {
    color: var(--color-orange);
    letter-spacing: 0.08em;
}

[data-theme="televideo"] .post-card-small .meta {
    color: var(--color-dim);
}

[data-theme="televideo"] .status {
    background: var(--color-highlight);
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 4px 4px 0 #000;
}

[data-theme="televideo"] a {
    color: var(--color-dim);
}

/* Televideo theme: Pixelify Sans for headings */
[data-theme="televideo"] h1,
[data-theme="televideo"] h2,
[data-theme="televideo"] h3 {
    font-family: 'Pixelify Sans', 'IBM Plex Mono', monospace;
    letter-spacing: 0.05em;
}

[data-theme="televideo"] a:hover {
    color: var(--color-highlight);
}

[data-theme="televideo"] .footer-clients img {
    filter: saturate(0) brightness(1.4);
    mix-blend-mode: screen;
}

[data-theme="televideo"] .theme-select,
[data-theme="televideo"] .theme-toggle-dot {
    border: 2px solid var(--color-dimmer);
    background: #000;
    color: var(--color-orange);
}

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

html {
    font-size: 18px;
}

body {
    font-family: 'RethinkSans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-foreground);
    background: var(--color-background);
    padding-top: 2.5rem;
}

.container {
    max-width: 1728px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

@media (max-width: 1800px) {
    .container {
        max-width: 1400px;
        padding: 2rem 2rem;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 900px;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 17px;
    }
    .container {
        padding: 1.5rem 1rem;
        padding-bottom: 4rem; /* Space for bottom nav */
    }
    
    body {
        padding-top: 0;
        padding-bottom: 3.5rem;
    }
}

/* Navigation - Desktop top */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-dimmer);
    padding: 0.3rem 0;
}

.site-header .container {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.site-header .logo {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-headers);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

/* Theme dot changes color based on active theme */
[data-theme="default"] .theme-toggle-dot {
    background: #ef7d57;
}

[data-theme="ocean"] .theme-toggle-dot {
    background: #2196F3;
}

[data-theme="forest"] .theme-toggle-dot {
    background: #66BB6A;
}

[data-theme="dark"] .theme-toggle-dot {
    background: #424242;
}

[data-theme="geocities"] .theme-toggle-dot {
    background: linear-gradient(90deg, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #9400d3);
    background-size: 200% 100%;
    animation: rainbow 2s linear infinite;
}

[data-theme="colorblind"] .theme-toggle-dot {
    background: #b8860b;
}

.theme-toggle-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.site-header .logo {
    position: relative;  /* For absolute positioning of badge */
}

.site-header .logo a {
    color: var(--color-headers);
    text-decoration: none;
}

/* ALPHA badge - pure CSS, position absolute */
.site-header .logo a::after {
    content: 'ALPHA';
    position: absolute;
    top: 100%;
    left: 0;
    font-size: 0.5rem;
    font-family: 'Pixelify Sans', monospace;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-orange);
    background: var(--color-background);
    padding: 0.15rem 0.35rem;
    border: 1px solid var(--color-orange);
    border-radius: 2px;
    margin-top: 0.25rem;
    opacity: 0.85;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-header .logo a:hover {
    color: var(--color-orange);
}

.site-header .logo a:hover::after {
    opacity: 1;
    border-color: var(--color-highlight);
    color: var(--color-highlight);
}

.site-header nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.site-header nav a {
    color: var(--color-foreground);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.site-header nav a:hover {
    text-decoration: underline;
}

/* Mobile bottom navigation */
.mobile-bottom-nav {
    display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
    .site-header {
        position: fixed;
        top: 0;
        width: 100%;
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--color-dimmer);
        background: var(--color-background);
        z-index: 1000;
    }

    main.container {
        padding-top: 4rem; /* Space for fixed header */
        padding-bottom: 4rem; /* Space for bottom nav */
    }

    .site-header .container {
        justify-content: center;
    }

    .site-header .logo {
        /* Show only pallino + giobi.com/ on mobile */
    }

    .site-header nav {
        /* Hide desktop nav on mobile */
        display: none;
    }

    .theme-toggle-dot {
        width: 14px;
        height: 14px; /* Slightly larger for mobile tapping */
    }

    /* Bottom nav bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3.5rem;
        background: var(--color-background);
        border-top: 1px solid var(--color-dimmer);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-bottom-nav a {
        color: var(--color-foreground);
        text-decoration: none;
        font-size: 0.9rem;
        padding: 1rem;
    }

    .mobile-bottom-nav a:active {
        background: var(--color-subtle);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'RethinkSans', sans-serif;
    color: var(--color-headers);
    font-weight: 600;
    line-height: 1.1;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Headings use default RethinkSans (defined below in individual h1, h2) */

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.01em;
    margin-top: 1rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
    font-weight: 600;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

p {
    margin: 1rem 0;
}

a {
    color: var(--color-highlight);
    text-decoration: underline;
}

a:hover {
    color: var(--color-orange);
}

/* Lists */
ul {
    list-style: none;
    margin-left: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

ul li {
    position: relative;
    margin-bottom: 0.5rem;
}

ul li:before {
    content: '*';
    position: absolute;
    left: -1.5rem;
    color: var(--color-orange);
    font-weight: 600;
}

ol {
    margin-left: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

ol li {
    margin-bottom: 0.5rem;
}

/* Code */
code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    color: var(--color-dim);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

pre {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-subtle);
    border-radius: 4px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: var(--color-foreground);
}

blockquote {
    border-left: 3px solid var(--color-orange);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--color-dim);
    font-style: italic;
}

hr {
    border: none;
    border-top: 1px solid var(--color-dimmer);
    margin: 2.5rem 0;
}

/* Post list - Card grid 2 columns */
.post-list {
    list-style: none;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.post-list li {
    position: relative;
    border: 1px solid var(--color-subtle);
    padding: 2rem;
    padding-bottom: 3rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.post-list li:before {
    content: none;
}

.post-list li:hover {
    border-color: var(--color-dimmer);
    background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 900px) {
    .post-list {
        grid-template-columns: 1fr;
    }
}

.post-meta {
    margin-bottom: 1.5rem;
}

.post-date {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    color: var(--color-dimmer);
    font-size: 0.75rem;
    font-weight: 400;
}

.post-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-title a {
    color: var(--color-headers);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--color-orange);
}

.post-excerpt {
    display: none;
}

/* Post thumbnail image in list */
.post-image-link {
    display: block;
    width: 100%;
    height: 250px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

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

.post-list li:hover .post-thumbnail {
    transform: scale(1.05);
}

/* Post content */
/* Post hero image */
.post-hero-image {
    width: 100%;
    height: 400px;
    margin-bottom: 3rem;
    overflow: hidden;
    border-radius: 4px;
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .post-hero-image {
        height: 250px;
    }

    .post-image-link {
        height: 200px;
    }
}

/* Page hero image (about, contacts, etc) */
.page-hero-image {
    width: 100%;
    height: 400px;
    margin-bottom: 3rem;
    overflow: hidden;
    border-radius: 4px;
}

.page-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .page-hero-image {
        height: 250px;
    }
}

/* Post content */
.post-header {
    margin-bottom: 2.5rem;
}

.post-header h1 {
    margin-top: 0;
}

.post-content {
    max-width: 900px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

/* Contacts */
.contacts-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 600px;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.contact-label {
    font-weight: 600;
    color: var(--color-headers);
    min-width: 100px;
}

.contact-value a {
    color: var(--color-highlight);
}

.contact-value a:hover {
    color: var(--color-orange);
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ef7d57;
}

.footer-clients {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 1.5rem;
    flex-wrap: wrap;
}

.footer-clients a {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-clients a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-clients img {
    max-width: 100px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.footer-clients .client-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dim);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: var(--color-dim);
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(239, 125, 87, 0.05);
    border-left: 3px solid var(--color-orange);
    border-radius: 4px;
    line-height: 1.6;
    text-align: center;
}

.footer-disclaimer a {
    color: var(--color-orange);
    text-decoration: none;
    font-weight: 600;
}

.footer-disclaimer a:hover {
    text-decoration: underline;
}

.footer-credit {
    font-size: 0.75rem;
    color: var(--color-dimmer);
    margin-top: 1rem;
}

/* Theme selector in footer */
.footer-theme-selector {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-theme-selector label {
    font-size: 0.85rem;
    color: var(--color-dim);
    font-weight: 600;
}

.theme-select {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-family: 'RethinkSans', sans-serif;
    color: var(--color-foreground);
    background: var(--color-background);
    border: 2px solid var(--color-dimmer);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.theme-select:hover {
    border-color: var(--color-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.theme-select:focus {
    outline: none;
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 3px rgba(34, 51, 119, 0.1);
}

::selection {
    background: var(--color-highlight);
    color: var(--color-background);
}

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

em {
    font-style: italic;
}

/* ============================================
   PROJECTS SHOWCASE SYSTEM
   ============================================ */

/* PROJECTS SHOWCASE - Home page */
.projects-showcase,
.posts-recent {
    margin: 4rem 0;
    /* Breakout from container - make full-width */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 3rem;
    box-sizing: border-box;
}

.projects-showcase h2,
.posts-recent h2 {
    max-width: 1728px;
    margin: 0 auto 2rem auto;
}

@media (max-width: 1800px) {
    .projects-showcase,
    .posts-recent {
        padding: 0 2rem;
    }

    .projects-showcase h2,
    .posts-recent h2 {
        max-width: 1400px;
    }
}

@media (max-width: 1200px) {
    .projects-showcase,
    .posts-recent {
        padding: 0 1.5rem;
    }

    .projects-showcase h2,
    .posts-recent h2 {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .projects-showcase,
    .posts-recent {
        padding: 0 1rem;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem auto 0 auto;
    max-width: 1728px;
}

@media (max-width: 1800px) {
    .projects-grid {
        max-width: 1400px;
    }
}

@media (max-width: 1200px) {
    .projects-grid {
        max-width: 900px;
    }
}

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

.project-card {
    border: 1px solid var(--color-subtle);
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card-image {
    width: 100%;
    max-height: 250px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-content {
    padding: 2rem;
}

.project-card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--color-headers);
}

.project-card-content p {
    color: var(--color-dim);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    align-items: center;
}

.status {
    padding: 0.25rem 0.75rem;
    background: var(--color-orange);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
}

.tech-count {
    color: var(--color-dimmer);
}

/* POSTS RECENT - Home page (grid piccolo) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem auto 0 auto;
    max-width: 1728px;
}

@media (max-width: 1800px) {
    .posts-grid {
        max-width: 1400px;
    }
}

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

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.post-card-small {
    border: 1px solid var(--color-subtle);
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.post-card-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-card-small a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-thumbnail-small {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card-small:hover .post-thumbnail-small img {
    transform: scale(1.05);
}

.post-card-small-content {
    padding: 1rem;
}

.post-card-small h4 {
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    color: var(--color-headers);
    font-weight: 600;
}

.post-card-small .post-date {
    display: block;
    font-size: 0.75rem;
    color: var(--color-dimmer);
}

/* PROJECT PAGE - Layout */
.project-hero {
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .project-hero {
        height: 300px;
    }
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

@media (max-width: 900px) {
    .project-content {
        grid-template-columns: 1fr;
    }
}

.project-header {
    margin-bottom: 2rem;
}

.project-header h1 {
    margin-top: 0;
}

.project-tagline {
    font-size: 1.3rem;
    color: var(--color-dim);
    margin: 1rem 0;
    font-style: italic;
}

.project-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0;
}

.repo-link {
    color: var(--color-highlight);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.repo-link:hover {
    color: var(--color-orange);
}

.project-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tech-badge {
    padding: 0.25rem 0.75rem;
    background: var(--color-subtle);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--color-dim);
}

.project-body {
    line-height: 1.8;
}

.project-body h2 {
    margin-top: 2.5rem;
}

.project-body h3 {
    margin-top: 2rem;
}

.project-body code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

.project-body pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.project-body pre code {
    background: none;
    padding: 0;
}

/* Project sidebar */
.project-sidebar {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 4px;
    height: fit-content;
    position: sticky;
    top: 2rem;
    border: 1px solid var(--color-subtle);
}

.project-sidebar h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
}

.related-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-posts li {
    margin-bottom: 1.5rem;
}

.related-posts li:before {
    content: none;
}

.related-posts a {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: opacity 0.3s ease;
}

.related-posts a:hover {
    opacity: 0.7;
}

.related-posts img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.related-post-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.related-posts .post-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    display: block;
    color: var(--color-headers);
}

.related-posts .post-date {
    font-size: 0.75rem;
    color: var(--color-dimmer);
    display: block;
}

.no-posts {
    color: var(--color-dimmer);
    font-style: italic;
    font-size: 0.9rem;
}
