/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #e0e0e0;
    --transition-speed: 0.3s;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-video.loaded {
    opacity: 1;
}

/* 영상 없을 때 Fallback 배경 */
.hero-video-container.no-video {
    background: linear-gradient(
        135deg,
        #0a0a0a 0%,
        #1a1a2e 25%,
        #16213e 50%,
        #0f0f23 75%,
        #0a0a0a 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.3) 0%,
        rgba(10, 10, 10, 0.5) 50%,
        rgba(10, 10, 10, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    margin-top: 35vh;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    40% {
        transform: rotate(45deg) translateY(10px);
    }
    60% {
        transform: rotate(45deg) translateY(5px);
    }
}

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

/* ===== Portfolio Sections ===== */
.portfolio-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    background-color: var(--bg-primary);
}

.portfolio-section:nth-child(even) {
    background-color: var(--bg-secondary);
}

.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.section-description {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--bg-secondary);
    padding: 60px 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.footer-contact h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-contact a {
    color: var(--text-primary);
    font-size: 1rem;
    transition: color var(--transition-speed);
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .portfolio-section {
        padding: 60px 20px;
    }

    .section-description {
        margin-bottom: 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title {
        letter-spacing: 0.05em;
    }

    .hero-tagline {
        letter-spacing: 0.15em;
    }

    .scroll-indicator {
        bottom: 30px;
    }

    .scroll-arrow {
        width: 24px;
        height: 24px;
    }

    .portfolio-section {
        min-height: auto;
        padding: 60px 15px;
    }

    .section-content {
        padding: 0;
    }

    .video-container {
        border-radius: 4px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-tagline {
        letter-spacing: 0.1em;
    }

    .section-title {
        letter-spacing: 0.02em;
    }

    .section-description {
        letter-spacing: 0.05em;
        padding: 0 10px;
    }
}

/* ===== Utility Classes ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
