:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --gradient-primary: linear-gradient(135deg, #06b6d4, #8b5cf6);
    --gradient-hover: linear-gradient(135deg, #0891b2, #7c3aed);

    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: #334155;
    --border-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

html,
body {
    overflow-x: hidden;
}

html {
    scroll-padding-top: 100px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    padding-top: 60px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.navbar .logo span {
    color: #06b6d4;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 30px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #06b6d4;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

.container {
    width: 85%;
    max-width: 1100px;
    margin: auto;
    padding: 40px 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeInUp 0.8s ease forwards;
}

.section-alternate {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 60px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 80px 0 40px;
    text-align: center;
}

.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn:hover {
    background: var(--gradient-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 2px solid #8b5cf6;
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-text h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image img {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    padding: 5px;
    background: var(--gradient-primary);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 60px;
}

.skill-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-main);
    backdrop-filter: blur(5px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.skill-badge:hover {
    border-color: #06b6d4;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    color: #06b6d4;
    transform: translateY(-2px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px);
    border-color: #8b5cf6;
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.2);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    opacity: 0.8;
    transition: 0.3s;
}

.card:hover img {
    opacity: 1;
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: white;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #06b6d4;
    transform: translateX(-8px);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.project-header {
    text-align: left;
    margin-bottom: 40px;
    padding-top: 20px;
}

.project-header h1 { 
    font-size: 2.2rem; 
    line-height: 1.3; 
    margin-bottom: 15px; 
    max-width: 800px; 
    margin-left: 0;
}

.project-header .skills-container {
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.project-header .skill-badge {
    font-size: 0.85rem;
    padding: 6px 14px;
    background: transparent;
    border-color: rgba(6, 182, 212, 0.4);
}

.project-banner {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    border: 1px solid var(--card-border);
}

.project-body {
    width: 85%; 
    max-width: 1100px; 
    margin: auto;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.project-body h2 {
    color: white;
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.contact-links {
    text-align: center;
    margin-bottom: 60px;
}

.contact-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin: 0 15px;
    transition: 0.3s;
}

.contact-links a:hover {
    color: #06b6d4;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 40px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        width: 250px;
        height: 250px;
    }

    .project-banner {
        height: 250px;
    }

    .project-header h1 { 
        font-size: 1.7rem; 
    }

    .navbar { 
        padding: 20px 5%; 
    }
    .container, .project-body { 
        width: 90%; 
    }
    .section-alternate { 
        padding: 40px 0; 
    }
}