:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

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

html {
    scroll-behavior: smooth;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

img {
    max-width: 100%;
    display: block;
}

/* Container Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-speed);
}

header.scrolled {
    padding: 0.5rem 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    transition: all var(--transition-speed);
}

header.scrolled .nav-container {
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    padding: 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 150px; /* Prevent overly wide logos */
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-speed);
}

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

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    /* Changed to min-height for better mobile support */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Account for fixed header */
    padding-bottom: 50px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    /* Reduced slightly for better fit */
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

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

.hero p {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

/* Hero Visuals (Decorative Circles) */
.hero-visual {
    position: absolute;
    top: 50%;
    right: -100px;
    /* Adjusted position */
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 0;
    left: 0;
    animation: float 6s ease-in-out infinite;
}

.circle-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-color);
    bottom: 0;
    right: 0;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--secondary-color);
}

.about-card {
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: transform var(--transition-speed);
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    margin-bottom: 1rem;
}

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

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    border-radius: 1rem;
    /* Consistent radius */
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    transition: transform var(--transition-speed);
}

.project-card:hover .img-placeholder {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-link:hover {
    gap: 0.8rem;
    /* Small animation on hover */
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.info-item i {
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.contact-form {
    padding: 2.5rem;
    border-radius: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    gap: 1rem;
}

.footer p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

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

.social-links a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: color var(--transition-speed);
}

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

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

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


/* Responsiveness */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 3rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

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

    .hero-visual {
        display: none;
        /* Hide complex visuals on smaller screens or adjust */
    }
}

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

    .nav-menu {
        position: fixed;
        top: 70px;
        /* Below header */
        left: -100%;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        transition: left var(--transition-speed);
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        left: 0;
    }

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

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}