/* CSS Variables for Dark Theme */
:root {
    --bg-color: #0a0a0a;
    --card-bg: #112240;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent-color: #64ffda;
    /* Cyan */
    --accent-glow: rgba(100, 255, 218, 0.1);
    --font-mono: 'Fira Code', monospace;
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Logo Loader */
.logo-loader {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
    animation: logoPulse 2s ease-in-out infinite, logoRotate 4s linear infinite;
    object-fit: cover;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-glow);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(100, 255, 218, 0.3), 0 0 80px rgba(100, 255, 218, 0.2);
    }
}

@keyframes logoRotate {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* Loading Text */
.loading-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-color);
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-bracket {
    font-size: 2rem;
    animation: bracketPulse 1.5s ease-in-out infinite;
}

#loading-message {
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes bracketPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes textGlow {

    0%,
    100% {
        text-shadow: 0 0 10px var(--accent-color);
    }

    50% {
        text-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
    }
}

/* Loading Bar */
.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(100, 255, 218, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--accent-color) 50%,
            transparent 100%);
    animation: loadingProgress 2s ease-in-out infinite;
    width: 50%;
}

@keyframes loadingProgress {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(300%);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
}

nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Scanline Effect */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 10;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(100, 255, 218, 0.03) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: fixed;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }

    100% {
        bottom: -100px;
    }
}

/* Header & Nav */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    color: var(--accent-color);
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
}

.greeting {
    color: var(--accent-color);
    font-family: var(--font-mono);
    margin-bottom: 20px;
    font-size: 1rem;
}

.hero-section h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 10px;
    color: #e6f1ff;
    position: relative;
    font-family: var(--font-sans);
    font-weight: 800;
}

.typewriter {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    height: 40px;
    /* fixed height to prevent layout shift */
}

.cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--accent-color);
    animation: blink 1s infinite;
    margin-left: 5px;
    color: var(--accent-color);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.bio-short {
    max-width: 500px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-family: var(--font-mono);
    border-radius: 4px;
    font-size: 0.9rem;
}

.cta-button:hover {
    background: var(--accent-glow);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-frame {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    /* Circle for profile */
    overflow: hidden;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: var(--transition);
}

.image-frame:hover .profile-img {
    filter: grayscale(0%);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #e6f1ff;
    font-family: var(--font-mono);
    margin-bottom: 40px;
    margin-top: 100px;
}

.section-title::after {
    content: "";
    display: block;
    width: 200px;
    height: 1px;
    background: var(--card-bg);
    margin-left: 20px;
}

/* About Section */
.about-section {
    max-width: 900px;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.skills-list li {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 4px;
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.fa-folder {
    color: var(--accent-color);
    font-size: 40px;
}

.external-link {
    color: var(--text-secondary);
    font-size: 20px;
}

.project-card:hover .external-link {
    color: var(--accent-color);
}

.project-card h3 {
    color: #e6f1ff;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: var(--font-sans);
}

.project-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section {
    text-align: center;
    max-width: 600px;
    margin-bottom: 100px;
}

.contact-content p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.contact-item i {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 24px;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

footer h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .hero-section {
        flex-direction: column-reverse;
        /* Image on top on mobile, or bottom? usually top */
        justify-content: center;
        text-align: center;
        padding-top: 120px;
    }

    .hero-content {
        margin-top: 50px;
    }

    .hero-image {
        width: 100%;
    }

    .image-frame {
        width: 200px;
        height: 200px;
    }

    .hero-section h1 {
        font-size: 3rem;
    }

    .bio-short {
        margin: 0 auto 40px auto;
    }

    .typewriter {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* simple hide for now, could add hamburger */
    }
}