/* ====================== RESET & BASE ====================== */
:root {
    /* Dark Mode (Default) */
    --bg-dark: #05060A;
    --bg-nav: rgba(5, 6, 10, 0.85);
    --bg-card: rgba(15, 20, 30, 0.45);
    --accent-blue: #00D1FF;
    --accent-kali: #2BB1FF;
    --accent-purple: #B07CFF;
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --border-glass: rgba(255, 255, 255, 0.12);
    --font-main: 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --glass-blur: blur(16px);
}

[data-theme="light"] {
    --bg-dark: #F8FAFC;
    --bg-nav: rgba(248, 250, 252, 0.85);
    --bg-card: rgba(255, 255, 255, 0.7);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --border-glass: rgba(15, 23, 42, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    cursor: default; 
    transition: background 0.3s ease, color 0.3s ease;
}

/* ====================== CUSTOM CURSOR (MINIMAL) ====================== */
.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--accent-blue);
}

.cursor-ring {
    width: 35px;
    height: 35px;
    border: 1.5px solid var(--accent-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s, background-color 0.2s;
}

.cursor-ring.hover {
    width: 55px;
    height: 55px;
    background-color: rgba(0, 209, 255, 0.1);
    border-color: var(--accent-purple);
}

/* ====================== DYNAMIC BACKGROUND ====================== */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    background: 
        radial-gradient(circle at 85% 15%, rgba(0, 209, 255, 0.18), transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(176, 124, 255, 0.18), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(0, 209, 255, 0.08), transparent 65%);
    filter: blur(80px);
    animation: mesh-float 22s infinite alternate ease-in-out;
}

@keyframes mesh-float {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.15) translate(3%, 3%); }
    100% { transform: scale(1) translate(-3%, -3%); }
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.bg-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    opacity: 0.4;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.container {
    width: 90%;
    max-width: 1250px;
    margin: auto;
}

/* ====================== HEADER / NAVBAR ====================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-nav);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass);
    z-index: 999;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-blue);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    text-decoration: none;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links li a:hover {
    color: var(--accent-blue);
    text-shadow: 0 0 8px var(--accent-blue);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 18px;
}

.theme-toggle:hover {
    color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.1);
}

.lang-switcher {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.3s;
}

.lang-btn:hover { color: var(--accent-blue); }
.lang-btn.active {
    background: var(--accent-blue);
    color: #000;
}

/* ====================== HERO SECTION ====================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 70px;
    align-items: center;
}

.hero-text h1 {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 25px;
}

.hero-text h1 span {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn-primary {
    padding: 16px 36px;
    background: var(--accent-blue);
    color: #000;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.35s;
}

.btn-secondary {
    padding: 16px 36px;
    border: 1.5px solid var(--accent-blue);
    background: rgba(0, 209, 255, 0.05);
    color: var(--accent-blue);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover { 
    transform: translateY(-4px); 
    background: var(--accent-blue);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 209, 255, 0.4);
}

/* Engineering-Style CV Button */
.engineering-btn {
    background: linear-gradient(135deg, #00D1FF, #0077FF) !important;
    color: #FFF !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 209, 255, 0.3);
}

.engineering-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.engineering-btn:hover::after {
    left: 100%;
}

/* Interactive Dual Image Profile */
.img-tilt-container {
    perspective: 1000px;
    width: 100%;
    position: relative;
}

.img-layer {
    width: 100%;
    border-radius: 24px;
    border: 1.5px solid var(--border-glass);
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.img-primary {
    display: block;
    width: 100%;
    transition: opacity 0.5s ease;
}

.img-secondary {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.img-tilt-container:hover .img-secondary { opacity: 1; }
.img-tilt-container:hover .img-primary { opacity: 0; }

/* Linux-Style Terminal Widget */
.terminal-widget {
    background: #0D0D0D;
    border: 1.5px solid var(--border-glass);
    border-radius: 12px;
    padding: 20px;
    font-family: var(--font-mono);
    box-shadow: 0 35px 70px rgba(0,0,0,0.7);
}

.terminal-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.terminal-title {
    font-size: 11px;
    color: #666;
    margin-left: 5px;
}

.terminal-body {
    font-size: 13px;
    line-height: 1.5;
}

.prompt {
    color: var(--accent-blue);
    margin-right: 8px;
}

.term-out {
    color: #FFF;
    margin-bottom: 12px;
}

/* ====================== BENTO GRID ====================== */
section { padding: 120px 0; }
.section-title { font-size: 42px; font-weight: 700; margin-bottom: 12px; }
.section-subtitle { font-size: 13px; color: var(--accent-blue); font-family: var(--font-mono); text-transform: uppercase; margin-bottom: 60px; letter-spacing: 3px; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 28px;
}

.bento-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--border-glass);
    border-radius: 20px;
    padding: 35px;
    transition: 0.4s ease;
}

.bento-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-8px);
}

.card-icon { font-size: 36px; margin-bottom: 24px; color: var(--accent-blue); }
.bento-card h3 { font-size: 22px; margin-bottom: 15px; }
.bento-card p { font-size: 15px; color: var(--text-secondary); }

.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.badge { display: inline-block; padding: 5px 12px; background: rgba(0, 209, 255, 0.15); color: var(--accent-blue); font-family: var(--font-mono); font-size: 11px; border-radius: 6px; margin-bottom: 18px; }
.tech-tag { display: inline-block; font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); margin-right: 10px; margin-top: 15px; padding: 2px 8px; background: rgba(255, 255, 255, 0.05); border-radius: 4px; }

/* ====================== SKILLS TABS ====================== */
.skills-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.skill-tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-tab-btn:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(0, 209, 255, 0.05);
}

.skill-tab-btn.active {
    background: var(--accent-blue);
    color: #000;
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(0, 209, 255, 0.3);
}

.skills-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.skills-container.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .skills-tabs {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ====================== VLOGS GALLERY ====================== */
.vlog-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.vlog-media-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.vlog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.vlog-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: rgba(0, 209, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    opacity: 0;
    transition: 0.3s ease;
    z-index: 2;
}

.vlog-card:hover .vlog-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.vlog-card:hover .vlog-img {
    transform: scale(1.1);
}

.vlog-content {
    padding: 25px;
    background: linear-gradient(to top, var(--bg-card), transparent);
}

/* ====================== VIDEO MODAL ====================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 80%;
    max-width: 900px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

#modal-video {
    width: 100%;
    display: block;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--accent-blue);
}

/* ====================== CONTACT ====================== */
.contact-wrapper {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 2px solid var(--border-glass);
    border-radius: 28px;
    padding: 70px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 70px;
}

.contact-info h2 { font-size: 48px; margin-bottom: 25px; }
.contact-form form { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-form .full { grid-column: span 2; }
input, textarea { background: rgba(255,255,255,0.06); border: 1.5px solid var(--border-glass); border-radius: 14px; padding: 18px; color: var(--text-primary); width: 100%; transition: 0.3s; }
input:focus, textarea:focus { outline: none; border-color: var(--accent-blue); background: rgba(255,255,255,0.1); }
.btn-send { padding: 18px; background: var(--accent-blue); color: #000; font-weight: 700; border: none; border-radius: 14px; cursor: pointer; transition: 0.3s; font-size: 16px; }

/* ====================== FOOTER ====================== */
footer { padding: 70px 0; border-top: 1.5px solid var(--border-glass); text-align: center; color: var(--text-secondary); }

/* ====================== PROJECT MODAL ENHANCEMENTS ====================== */
.project-modal-content {
    background: var(--bg-dark);
    max-height: 90vh;
    overflow-y: auto;
    padding: 60px 40px;
    border: 2px solid var(--border-glass);
    box-shadow: 0 0 50px rgba(0, 209, 255, 0.1);
}

.cv-modal-content {
    background: var(--bg-dark);
    max-width: 560px;
    padding: 40px;
    border: 2px solid var(--border-glass);
    box-shadow: 0 0 50px rgba(0, 209, 255, 0.1);
}

.cv-modal-body {
    color: var(--text-primary);
}

.cv-modal-copy {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.8;
}

.cv-modal-body form {
    display: grid;
    gap: 16px;
}

.cv-modal-body input {
    width: 100%;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 15px;
}

.cv-modal-body input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 209, 255, 0.08);
}

.cv-submit-btn {
    justify-content: center;
    border: none;
    cursor: pointer;
}

.cv-form-feedback {
    margin-bottom: 16px;
    color: #00FF88;
    font-weight: 600;
}

.cv-form-feedback-error {
    color: #ff6b6b;
}

.modal-title { font-size: 36px; margin-bottom: 20px; color: var(--accent-blue); }
.modal-desc { font-size: 18px; color: var(--text-secondary); margin-bottom: 40px; line-height: 1.8; }

.modal-info-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.modal-features h3, .modal-tech h3 { 
    font-size: 14px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--accent-purple); 
    margin-bottom: 25px; 
}

.modal-features ul { list-style: none; }
.modal-features li { 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: var(--text-secondary);
    font-size: 15px;
}

.modal-features li i { color: var(--accent-blue); font-size: 14px; }

.modal-tech .tech-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.modal-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 30px;
    display: flex;
    justify-content: flex-start;
}

/* ====================== RESPONSIVE ====================== */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 1100px) { 
    .hero-text h1 { font-size: 58px; } 
    .bento-grid { grid-template-columns: repeat(2, 1fr); } 
    .span-4, .span-2 { grid-column: span 2; } 
}

@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-visual { order: -1; } /* Put terminal/image above text on mobile */
    
    .mobile-menu-toggle { display: block; }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-nav);
        backdrop-filter: var(--glass-blur);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: 0.4s;
        z-index: 998;
    }
    
    .nav-links.active { left: 0; }
    
    .contact-wrapper { grid-template-columns: 1fr; padding: 40px; gap: 40px; }

    .modal-info-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 768px) {
    .hero-text h1 { font-size: 42px; }
    .section-title { font-size: 32px; }
    .bento-grid { grid-template-columns: 1fr; }
    .span-2, .span-4 { grid-column: span 1; }
    
    .contact-form form { grid-template-columns: 1fr; }
    .contact-form .full { grid-column: span 1; }
    
    .hero { padding-top: 80px; }
    .container { width: 92%; }

    .project-modal-content { padding: 40px 20px; width: 95%; }
    .modal-title { font-size: 28px; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 34px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
    .cursor-dot, .cursor-ring { display: none; } /* Disable custom cursor on touch devices */
    
    .terminal-widget { padding: 15px; font-size: 11px; }
    .terminal-body { font-size: 11px; }
}
