/*
Theme Name: Scalene Portfolio
Theme URI: https://example.com/scalene
Author: Scalene
Description: A minimal portfolio theme with a fixed left sidebar and a masonry gallery driven by the WordPress Media Library. Built for Amazon graphic design portfolios with mixed aspect ratios (listing images, A+ content, etc.).
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: scalene
*/

:root {
    --sidebar-width: 260px;
    --gutter: 16px;
    --bg: #ffffff;
    --fg: #111111;
    --muted: #666666;
    --accent: #111111;
    --radius: 6px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.site {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.site-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 32px 24px;
    border-right: 1px solid #eee;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--bg);
}

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

.site-logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.site-tagline {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.sidebar-nav {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid var(--fg);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

.contact-btn:hover {
    background: var(--fg);
    color: var(--bg);
}

/* --- Main content --- */
.site-main {
    flex: 1;
    padding: 32px;
    min-width: 0;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}

/* --- Masonry (CSS columns) --- */
.masonry {
    column-count: 3;
    column-gap: var(--gutter);
}

@media (max-width: 1200px) {
    .masonry { column-count: 2; }
}

@media (max-width: 700px) {
    .masonry { column-count: 1; }
    .site { flex-direction: column; }
    .site-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #eee;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
    }
    .sidebar-nav { margin-top: 0; }
    .site-main { padding: 20px; }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: var(--gutter);
    border-radius: var(--radius);
    overflow: hidden;
    background: #f5f5f5;
    display: block;
    position: relative;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.masonry-item:hover img {
    transform: scale(1.02);
}

.masonry-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
    color: #fff;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.masonry-item:hover .masonry-caption { opacity: 1; }

.empty-state {
    color: var(--muted);
    font-size: 15px;
    padding: 40px 0;
}
