:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #f8f8f8;
    --text-secondary: #a0a0b0;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --gradient-text: linear-gradient(135deg, #a5b4fc 0%, #818cf8 100%);
    --glass-bg: rgba(20, 20, 30, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-subtle: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Background Mesh Canvas */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--accent-primary);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--accent-secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: #3b82f6;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 5%) scale(1.1); }
    66% { transform: translate(-5%, 2%) scale(0.9); }
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
    transition: all 0.3s ease;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

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

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Typography & Layout */
.section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: #818cf8;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.premium-text {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover svg {
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* Glass Card Shared Component */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Project Showcase */
.project-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
}

.project-badge {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.project-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-features {
    list-style: none;
    margin-bottom: 2rem;
}

.project-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

/* Code Window */
.code-window {
    background: #0d0d12;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.mockup-header {
    background: #1a1a24;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
}

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

.mockup-body {
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.5;
    overflow-x: auto;
}

.keyword { color: #c678dd; }
.function { color: #61afef; }
.string { color: #98c379; }

/* Terminal Widget */
.terminal-container {
    padding: 0;
    overflow: hidden;
    margin: 0 auto 4rem;
    max-width: 900px;
    border: 1px solid var(--glass-border);
}

.terminal-header {
    background: #1a1a24;
    padding: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.terminal-dots {
    display: flex;
    gap: 8px;
    margin-right: 1.5rem;
}

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-body {
    background: rgba(10, 10, 15, 0.9);
    padding: 1.5rem;
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

.terminal-output {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.terminal-line {
    color: #e2e8f0;
    word-break: break-word;
}

.terminal-prompt { color: #61afef; font-weight: bold; margin-right: 0.5rem; }
.terminal-thought { color: #8b5cf6; font-style: italic; }
.terminal-action { color: #c678dd; }
.terminal-success { color: #98c379; }
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #e2e8f0;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 4px;
}

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

.terminal-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(20, 20, 30, 0.5);
    border-top: 1px solid var(--glass-border);
}

.prompt-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.prompt-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-content .timeline-date {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Architecture Diagram */
.arch-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background: rgba(20, 20, 30, 0.4);
    overflow-x: auto;
}

.arch-node {
    padding: 0.8rem 1.2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 2;
    min-width: 100px;
}

.arch-endpoints {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.arch-arrow {
    position: relative;
    color: var(--text-secondary);
    margin: 0 0.5rem;
    font-size: 1.5rem;
    flex-grow: 1;
    text-align: center;
}

.flow-dot {
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 6px;
    background: #a5b4fc;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px #a5b4fc;
    animation: flow 2s infinite linear;
    z-index: 3;
}

.delay-1 { animation-delay: 0.6s; }
.delay-2 { animation-delay: 1.2s; }

@keyframes flow {
    0% { left: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: 80%; opacity: 0; }
}

/* Footer */
.footer {
    padding: 4rem 5% 2rem;
    background: #050508;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.article-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-card .read-more {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.article-card:hover .read-more {
    color: var(--accent-secondary);
}

.footer-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-content p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.copyright {
    margin-top: 4rem;
    color: #666;
    font-size: 0.85rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
    .project-showcase {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: block;
    }

    .hero-actions {
        flex-direction: column;
    }
    
    .premium-text {
        font-size: 2.5rem;
    }
}
