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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--color-background);
    color: var(--color-main-text);
    overflow-x: hidden;
}

/* ============================================
   LAYOUT
   ============================================ */

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

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    border-right: 1px solid var(--color-borders);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-inner {
    padding: 50px 36px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-name a {
    text-decoration: none;
    color: var(--color-main-text);
    display: block;
    line-height: 1.15;
    margin-bottom: 12px;
}

.sidebar-name .name-first {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
}

.sidebar-name .name-last {
    display: block;
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--color-sub-text);
}

.sidebar-tagline {
    font-size: 12px;
    color: var(--color-body-text);
    line-height: 1.6;
    margin-bottom: 36px;
    letter-spacing: 0.2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--color-sub-text);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 6px 0;
    transition: color 0.2s ease;
    position: relative;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--color-main-text);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-main-text);
}

.sidebar-customize {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-sub-text);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.sidebar-customize:hover {
    color: var(--color-main-text);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    min-width: 0;
}

/* ============================================
   PROJECT LIST
   ============================================ */

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--color-borders);
    border-left: 1px solid var(--color-borders);
}

.project-card:nth-child(odd) {
    border-left: none;
}

.project-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-borders);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0.92;
}

.project-card:hover .project-card-image img {
    transform: scale(1.04);
    opacity: 1;
}

.project-card-label {
    padding: 18px 24px 20px;
    border-top: 1px solid var(--color-borders);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.project-card-title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
    color: var(--color-main-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-desc {
    font-size: 11px;
    color: var(--color-sub-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    flex-shrink: 0;
}

/* ============================================
   PROJECT DETAIL
   ============================================ */

.detail-wrap {
    padding: 50px 60px;
}

.back-link {
    display: inline-block;
    color: var(--color-sub-text);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 40px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--color-main-text);
}

.project-header {
    margin-bottom: 50px;
}

.project-header h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--color-main-text);
}

.project-header p {
    font-size: 14px;
    color: var(--color-body-text);
    line-height: 1.7;
    max-width: 600px;
}

#slideshow {
    position: relative;
    width: 100%;
}

.slides {
    position: relative;
    width: 100%;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slides img {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.slides img:first-child {
    position: relative !important;
    display: block !important;
}

.slides img:not(:first-child) {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.slideshow-nav {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    padding-bottom: 40px;
}

#prev, #next {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-borders);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#prev:hover, #next:hover {
    border-color: var(--color-main-text);
    background: var(--color-main-text);
}

#prev:hover::before { color: var(--color-main-text-reverse); }
#next:hover::before { color: var(--color-main-text-reverse); }

#prev::before {
    content: '‹';
    color: var(--color-main-text);
    font-size: 20px;
    line-height: 1;
}

#next::before {
    content: '›';
    color: var(--color-main-text);
    font-size: 20px;
    line-height: 1;
}

#bullets {
    display: flex;
    gap: 6px;
    align-items: center;
}

#bullets a {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-borders);
    border: none;
    transition: all 0.2s ease;
    font-size: 0;
    text-indent: -9999px;
    overflow: hidden;
}

#bullets a:hover {
    background: var(--color-sub-text);
}

#bullets a.activeSlide {
    background: var(--color-main-text);
    width: 20px;
    border-radius: 3px;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-wrap {
    padding: 50px 60px;
    max-width: 860px;
}

.about-header {
    margin-bottom: 50px;
}

.about-header h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    color: var(--color-main-text);
}

.about-body {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.about-photo img {
    max-width: 340px;
    width: 100%;
    display: block;
}

.about-bio {
    font-size: 15px;
    line-height: 1.75;
    color: var(--color-body-text);
    margin-bottom: 36px;
}

.about-meta {
    border-top: 1px solid var(--color-borders);
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.meta-row {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--color-body-text);
    align-items: baseline;
}

.meta-label {
    min-width: 80px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-sub-text);
    flex-shrink: 0;
}

.meta-row a {
    color: var(--color-main-text);
    text-decoration: none;
}

.meta-row a:hover {
    color: var(--color-sub-text);
}

/* ============================================
   LIGHTBOX
   ============================================ */

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

#overlay.show { display: block; opacity: 1; }

.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.show { display: flex; }

.lightbox .image {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox .image img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox .info {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

.close-lightbox {
    position: fixed;
    top: 24px; right: 24px;
    z-index: 9999;
    width: 44px; height: 44px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.4);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-lightbox.show { display: flex; }
.close-lightbox:hover { border-color: rgba(255,255,255,0.7); }

.close-lightbox::before,
.close-lightbox::after {
    content: '';
    position: absolute;
    width: 18px; height: 1px;
    background: #fff;
}

.close-lightbox::before { transform: rotate(45deg); }
.close-lightbox::after { transform: rotate(-45deg); }

/* ============================================
   PASSWORD PROTECTION
   ============================================ */

#enter-password {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: var(--color-background);
    border: 1px solid var(--color-borders);
    padding: 50px 40px;
    max-width: 380px;
    width: 90%;
}

#enter-password h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--color-main-text);
}

#enter-password input {
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid var(--color-borders);
    color: var(--color-main-text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    margin-bottom: 16px;
}

#enter-password input:focus {
    outline: none;
    border-color: var(--color-main-text);
}

#enter-password button {
    width: 100%;
    padding: 13px;
    background: var(--color-main-text);
    border: none;
    color: var(--color-main-text-reverse);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#enter-password button:hover { opacity: 0.8; }

#password-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
    .horizon-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: unset;
        height: auto;
        min-height: unset;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--color-borders);
    }

    .sidebar-inner {
        padding: 28px 20px 24px;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 20px;
        margin-top: 16px;
    }

    .sidebar-nav a.active::before {
        display: none;
    }

    .sidebar-customize {
        display: none;
    }

    .project-list {
        grid-template-columns: 1fr;
    }

    .project-card {
        border-left: none;
    }

    .detail-wrap,
    .about-wrap {
        padding: 28px 20px;
    }

    .about-photo img {
        max-width: 100%;
    }
}

@media (min-width: 769px) {
    .about-body {
        flex-direction: row;
        align-items: flex-start;
    }

    .about-photo {
        flex-shrink: 0;
    }
}

@media (min-width: 1200px) {
    .project-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
