:root {
    --text: #ebe9fc;
    --background: #010104;
    --primary: #3a31d8;
    --secondary: #020024;
    --accent: #0600c2;
    --glass: rgba(235, 233, 252, 0.03);
    --glass-border: rgba(235, 233, 252, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 300;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(58, 49, 216, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 0, 194, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(58, 49, 216, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(1deg); }
    66% { transform: translateY(20px) rotate(-1deg); }
}

/* Navigation */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 24px;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav:hover {
    background: rgba(235, 233, 252, 0.05);
    border-color: rgba(58, 49, 216, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.logo i {
    font-size: 1.4rem;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    background: rgba(58, 49, 216, 0.15);
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: rgba(58, 49, 216, 0.2);
    color: var(--primary);
}

/* Main Content */
main {
    padding-top: 100px;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.profile-section {
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: block;
    border: 2px solid rgba(58, 49, 216, 0.3);
    transition: all 0.4s ease;
    position: relative;
}

.profile-img::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

.profile-img:hover::before {
    opacity: 1;
}

.profile-img:hover {
    transform: scale(1.05);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: rgba(235, 233, 252, 0.7);
    margin-bottom: 40px;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.8s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(235, 233, 252, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 1s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--text);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary:hover {
    box-shadow: 0 15px 35px rgba(58, 49, 216, 0.4);
}

.btn-secondary:hover {
    background: rgba(235, 233, 252, 0.1);
    border-color: rgba(58, 49, 216, 0.4);
}

/* About Section */
.about-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 2rem;
    animation: fadeInUp 1s ease 1.2s both;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.about-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transition: left 0.5s;
}

.about-card:hover::before {
    left: 100%;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(58, 49, 216, 0.3);
    background: rgba(235, 233, 252, 0.05);
}

.about-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-card i {
    font-size: 1.5rem;
}

.about-card p {
    color: rgba(235, 233, 252, 0.8);
    line-height: 1.7;
}

/* Contact Section */
.contact-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.contact-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary);
}

.contact-items {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(6, 0, 194, 0.1);
    padding: 16px 24px;
    border-radius: 8px;
    border: 1px solid rgba(6, 0, 194, 0.3);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(6, 0, 194, 0.2);
    transform: translateY(-2px);
}

.contact-item i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* Blog Styles */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease 0.2s both;
}

.blog-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.blog-header p {
    font-size: 1.2rem;
    color: rgba(235, 233, 252, 0.7);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease calc(0.4s + var(--delay, 0s)) both;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(58, 49, 216, 0.4);
    background: rgba(235, 233, 252, 0.05);
}

.blog-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
}

.blog-card p {
    color: rgba(235, 233, 252, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(235, 233, 252, 0.5);
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-readtime {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Blog Modal */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.blog-modal.active {
    opacity: 1;
    visibility: visible;
}

.blog-modal-content {
    background: var(--background);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.blog-modal.active .blog-modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.blog-modal-header {
    position: sticky;
    top: 0;
    background: rgba(1, 1, 4, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    z-index: 10;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text);
    font-size: 2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    background: rgba(58, 49, 216, 0.2);
    color: var(--primary);
    transform: scale(1.1);
}

/* Blog Content */
.blog-article {
    padding: 40px;
    line-height: 1.7;
}

.blog-article h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-article h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 48px 0 24px 0;
    color: var(--primary);
}

.blog-article h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 32px 0 16px 0;
    color: var(--accent);
}

.blog-article p {
    margin-bottom: 24px;
    line-height: 1.8;
    color: rgba(235, 233, 252, 0.9);
}

.blog-article pre {
    background: rgba(2, 0, 36, 0.8);
    border: 1px solid rgba(58, 49, 216, 0.3);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.blog-article code {
    background: rgba(58, 49, 216, 0.2);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 0.9em;
}

.blog-article pre code {
    background: none;
    padding: 0;
}

.blog-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.blog-article th,
.blog-article td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.blog-article th {
    background: rgba(58, 49, 216, 0.2);
    color: var(--primary);
    font-weight: 600;
}

.blog-article td {
    background: var(--glass);
}

.blog-article a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.blog-article a:hover {
    border-bottom-color: var(--primary);
}

.blog-article hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 40px 0;
}

.blog-article blockquote {
    border-left: 4px solid var(--primary);
    background: rgba(58, 49, 216, 0.1);
    padding: 24px 32px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.blog-article ul {
    margin: 24px 0;
    padding-left: 32px;
}

.blog-article li {
    margin-bottom: 12px;
    color: rgba(235, 233, 252, 0.9);
}

.blog-article ol {
    margin: 24px 0;
    padding-left: 32px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(58, 49, 216, 0.2);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        top: 10px;
        padding: 10px 20px;
    }

    .nav-container {
        gap: 20px;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 1rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-items {
        flex-direction: column;
        gap: 15px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-article {
        padding: 24px;
    }

    .blog-article h1 {
        font-size: 2rem;
    }

    .blog-article h2 {
        font-size: 1.5rem;
    }

    .blog-modal {
        padding: 1rem;
    }

    .blog-modal-content {
        max-height: 95vh;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--accent));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--accent), var(--primary));
}