/* --- VARIABLES --- */
:root {
    --bg-dark: #0a0f1c;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --gradient-main: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.2);
    --blur-strength: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* --- BACKGROUND GLOW --- */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    will-change: transform;
    transform: translateZ(0);
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-purple);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-blue);
    bottom: -100px;
    right: -100px;
}

/* --- UTILITIES --- */
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.invert-icon { filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%); }

.highlight {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- UNIFIED NAVIGATION --- */
#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 5%;
    background: rgba(10, 15, 28, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: var(--border-glass);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.nav-btn {
    padding: 0.6rem 1.8rem;
    border: 1px solid var(--primary-blue);
    border-radius: 50px;
    color: var(--primary-blue) !important;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--primary-blue);
    color: white !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* Mobile Controls */
.hamburger-icon { display: none; flex-direction: column; justify-content: space-between; height: 24px; width: 30px; cursor: pointer; z-index: 201; }
.hamburger-icon span { width: 100%; height: 3px; background-color: white; transition: all 0.3s ease; border-radius: 2px;}

.mobile-menu {
    position: absolute;
    top: 100%;
    right: 5%;
    width: 250px;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: var(--border-glass);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.hamburger-icon.open span:first-child { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-icon.open span:nth-child(2) { opacity: 0; }
.hamburger-icon.open span:last-child { transform: rotate(-45deg) translate(5px, -5px); }

/* --- SECTIONS --- */
section {
    padding: 8rem 10%;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: var(--border-glass);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    transition: transform 0.3s ease, border-color 0.3s ease;
    will-change: transform, opacity;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
}

/* --- HERO (TERMINAL STYLE) --- */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 50px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 1200px;
    width: 100%;
}

.terminal-wrapper {
    flex: 1;
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    backdrop-filter: blur(10px);
    will-change: transform, opacity;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
    margin-left: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #8b949e;
}

.terminal-body {
    padding: 2rem;
    font-family: 'Fira Code', monospace;
}

.code-line {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #e6edf3;
}
.indent { margin-left: 2rem; }
.indent-2 { margin-left: 4rem; }

.keyword { color: #ff7b72; } 
.class-name { color: #d2a8ff; font-weight: bold; } 
.function { color: #d2a8ff; } 
.variable { color: #79c0ff; } 
.string { color: #a5d6ff; } 

#typed-output::after {
    content: '|';
    color: #ae00ff;
    animation: blink 1s infinite;
    margin-left: 0;
}

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

.hero-intro {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-family: 'Outfit', sans-serif;
}

.title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.description { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; }

.hero-img-container { flex-shrink: 0; will-change: transform, opacity; }
.img-wrapper {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 6px;
    background: var(--gradient-main);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.img-wrapper:hover img { filter: grayscale(0%); }

.btn-container { display: flex; gap: 1rem; }

.btn {
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-main);
    border: none;
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary-purple);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.socials { display: flex; gap: 1.5rem; margin-top: 1.5rem;}
.icon { height: 1.8rem; transition: transform 0.2s; opacity: 0.7; }
.icon:hover { transform: scale(1.2); opacity: 1; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-card, .about-text { padding: 2.5rem; }
.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.about-text { font-size: 1.15rem; color: var(--text-muted); line-height: 1.8; }
.card-icon { height: 3rem; margin-bottom: 1rem; }

.skills-container { max-width: 900px; margin: 0 auto; padding: 4rem; }
.skill-category h3 { text-align: center; margin-bottom: 2.5rem; color: var(--text-main); }
.skill-list { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }

.skill-badge { 
    display: flex; 
    gap: 1rem; 
    align-items: center; 
    padding: 1rem 1.5rem; 
    background: rgba(255,255,255,0.02); 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.05); 
    transition: all 0.3s ease; 
}

.skill-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary-blue);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.check-icon { 
    height: 1.5rem; 
    width: auto;
    opacity: 0.7; 
}

.projects-grid { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }

.project-card { 
    width: 350px; 
    padding: 1.5rem;
    overflow: hidden;
}

.project-img-wrapper {
    height: 200px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex; 
    justify-content: center; 
    align-items: center;
    overflow: hidden;
}

.project-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.project-card:hover .project-img { transform: scale(1.1); }
.project-info h3 { margin-bottom: 0.5rem; }
.project-info p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }

.project-buttons { display: flex; gap: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.contact-wrapper {
    display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; padding: 3rem; max-width: 900px; margin: 0 auto;
}
.contact-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.2rem 2rem; border-radius: 50px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.contact-item:hover { background: rgba(59, 130, 246, 0.1); border-color: var(--primary-blue); transform: translateY(-3px); }

footer { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 0.9rem; border-top: var(--border-glass); margin-top: 6rem; background: rgba(0,0,0,0.2); }

#downloads-hero {
    padding: 6rem 2rem 2rem 2rem;
    display: flex;
    justify-content: center;
}

#downloads-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 800px;
    gap: 1.5rem;
    margin: 0 auto;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
}

#projects-grid {
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.project-card-large {
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.project-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-img-large {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.5s ease;
}

.project-card-large:hover .project-img-large {
    transform: scale(1.05);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.project-title-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
}

.project-category {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.project-description p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.tech-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-purple);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.project-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-start;
}

.project-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

#download-info {
    padding: 4rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.info-details-container {
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.info-article-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.info-article {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: auto;
    min-width: 200px;
    justify-content: center;
    padding: 1.2rem;
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.info-article:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

.info-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.info-article h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0 0 0.2rem 0;
    font-weight: 600;
}

.info-article p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* --- GLOBAL RESPONSIVE MEDIA QUERIES --- */
@media screen and (max-width: 1024px) {
    .nav-links { display: none; }
    .hamburger-icon { display: flex; }
    
    .hero-content { gap: 2rem; }
    .terminal-wrapper { margin-right: 0; }
    section { padding: 6rem 5%; }
}

@media screen and (max-width: 900px) {
    .hero-content { flex-direction: column-reverse; gap: 3rem; text-align: center;}
    .terminal-wrapper { width: 100%; text-align: left; }
    .hero-intro { text-align: center; }
    .btn-container { justify-content: center; }
    .code-line { font-size: 0.9rem; }
    
    .about-grid { grid-template-columns: 1fr; }

    .project-card_large {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
        text-align: center;
    }

    .project-info {
        text-align: center;
        align-items: center;
    }
    
    .project-actions {
        justify-content: center;
        width: 100%;
        flex-direction: column;
    }
    
    .project-btn-large {
        width: 100%;
    }

    .tech-tags {
        justify-content: center;
    }

    .info-article-container {
        flex-direction: column;
        width: 100%;
    }

    .info-article {
        width: 100%;
        justify-content: flex-start;
        padding-left: 2rem;
    }
}

@media screen and (max-width: 600px) {
    .section-title { font-size: 2.2rem; }
    .title { font-size: 2.5rem; }
    .contact-wrapper { flex-direction: column; width: 100%; }
    .contact-item { width: 100%; justify-content: center; }
    .btn { width: 100%; justify-content: center; }
    .btn-container { flex-direction: column; }
    
    .terminal-body { padding: 1.5rem; }
    .indent-2 { margin-left: 2rem; }
}

/* Ensure images have intrinsic aspect ratio to prevent CLS */
.img-wrapper img { aspect-ratio: 1 / 1; }

@media (max-width: 768px) {
    .glow-orb { filter: blur(40px); opacity: 0.3; }
    .img-wrapper { box-shadow: 0 0 20px rgba(139, 92, 246, 0.15); }
    .hero-content { gap: 1.5rem; }
    .glass-card { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
