/* ========================================
   Dark Minimal Personal Website CSS
   ======================================== */

:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #111118;
    --text-primary: #e0e0e0;
    --text-secondary: #555560;
    --accent: #c896ff;
    --border: #1a1a24;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 150, 255, 0.15);
}

/* ========================================
   Landing Page
   ======================================== */

.landing {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
    z-index: 10;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.landing h1 {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
}

.landing h1 .en {
    display: block;
    font-size: clamp(14px, 2vw, 22px);
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-top: 12px;
    text-transform: uppercase;
}

.landing-nav {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.7s;
}

.landing-nav a {
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.landing-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--text-secondary);
    transition: width 0.3s ease;
}

.landing-nav a:hover {
    color: var(--text-primary);
}

.landing-nav a:hover::after {
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing.leave-up {
    transform: translateY(-100vh);
}

.landing.leave-down {
    transform: translateY(100vh);
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    min-height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.main-content.visible {
    opacity: 1;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    background: transparent;
    transition: background 0.3s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
}

.nav-logo {
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

/* Back button */
.back-btn {
    position: fixed;
    top: 20px;
    left: 40px;
    z-index: 200;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 12px 0;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--text-primary);
}

/* ========================================
   Resume Page
   ======================================== */

.resume-page {
    padding: 120px 40px 80px;
    max-width: 900px;
    margin: 0 auto;
}

.resume-page h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.resume-page .subtitle {
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 60px;
}

.resume-page .contact-line {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 80px;
}

.section-title {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.timeline {
    position: relative;
    margin-bottom: 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--text-secondary);
}

.timeline-item .date {
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timeline-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item .role {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.timeline-item p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(224, 224, 224, 0.7);
}

.timeline-item ul {
    list-style: none;
    margin-top: 12px;
}

.timeline-item li {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(224, 224, 224, 0.6);
    padding-left: 16px;
    position: relative;
}

.timeline-item li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* ========================================
   Portfolio Grid
   ======================================== */

.portfolio-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.portfolio-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portfolio-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-align: center;
}

.portfolio-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portfolio-images img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.portfolio-images img:hover {
    transform: scale(1.01);
}

/* ========================================
   Works Page
   ======================================== */

.works-page {
    padding: 120px 40px 80px;
}

.works-page h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    text-align: center;
}

.works-page .subtitle {
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 80px;
}

.works-list {
    max-width: 1000px;
    margin: 0 auto;
}

.works-list .item {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.works-list .item:last-child {
    border-bottom: none;
}

.works-list .item-info h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.works-list .item-info .meta {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.works-list .item-info p {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(224, 224, 224, 0.6);
}

.works-list .item-image {
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.works-list .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.works-list .item:hover .item-image img {
    transform: scale(1.03);
}

/* ========================================
   Gallery Modal
   ======================================== */

.gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 8px;
    line-height: 1;
}
.gallery-close:hover { color: #fff; }

.gallery-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 120px);
}

.gallery-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
    width: 100%;
}

.gallery-btn {
    background: none;
    border: 1px solid #333;
    color: #888;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-btn:hover {
    border-color: #888;
    color: #fff;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
}
.gallery-dot.active {
    background: var(--accent);
}
.gallery-dot:hover {
    background: #666;
}

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

@media (max-width: 768px) {
    .nav {
        padding: 0 24px;
    }

    .nav-links {
        display: none;
    }

    .back-btn {
        left: 24px;
    }

    .resume-page,
    .works-page {
        padding: 100px 24px 60px;
    }

    .resume-page h1,
    .works-page h1 {
        font-size: 36px;
    }

    .works-list .item {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0;
    }

    .landing-nav {
        margin-top: 60px;
    }
}