/* ===== CSS VARIABLES ===== */
:root {
    --bg-light: #f9f8f6;
    --text-light: #0a0a0a;
    --bg-dark: #0a0a0a;
    --text-dark: #e8e8e8;
    --accent-blue: #0066cc;
    --accent-orange: #ff6b35;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
}

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

body {
    font-family: 'Victor Mono', monospace;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: default;
}

body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* Grid Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
}

body.dark-mode::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    z-index: 9998;
    opacity: 0;
}

body.light-mode .cursor-glow {
    background: radial-gradient(circle, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
}

/* ===== TOP BLUR BAR ===== */
.top-blur-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(249, 248, 246, 0.7);
    z-index: 9997;
    pointer-events: none;
}

body.dark-mode .top-blur-bar {
    background: rgba(10, 10, 10, 0.7);
}

/* ===== RESUME BUTTON ===== */
.resume-button {
    position: fixed !important;
    top: 30px;
    left: 30px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: rgba(0, 102, 204, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 50px;
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer !important;
    will-change: auto;
}

.resume-button:hover {
    background: rgba(0, 102, 204, 0.2);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.resume-icon {
    font-size: 1.1rem;
}

.resume-text {
    font-family: 'Victor Mono', monospace;
}

/* ===== LIGHT SWITCH ===== */
.light-switch {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
    cursor: pointer;
}

.switch-string {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, #666, #999);
    margin: 0 auto;
    position: relative;
    transform-origin: top center;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.switch-pull {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #888, #aaa);
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

.light-switch:hover .switch-pull {
    transform: scale(1.1);
}

.light-switch.pulled .switch-string {
    transform: rotate(15deg);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    padding: 1.5rem 3rem;
    z-index: 9999;
    opacity: 0;
    animation: fadeInNav 0.5s ease forwards 3s;
    background: transparent;
}

body.dark-mode .navbar {
    background: transparent;
}

.navbar a {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.navbar a:hover::after {
    width: 100%;
}

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

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

.typing-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-text {
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 600;
    font-style: italic;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: currentColor;
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeInOut 2s ease-in-out infinite 4s;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.6; transform: translateY(-10px); }
}

/* ===== CONTENT SECTION ===== */
.content-section {
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

.greeting {
    margin-bottom: 2rem;
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

.content-section.visible .greeting {
    animation: slideUp 0.6s ease forwards 0.2s;
}

.greeting h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
}

.highlight {
    color: var(--accent-blue);
    position: relative;
}

.bio {
    margin-bottom: 3rem;
    line-height: 1.8;
    font-size: 1.1rem;
    opacity: 0;
}

.content-section.visible .bio {
    animation: slideUp 0.6s ease forwards 0.4s;
}

.bio p {
    margin-bottom: 1rem;
}

.bio strong {
    color: var(--accent-blue);
    font-weight: 600;
}

/* ===== INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    opacity: 0;
}

.content-section.visible .info-grid {
    animation: slideUp 0.6s ease forwards 0.6s;
}

.info-card {
    padding: 2rem;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(0, 102, 204, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .info-card {
    background: rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.2);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-mode .info-card li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.info-card li:last-child {
    border-bottom: none;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-links a {
    color: inherit;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-links a:hover {
    color: var(--accent-blue);
    transform: translateX(8px);
}

.contact-icon {
    font-size: 1.3rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.contact-links a:hover .contact-icon {
    transform: scale(1.2);
}

/* ===== CTA SECTION ===== */
.cta-section {
    text-align: center;
    opacity: 0;
}

.content-section.visible .cta-section {
    animation: slideUp 0.6s ease forwards 0.8s;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.4);
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FOOTER ===== */
.page-footer {
    text-align: center;
    padding: 3rem 2rem 2rem;
    opacity: 0.7;
}

.footer-text {
    font-size: 0.9rem;
}

.footer-text a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-text a:hover {
    opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .top-blur-bar {
        height: 110px;
    }

    .navbar {
        gap: 1rem;
        padding: 0.7rem 1.5rem;
        font-size: 0.8rem;
        top: 55px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
    }

    .content-section {
        padding: 6.5rem 1.5rem 3rem;
    }

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

    .resume-button {
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .resume-icon {
        font-size: 0.9rem;
    }

    .light-switch {
        top: 15px;
        right: 15px;
        transform: scale(0.85);
    }
}

@media (max-width: 480px) {
    .top-blur-bar {
        height: 100px;
    }

    .navbar {
        gap: 0.5rem;
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
        top: 50px;
        white-space: nowrap;
    }

    .typing-text {
        font-size: 2rem;
    }

    .resume-button {
        top: 12px;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    .resume-icon {
        font-size: 0.8rem;
    }

    .light-switch {
        top: 12px;
        right: 12px;
        transform: scale(0.75);
    }
}
