/* ==========================================================================
   Portfolio — Standalone Stylesheet
   dersu.space/portfolio
   ========================================================================== */

/* ---------- Fonts ---------- */

@font-face {
    font-family: 'quinn';
    src: url('/fonts/Quinn.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'roboto';
    src: url('/fonts/RobotoCondensed-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'roboto-light';
    src: url('/fonts/RobotoCondensed-Light.ttf') format('truetype');
    font-display: swap;
}

/* ---------- Reset ---------- */

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

html {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    background: #000;
    color: #f5f5f5;
    font-family: 'roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Particles.js background ---------- */

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ---------- Sidebar ---------- */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 220px;
    height: 100vh;
    z-index: 10;
    background: rgba(0, 0, 0, 0.85);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    font-family: 'quinn', serif;
    font-size: 1.76rem;
    color: #f5f5f5;
    text-decoration: none;
    margin-bottom: 48px;
    letter-spacing: 0.5px;
}

.sidebar-brand:hover {
    color: rgb(64, 195, 255);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    font-family: 'roboto', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    line-height: 2.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-nav a:hover {
    color: rgb(64, 195, 255);
}

.sidebar-contact {
    margin-top: 0;
    font-family: 'roboto', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    text-decoration: none;
    padding-top: 14px;
    transition: color 0.2s ease;
}

.sidebar-contact:hover {
    color: rgb(64, 195, 255);
}

.sidebar-crosslink {
    margin-top: auto;
    font-family: 'roboto', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    text-decoration: none;
    padding-top: 0;
    transition: color 0.2s ease;
}

.sidebar-crosslink:hover {
    color: rgb(64, 195, 255);
}

/* ---------- Sidebar overlay (mobile) ---------- */

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    display: block;
    opacity: 1;
}

/* ---------- Hamburger (mobile) ---------- */

.hamburger {
    display: none;
    position: fixed;
    top: 24px;
    left: 24px;
    right: auto;
    z-index: 20;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 20px;
    transition: left 0.3s ease;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #f5f5f5;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger span:first-child {
    margin-bottom: 8px;
}

/* Hamburger → X animation */
.hamburger.active span:first-child {
    transform: translateY(5px) rotate(45deg);
}

.hamburger.active span:last-child {
    transform: translateY(-5px) rotate(-45deg);
}

/* ---------- Main content ---------- */

.portfolio-content {
    margin-left: 220px;
    padding: 40px 48px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ---------- Grid ---------- */

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

/* ---------- Cards ---------- */

.card {
    display: block;
    text-decoration: none;
    color: #f5f5f5;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: scale(1.02);
}

.card-thumbnail {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: rgb(64, 195, 255);
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.card-thumbnail-black {
    background: #000;
}

#kaptin-kaptin .card-thumbnail,
#gocer-zaman .card-thumbnail,
#book-part .card-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
}

#kaptin-kaptin .card-thumbnail img {
    width: 84%;
    height: 84%;
    object-fit: contain;
}

#gocer-zaman .card-thumbnail img,
#book-part .card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card:hover .card-thumbnail {
    opacity: 0.88;
}

.card-title {
    font-family: 'roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 12px;
    color: #f5f5f5;
}

.card-date {
    display: block;
    font-family: 'roboto-light', sans-serif;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.card-description {
    font-family: 'roboto-light', sans-serif;
    font-size: 13px;
    color: #999;
    margin-top: 6px;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ---------- Tablet (≤ 1024px) ---------- */

@media (max-width: 1024px) {
    .sidebar {
        width: 180px;
        padding: 32px 20px;
    }

    .portfolio-content {
        margin-left: 180px;
        padding: 32px 32px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ---------- Mobile (≤ 768px) ---------- */

@media (max-width: 768px) {
    .sidebar {
        width: 75vw;
        max-width: 280px;
        transform: translateX(-100%);
        z-index: 100;
        background: rgba(0, 0, 0, 0.95);
        padding-bottom: calc(56px + env(safe-area-inset-bottom));
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .hamburger {
        display: block;
        z-index: 120;
    }

    .hamburger.active {
        left: min(calc(75vw - 44px), 236px);
        right: auto;
    }

    .sidebar-contact {
        padding-top: 12px;
        padding-bottom: 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .sidebar-crosslink {
        padding-top: 0;
    }

    .portfolio-content {
        margin-left: 0;
        padding: 80px 20px 40px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}