/* ===== RESET & VARIABLES ===== */
:root {
    /* Light Theme */
    --color-bg: #0a0a0a;
    --color-surface: #111111;
    --color-surface-alt: #1a1a1a;
    --color-text: #f0f0f0;
    --color-text-secondary: #aaaaaa;
    --color-text-tertiary: #666666;
    --color-accent: #ffffff;
    --color-accent-light: #e0e0e0;
    --color-border: #333333;
    --color-border-light: #444444;
    
    /* Brand Colors */
    --color-primary: #ffffff;
    --color-secondary: #888888;
    
    /* Effects */
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    
    --blur-bg: blur(20px);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography */
    --font-primary: 'Manrope', -apple-system, sans-serif;
    --font-heading: 'DM Serif Display', serif;
    --font-mono: 'Space Grotesk', monospace;
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-3xl: 3rem;
    --text-4xl: 4rem;
    --text-5xl: 5rem;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
}

/* Dark Theme (default) */
[data-theme="light"] {
    --color-bg: #f8f8f8;
    --color-surface: #ffffff;
    --color-surface-alt: #f0f0f0;
    --color-text: #222222;
    --color-text-secondary: #666666;
    --color-text-tertiary: #999999;
    --color-accent: #000000;
    --color-accent-light: #333333;
    --color-border: #e0e0e0;
    --color-border-light: #d0d0d0;
    
    --color-primary: #000000;
    --color-secondary: #666666;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    transition: background-color var(--transition-base);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-slow);
}

.loading-wave {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
    margin-bottom: var(--space-md);
}

.wave-bar {
    width: 4px;
    background: var(--color-text);
    animation: waveLoading 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 40px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 60px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 40px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 20px; animation-delay: 0.4s; }

.loading-text {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes waveLoading {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* ===== NAVIGATION ===== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    transition: all var(--transition-base);
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition-base);
    position: relative;
    padding: var(--space-xs) 0;
}

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

.nav-link.active {
    color: var(--color-text);
}

.link-num {
    font-size: var(--text-xs);
    opacity: 0.5;
}

.link-text {
    position: relative;
}

.link-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width var(--transition-base);
}

.nav-link.active .link-text::after {
    width: 100%;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    border-color: var(--color-accent);
    transform: rotate(15deg);
}

.theme-toggle i {
    position: absolute;
    transition: transform var(--transition-base), opacity var(--transition-base);
}

.theme-toggle .fa-sun {
    transform: translateY(0);
    opacity: 1;
}

.theme-toggle .fa-moon {
    transform: translateY(100%);
    opacity: 0;
}

[data-theme="light"] .theme-toggle .fa-sun {
    transform: translateY(-100%);
    opacity: 0;
}

[data-theme="light"] .theme-toggle .fa-moon {
    transform: translateY(0);
    opacity: 1;
}

/* ===== HOME SECTION ===== */
.home-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

/* Running Text */
.running-text-container {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: right center;
    z-index: 2;
    opacity: 0.3;
    overflow: hidden;
    width: 100vh;
    height: 100px;
    pointer-events: none;
}

.running-text {
    display: inline-block;
    white-space: nowrap;
    animation: runningText 30s linear infinite;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text);
    letter-spacing: 8px;
    text-transform: uppercase;
}

@keyframes runningText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.home-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: var(--space-xl);
}

/* Main Title */
.main-title {
    margin-bottom: var(--space-2xl);
}

.title-primary {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: var(--space-sm);
    position: relative;
}

.title-primary::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: var(--color-text);
    opacity: 0.3;
}

.title-secondary {
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.secondary-line {
    display: inline-block;
    position: relative;
}

/* Social Container */
.social-container {
    margin-bottom: var(--space-2xl);
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    max-width: 600px;
    margin: 0 auto;
}

.social-btn {
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.social-btn:hover::before {
    opacity: 0.1;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-text);
    animation: scrollDot 2s ease-in-out infinite;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes scrollDot {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(300%);
        opacity: 0;
    }
}

/* ===== SECTIONS COMMON ===== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

.section-header {
    margin-bottom: var(--space-xl);
}

.section-num {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 400;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.section-desc {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 600px;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: var(--color-surface);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.text-block h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 400;
    margin-bottom: var(--space-sm);
    position: relative;
}

.text-block h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 1px;
    background: var(--color-text);
    opacity: 0.3;
}

.text-block p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.about-visual {
    position: relative;
}

.visual-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: linear-gradient(45deg, 
        var(--color-bg) 0%,
        var(--color-surface-alt) 50%,
        var(--color-bg) 100%);
}

.abstract-shape {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape-layer {
    position: absolute;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    animation: floatShape 20s infinite linear;
    opacity: 0.2;
}

.shape-layer:nth-child(1) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-layer:nth-child(2) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation-delay: -5s;
}

.shape-layer:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 50%;
    }
    25% {
        transform: translate(10px, 10px) rotate(90deg);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    50% {
        transform: translate(-5px, 15px) rotate(180deg);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    75% {
        transform: translate(15px, -5px) rotate(270deg);
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.8) 0%,
        transparent 100%);
}

.overlay-text h4 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    margin-bottom: 4px;
}

.overlay-text p {
    font-size: var(--text-sm);
    opacity: 0.8;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.contact-content {
    margin-top: var(--space-xl);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.info-card {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.info-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    font-size: var(--text-lg);
    color: var(--color-accent);
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.email-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--text-base);
    margin-bottom: var(--space-sm);
    transition: color var(--transition-base);
}

.email-link:hover {
    color: var(--color-accent);
}

.copy-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    transition: all var(--transition-base);
}

.copy-btn:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
}

.status-text {
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.card-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.contact-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--space-lg);
}

.note-icon {
    flex-shrink: 0;
    color: var(--color-accent);
    font-size: var(--text-lg);
}

.contact-note p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-xl) var(--space-lg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 400;
    letter-spacing: 0.1em;
}

.footer-tagline {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: var(--space-xs);
}

.footer-right {
    text-align: right;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copyright {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 2rem;
        --space-xl: 3rem;
        --space-2xl: 4rem;
    }
    
    .main-nav {
        padding: var(--space-sm) var(--space-md);
    }
    
    .nav-links {
        gap: var(--space-md);
    }
    
    .running-text-container {
        display: none;
    }
    
    .section-container {
        padding: var(--space-xl) var(--space-md);
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .footer-right {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title-primary {
        font-size: clamp(3rem, 10vw, 4rem);
    }
    
    .title-secondary {
        font-size: var(--text-base);
    }
    
    .social-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}