@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #080b11;
    --bg-darker: #04060b;
    --card-bg: rgba(13, 19, 31, 0.6);
    --card-bg-hover: rgba(20, 30, 48, 0.85);
    --border: rgba(56, 189, 248, 0.15);
    --border-hover: rgba(56, 189, 248, 0.45);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Neon Tech Accents */
    --accent-cyan: #38bdf8;
    --accent-cyan-glow: rgba(56, 189, 248, 0.3);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.3);
    --accent-violet: #a855f7;
    --accent-violet-glow: rgba(168, 85, 247, 0.3);
    --accent-amber: #f59e0b;
    --accent-amber-glow: rgba(245, 158, 11, 0.3);
    --accent-orange: #f97316;
    --accent-orange-glow: rgba(249, 115, 22, 0.3);
    --accent-rose: #f43f5e;
    --accent-rose-glow: rgba(244, 63, 94, 0.3);
    --accent-indigo: #6366f1;
    --accent-indigo-glow: rgba(99, 102, 241, 0.3);

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles & Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2);
    border-radius: 4px;
    transition: var(--transition);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-cyan-glow);
}

#card-alprgate:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-emerald-glow);
}
#card-phonebox:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-indigo-glow);
}
#card-shelly:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-cyan-glow);
}
#card-koshx:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-amber-glow);
}
#card-clock:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-emerald-glow);
}
#card-speedometer:hover {
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 rgba(6, 182, 212, 0.3);
}
#card-qbar:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-orange-glow);
}
#card-qpash:hover {
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-rose-glow);
}
#card-portfolio:hover {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px 0 var(--accent-violet-glow);
}

/* Navigation Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 11, 17, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

header.scrolled {
    padding: 10px 0;
    background: rgba(4, 6, 11, 0.85);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.logo svg {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px var(--accent-cyan-glow));
    transition: var(--transition);
}

.logo:hover svg {
    transform: rotate(360deg);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    overflow: hidden;
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: all;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    pointer-events: none; /* Let canvas capture mouse move */
}

.hero-content * {
    pointer-events: auto; /* Enable hover on buttons and text links */
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent-cyan);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-badge span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulse 2s infinite;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    gap: 8px;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-darker);
    border: none;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(56, 189, 248, 0.45);
    background: #58c8fa;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Sections General */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.skills-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.skill-card {
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.skill-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Projects Section */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s, box-shadow 0.3s;
}

.project-card.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    border: none;
    padding: 0;
    margin: 0;
}

.project-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(8, 11, 17, 0.9) 0%, rgba(20, 30, 48, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(8, 11, 17, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-content h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-links .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    flex-grow: 1;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-method-icon {
    width: 44px;
    height: 44px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
    font-size: 1.25rem;
}

.contact-method-text h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.contact-method-text p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-btn:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
    transform: translateY(-2px);
}

.contact-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: rgba(4, 6, 11, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(4, 6, 11, 0.95);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-darker);
    text-align: center;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

footer .tech-note {
    font-size: 0.75rem;
    color: rgba(56, 189, 248, 0.5);
    margin-top: 8px;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

.spin-anim {
    animation: spin 10s linear infinite;
    transform-origin: center;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
    transform-origin: center;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.pulse-amber {
    animation: pulse-amber-kf 2s infinite;
}

@keyframes pulse-amber-kf {
    0% {
        r: 3px;
        opacity: 1;
    }
    50% {
        r: 6px;
        opacity: 0.5;
    }
    100% {
        r: 3px;
        opacity: 1;
    }
}

.pulse-emerald {
    animation: pulse-emerald-kf 1.8s infinite ease-in-out;
}

@keyframes pulse-emerald-kf {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

.pulse-rose-scale {
    animation: pulse-rose-kf 3s infinite ease-in-out;
    transform-origin: center;
}

@keyframes pulse-rose-kf {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Intersection Observer Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-text {
        text-align: center;
    }
    .contact-info {
        text-align: center;
        align-items: center;
    }
    .contact-methods {
        align-items: center;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }
    .nav-links {
        display: none; /* Mobile menu can toggle this */
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-darker);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        padding-bottom: 100px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links.open {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .contact-form {
        padding: 24px;
    }
}
