/* Modern Developer Portfolio CSS Design System */

:root {
    /* Color Palette */
    --bg-main: #040408;
    --bg-darker: #020204;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Neon Accents */
    --accent-purple: hsl(263, 85%, 65%);
    --accent-indigo: hsl(220, 90%, 60%);
    --accent-indigo-rgb: 99, 102, 241;
    --accent-pink: hsl(320, 85%, 60%);
    --accent-emerald: hsl(150, 80%, 45%);
    
    /* Glassmorphism Constants */
    --glass-bg: rgba(10, 10, 20, 0.45);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.4);
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Ambient glow nodes background */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.22;
    mix-blend-mode: screen;
}

.glow-1 {
    width: 45vw;
    height: 45vw;
    background: var(--accent-purple);
    top: -10vw;
    right: -10vw;
    animation: glow-pulse-1 12s infinite alternate ease-in-out;
}

.glow-2 {
    width: 50vw;
    height: 50vw;
    background: var(--accent-indigo);
    bottom: -15vw;
    left: -15vw;
    animation: glow-pulse-2 15s infinite alternate-reverse ease-in-out;
}

.glow-3 {
    width: 35vw;
    height: 35vw;
    background: var(--accent-pink);
    top: 30vh;
    left: 20vw;
    opacity: 0.12;
    animation: glow-pulse-3 18s infinite alternate ease-in-out;
}

/* GPU-Compositor friendly animations - purely modifying opacity to run at 60fps with zero paint overhead */
@keyframes glow-pulse-1 {
    0% { opacity: 0.12; }
    100% { opacity: 0.22; }
}

@keyframes glow-pulse-2 {
    0% { opacity: 0.10; }
    100% { opacity: 0.20; }
}

@keyframes glow-pulse-3 {
    0% { opacity: 0.06; }
    100% { opacity: 0.14; }
}

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

.text-center {
    text-align: center;
}

/* Glass box system */
.glass-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--glass-shadow);
    padding: 40px;
}

/* Header & Navigation */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(4, 4, 8, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.logo-text span {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-indigo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-indigo));
    transition: var(--transition-smooth);
    border-radius: 2px;
}

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

.btn-nav-github {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-nav-github:hover {
    background: var(--text-primary);
    color: var(--bg-main);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-nav-github i {
    width: 16px;
    height: 16px;
}

/* Hero Section */
.hero-section {
    padding: 160px 0 100px 0;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent-indigo);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-indigo);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-indigo);
    animation: blink 2s infinite alternate;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

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

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 540px;
    font-weight: 400;
    line-height: 1.6;
}

/* Button System */
.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-indigo));
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-hover);
    transform: translateY(-3px);
}

.btn i {
    width: 20px;
    height: 20px;
}

/* Showcase browser mockup window */
.showcase-wrapper {
    perspective: 1000px;
}

.glass-window {
    background: rgba(13, 13, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: rotateY(-6deg) rotateX(4deg);
    transition: var(--transition-bounce);
}

.glass-window:hover {
    transform: rotateY(0deg) rotateX(0deg) translateY(-8px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.2);
}

.window-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #eab308; }
.dot-green { background-color: #22c55e; }

.window-title {
    margin-left: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.window-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.code-line {
    white-space: pre;
}

.indent-1 { padding-left: 20px; }

.code-keyword { color: #f472b6; }
.code-key { color: #38bdf8; }
.code-string { color: #34d399; }
.code-number { color: #fbbf24; }
.code-func { color: #a78bfa; }
.output-line {
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 12px;
}

/* Sections Global */
.section {
    padding: 100px 0;
}

.section-header {
    max-width: 700px;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-purple);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-badge i {
    width: 16px;
    height: 16px;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Cards System */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px var(--glass-shadow);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-bounce);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Card dynamic gradient glows on hover */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(168, 85, 247, 0.12), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.card:hover .card-glow {
    opacity: 1;
}

/* Card Icons */
.card-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
    margin-bottom: 24px;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.card:hover .card-icon-wrapper {
    color: white;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-indigo));
    border-color: transparent;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.card-icon-wrapper i {
    width: 24px;
    height: 24px;
}

/* Projects Showcase */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
    padding: 4px 10px;
    border-radius: 30px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.tech-badges span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 6px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.project-link i {
    width: 14px;
    height: 14px;
}

.project-link:hover {
    color: var(--accent-indigo);
    border-color: var(--accent-indigo);
    gap: 12px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-card {
    text-align: left;
}

.skill-icon {
    font-size: 2.2rem;
    color: var(--accent-purple);
    margin-bottom: 20px;
}

.skill-icon i {
    width: 36px;
    height: 36px;
}

.skill-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Development Philosophy */
.philosophy-section {
    position: relative;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.philosophy-info {
    max-width: 800px;
}

.philosophy-badge {
    display: inline-block;
    color: var(--accent-purple);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.philosophy-info h2 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.philosophy-info > p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.philosophy-bullets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.bullet-item {
    display: flex;
    gap: 20px;
}

.bullet-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-indigo);
    flex-shrink: 0;
}

.bullet-icon i {
    width: 20px;
    height: 20px;
}

.bullet-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.bullet-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Call To Action & Contacts */
.cta-section {
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05), transparent 70%);
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-section > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 30px 20px;
}

.contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: white;
    font-size: 1.5rem;
    transition: var(--transition-bounce);
}

.contact-icon i {
    width: 24px;
    height: 24px;
}

.contact-icon.telegram {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.contact-icon.github {
    background: linear-gradient(135deg, #475569, #1e293b);
    box-shadow: 0 4px 15px rgba(71, 85, 105, 0.3);
}

.contact-icon.youtube {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.contact-card:hover .contact-icon {
    transform: scale(1.15) rotate(5deg);
}

.contact-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.contact-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.contact-card:hover p {
    color: var(--accent-indigo);
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    background: var(--bg-darker);
}

footer p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

footer strong {
    color: var(--text-primary);
}

.credits-sub {
    font-size: 0.8rem;
    color: #475569;
    margin-top: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .showcase-wrapper {
        max-width: 550px;
        margin: 0 auto;
    }
    
    .glass-window {
        transform: none;
    }
    
    .glass-window:hover {
        transform: translateY(-8px);
    }
    
    .cta-cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple responsive burger or hidden navbar for minimalist clean design */
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .glass-box {
        padding: 24px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Cinematic scroll-driven entry animations */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}
