/* ============================================
   SOJU PORTFOLIO - DARK MODE PARALLAX
   Modern Portfolio with WebP Scroll Animation
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Background Colors */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --bg-card: #161618;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #9a9a9f;
    --text-muted: #6b6b70;

    /* Accent Colors - Orange/Warm (matching the image lighting) */
    --accent-primary: #ff6b35;
    --accent-secondary: #ff8f5a;
    --accent-glow: rgba(255, 107, 53, 0.3);

    /* Cool Accent (from blue tones in image) */
    --cool-accent: #4a90d9;
    --cool-glow: rgba(74, 144, 217, 0.2);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 48px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.1s ease-out;
}

.loader-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: transparent;
    transition: background var(--transition-normal), backdrop-filter var(--transition-normal);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-weight: 600;
    font-size: 1.1rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    left: 0;
    transition: var(--transition-fast);
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

.mobile-menu-btn.active .hamburger {
    background: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-btn.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    padding: 16px 20px;
    font-size: 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.mobile-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Frame Container */
.hero-frames {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: none;
    /* Basic rendering hint */
    image-rendering: -webkit-optimize-contrast;
}

.hero-frame.active {
    display: block;
}

/* Gradient Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(to right, rgba(10, 10, 11, 0.7) 0%, transparent 50%),
        linear-gradient(to top, rgba(10, 10, 11, 0.5) 0%, transparent 30%);
    pointer-events: none;
}

/* Identity Block - Left Side */
.hero-identity {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    max-width: 600px;
}

.intro-line {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.name-line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.name-line:nth-child(1) {
    animation-delay: 0.4s;
}

.name-line:nth-child(2) {
    animation-delay: 0.6s;
}


.name-line.accent {
    color: var(--accent-primary);
    text-shadow: 0 0 60px var(--accent-glow);
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 450px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    box-shadow: 0 8px 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

.scroll-indicator i {
    animation: bounce 2s ease infinite;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(8px);
    }

    60% {
        transform: translateY(4px);
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-padding) 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section-header {
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    font-family: var(--font-mono);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    max-width: 800px;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* Text Reveal Animation */
.reveal-word {
    display: inline-block;
    color: var(--text-muted);
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0.25em;
}

.reveal-word.active {
    color: var(--text-primary);
}

.reveal-word.accent {
    color: var(--accent-primary);
    font-weight: 500;
}


/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-subtle);
    transition: var(--transition-normal);
}

.skill-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 53, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.skill-category {
    font-size: 1.1rem;
    font-weight: 600;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skill-level {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.skill-bar {
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 1s ease;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.timeline {
    position: relative;
    max-width: 800px;
}

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

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

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

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
}

.timeline-item.current .timeline-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.timeline-period {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timeline-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-normal);
}

.contact-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 53, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.footer-content p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-identity {
        left: 5%;
        right: 5%;
        max-width: none;
    }

    .hero-tagline {
        max-width: none;
    }

    .section-container {
        padding: 0 20px;
    }

    .section {
        padding: 80px 0;
    }
}

@media (max-width: 600px) {
    .nav {
        padding: 16px 20px;
    }

    .hero-name {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .intro-line {
        font-size: 0.75rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .scroll-indicator {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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