:root {
    --accent-primary: #10b981;
    --accent-secondary: #6366f1;
    --accent-tertiary: #8b5cf6;
    --background: #0a0f1e;
    --surface: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-subtle: rgba(148, 163, 184, 0.1);
    --glow-accent: rgba(16, 185, 129, 0.3);
    --glow-secondary: rgba(99, 102, 241, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* Subtle noise texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0;
    position: relative;
}

.hero-content {
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    background: linear-gradient(
        135deg,
        var(--text-primary) 0%,
        var(--accent-primary) 50%,
        var(--accent-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
    letter-spacing: -0.04em;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.6;
    max-width: 700px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.125rem;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 10px 40px -10px var(--glow-accent),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 20px 60px -10px var(--glow-accent),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.cta-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-button:hover .cta-arrow {
    transform: translateX(6px);
}

/* Section Styles */
section {
    padding: 10rem 0;
    position: relative;
}

.section-content {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 5rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

/* About Section */
.about {
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-secondary) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.about-grid {
    display: grid;
    gap: 4rem;
    align-items: center;
}

.avatar-container {
    display: flex;
    justify-content: center;
    position: relative;
}

.avatar-container::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

.avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 30px 80px -20px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.about-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.8;
    font-weight: 300;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Projects Section */
.projects {
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--glow-accent) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.75rem;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-card:hover::before {
    opacity: 0.08;
}

.project-card:hover::after {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 30px 80px -20px rgba(16, 185, 129, 0.3),
        0 0 100px -30px rgba(99, 102, 241, 0.2);
}

.project-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.75;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.project-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.project-link:hover::before {
    width: calc(100% - 24px);
}

.project-link:hover {
    gap: 0.75rem;
}

.project-link svg {
    transition: transform 0.3s ease;
}

.project-link:hover svg {
    transform: translate(3px, -3px);
}

/* Contact Section */
.contact {
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: -1;
}

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

.contact-text {
    font-size: 1.375rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    font-weight: 300;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1.25rem 2.5rem;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    font-weight: 500;
}

.contact-email:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -15px var(--glow-accent);
    background: rgba(30, 41, 59, 0.8);
}

.contact-email svg {
    color: var(--accent-primary);
    transition: transform 0.4s ease;
}

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

.social-links {
    display: flex;
    gap: 1.25rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: var(--text-secondary);
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.social-link:hover::before {
    opacity: 0.15;
}

.social-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-4px) rotate(-5deg);
}

.social-link svg {
    width: 26px;
    height: 26px;
    position: relative;
    z-index: 1;
}

/* Footer */
.footer {
    padding: 5rem 0 3rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    margin-top: 5rem;
}

.footer p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 300;
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.footer a:hover::after {
    width: 100%;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 6rem 0;
    }

    .hero {
        padding: 5rem 0;
        min-height: 85vh;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2.25rem;
        margin-bottom: 3.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-card {
        padding: 2.25rem;
    }

    .contact-email {
        font-size: 1.25rem;
        padding: 1rem 2rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-link {
        width: 52px;
        height: 52px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .avatar {
        width: 180px;
        height: 180px;
    }

    .about::before,
    .projects::before,
    .contact::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-email {
        flex-direction: column;
        width: 100%;
        font-size: 1.125rem;
    }

    .about-text p {
        font-size: 1.125rem;
    }

    .project-title {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    body::before,
    body::after,
    .cta-button,
    .project-link,
    .social-links,
    .about::before,
    .projects::before,
    .contact::before {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
