/* ═══════════════════════════════════════════════════════
   Stylist Portfolio — Sidebar Editorial Layout
   ═══════════════════════════════════════════════════════ */

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    font-weight: 300;
    color: #1a1a1a;
    background: #f3f3f3;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ═══ SITE CONTAINER ═════════════════════════════════════ */
.site-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
}

/* ═══ LEFT SIDEBAR ═══════════════════════════════════════ */
.site-sidebar {
    width: 250px;
    flex-shrink: 0;
    border-right: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
}

.sidebar-inner {
    padding: 52px 36px 44px;
    display: flex;
    flex-direction: column;
    gap: 44px;
}

/* Logo */
.sidebar-logo { margin-bottom: 0; }
.sidebar-logo .custom-logo-link img { height: 28px; width: auto; }
.logo-text {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.2;
    color: #1a1a1a;
    white-space: normal;
    word-wrap: break-word;
    transition: opacity 0.2s ease;
}
.logo-text:hover { opacity: 0.6; }

/* Sidebar Navigation */
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.sidebar-menu a {
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #888;
    transition: color 0.2s;
}
.sidebar-menu a:hover,
.sidebar-menu .current > a { color: #1a1a1a; }

/* Sidebar Submenu */
.sidebar-submenu { list-style: none; padding: 8px 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.sidebar-submenu a { font-size: 14px; color: #bbb; }
.sidebar-submenu .current > a { color: #666; }

/* Sidebar Social */
.sidebar-social { display: flex; gap: 12px; }
.sidebar-social .social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid #ddd;
    transition: border-color 0.25s, opacity 0.25s;
}
.sidebar-social .social-icon:hover { border-color: #1a1a1a; }
.sidebar-social .social-icon svg {
    width: 13px; height: 13px;
    fill: none; stroke: #888; stroke-width: 1.5;
    stroke-linecap: round; stroke-linejoin: round;
}
.sidebar-social .social-icon:hover svg { stroke: #1a1a1a; }
.sidebar-social .social-icon svg.threads-icon { fill: #888; stroke: none; }
.sidebar-social .social-icon:hover svg.threads-icon { fill: #1a1a1a; }

/* Submenu Toggle */
.submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    width: 24px; height: 24px;
    font-size: 18px; color: #aaa; cursor: pointer;
    user-select: none; vertical-align: middle;
    transition: transform 0.2s, color 0.2s;
    position: relative; z-index: 2;
    line-height: 1;
    font-weight: 300;
}
.submenu-toggle:hover { color: #1a1a1a; }
.submenu-toggle.open { transform: rotate(90deg); color: #1a1a1a; }
.sidebar-submenu { display: none; }
.sidebar-submenu.open { display: flex; }

/* ═══ RIGHT CONTENT ═══════════════════════════════════════ */
.site-content {
    flex: 1;
    min-width: 0;
    padding: 48px 40px 60px;
}

/* ═══ GALLERY ════════════════════════════════════════════ */
.portfolio-container { }
.portfolio-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.portfolio-title {
    font-size: 14px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1a1a1a;
}
.portfolio-back {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #bbb;
    transition: color 0.2s;
}
.portfolio-back:hover { color: #1a1a1a; }

/* Masonry Grid */
.gdrive-grid { opacity: 0; animation: fadeIn 0.6s ease-out forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.gdrive-grid::after { content: ''; display: block; clear: both; }

.gdrive-grid-sizer,
.gdrive-grid-item { width: 25%; padding: 7px; }

.gdrive-grid-item a {
    display: block;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
}
.gdrive-grid-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease, opacity 0.4s ease;
    opacity: 0;
    transform: scale(1.03);
}
.gdrive-grid-item.loaded img { opacity: 1; transform: scale(1); }
.gdrive-grid-item:hover img { transform: scale(1.03); }

/* Video tiles */
.gdrive-video-tile { position: relative; }
.gdrive-video-badge {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1; padding-left: 3px;
    pointer-events: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.gdrive-video-tile:hover .gdrive-video-badge {
    background: rgba(0, 0, 0, 0.72);
    transform: translate(-50%, -50%) scale(1.08);
}

/* Video lightbox (Drive preview) */
.gdrive-video-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: none; align-items: center; justify-content: center;
    padding: 5vmin; background: rgba(10, 10, 12, 0.92);
}
.gdrive-video-modal.open { display: flex; }
.gdrive-video-frame {
    position: relative; width: min(980px, 100%);
    aspect-ratio: 16 / 9; background: #000;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.gdrive-video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.gdrive-video-close {
    position: absolute; top: -40px; right: -4px;
    width: 32px; height: 32px; border: none; border-radius: 50%;
    background: rgba(255, 255, 255, 0.14); color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.15s ease;
}
.gdrive-video-close:hover { background: rgba(255, 255, 255, 0.3); }
@media (max-width: 768px) {
    .gdrive-video-close { top: -38px; right: 0; }
}

/* Loading */
#gdrive-loading {
    text-align: center; padding: 40px;
    font-size: 10px; font-weight: 300; letter-spacing: 2px;
    text-transform: uppercase; color: #bbb; display: none;
    animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%{opacity:0.4;} 50%{opacity:1;} 100%{opacity:0.4;} }
#gdrive-no-more { text-align: center; padding: 30px; font-size: 10px; color: #ddd; letter-spacing: 1px; text-transform: uppercase; display: none; }

/* ═══ COLLECTION GRID — Dense Editorial ═══════════════ */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.collection-card {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    break-inside: avoid;
}

.collection-card-image {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f0f0f0;
}

.collection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.03);
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), filter 0.6s ease;
}

.collection-card:hover .collection-card-image img {
    transform: scale(1.04);
    filter: grayscale(0);
}

.collection-card-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f0f0;
}

.collection-card-text {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    text-align: left;
    z-index: 2;
    pointer-events: none;
}

.collection-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, transparent 50%);
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

.collection-card:hover::after {
    opacity: 0.9;
}

.collection-card-name {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    transition: color 0.4s ease, letter-spacing 0.4s ease;
}

.collection-card:hover .collection-card-name {
    color: rgba(255, 255, 255, 1);
    letter-spacing: 1.5px;
}

.collection-card-sub {
    display: none;
}

/* ═══ HAMBURGER (MOBILE) ═════════════════════════════════ */
.mobile-header {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
    height: 56px; background: #fff; border-bottom: 1px solid #f0f0f0;
    align-items: center; padding: 0 16px; gap: 12px;
}
.mobile-logo {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-size: 20px; font-weight: 600; font-style: italic;
    letter-spacing: 1.5px; text-transform: uppercase; color: #1a1a1a; line-height: 1.2;
}
.sidebar-hamburger {
    flex-shrink: 0;
    background: none; border: 1px solid #e8e8e8;
    width: 40px; height: 40px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    cursor: pointer;
}
.sidebar-hamburger span { display: block; width: 18px; height: 1.5px; background: #1a1a1a; transition: 0.25s; }
.sidebar-hamburger.active span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.sidebar-hamburger.active span:nth-child(2) { opacity: 0; }
.sidebar-hamburger.active span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1999;
}
.sidebar-overlay.active { display: block; }

/* ═══ ABOUT PAGE ════════════════════════════════════════ */
.about-page { display: flex; gap: 48px; align-items: flex-start; max-width: 860px; }
.about-image { flex-shrink: 0; width: 300px; }
.about-image img { width: 100%; height: auto; display: block; }
.about-text { flex: 1; min-width: 0; }
.about-text .portfolio-title { margin-bottom: 24px; }
.about-content { font-size: 15px; font-weight: 300; line-height: 1.8; color: #4a4a4a; }
.about-content p { margin-bottom: 18px; }

@media (max-width: 768px) {
    .about-page { flex-direction: column; gap: 24px; }
    .about-image { width: 100%; }
}

/* ═══ BACK TO TOP ════════════════════════════════════════ */
.back-to-top {
    position: fixed; bottom: 32px; right: 32px;
    width: 40px; height: 40px; border: 1px solid #ddd;
    background: #fff; color: #888; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 900; opacity: 0; visibility: hidden;
    transition: 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { border-color: #1a1a1a; color: #1a1a1a; }

/* ═══ FOOTER ═════════════════════════════════════════════ */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #f0f0f0;
}
.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}
.footer-social .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    transition: border-color 0.25s;
}
.footer-social .social-icon:hover {
    border-color: #1a1a1a;
}
.footer-social .social-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #999;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.footer-social .social-icon:hover svg {
    stroke: #1a1a1a;
}
.footer-social .social-icon svg.threads-icon { fill: #999; stroke: none; }
.footer-social .social-icon:hover svg.threads-icon { fill: #1a1a1a; }
.footer-text {
    font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #bbb;
}

/* ═══ RESPONSIVE ═════════════════════════════════════════ */
@media (max-width: 1024px) {
    .site-container { margin: 0; }
    .site-sidebar { width: 200px; }
    .sidebar-inner { padding: 36px 24px 32px; }
    .site-content { padding: 36px 24px 48px; }
    .gdrive-grid-sizer, .gdrive-grid-item { width: 33.333%; padding: 5px; }
    .collection-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }
}

@media (max-width: 768px) {
    .mobile-header { display: flex; }
    .site-container { flex-direction: column; margin: 0; min-height: 100vh; }
    .site-content { padding: 20px 12px 40px; margin-top: 56px; }

    .site-sidebar {
        position: fixed; top: 0; left: 0; width: 280px; height: 100vh;
        z-index: 2001; background: #fff; border-right: 1px solid #f0f0f0;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.165,0.84,0.44,1);
    }
    .site-sidebar.active { transform: translateX(0); }
    .sidebar-inner { padding: 72px 32px 40px; gap: 32px; }

    .gdrive-grid-sizer, .gdrive-grid-item { width: 50%; padding: 4px; }
    .collection-grid { grid-template-columns: 1fr; gap: 8px; }
    .collection-card-name { font-size: 12px; letter-spacing: 1.5px; }
    .back-to-top { bottom: 16px; right: 12px; width: 36px; height: 36px; }
}
