/* Base styles */
:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #3b82f6;
    --text: #f8fafc;
    --text-secondary: #cbd5e1;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--primary);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 5rem 0;
}

/* Header */
header {
    background-color: var(--secondary);
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Hero section */
.hero {
    padding-top: 10rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: row;
    /* Change from column to row */
    align-items: center;
    justify-content: space-between;
    gap: 4rem;

}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    max-width: 500px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero h1 span {
    color: var(--accent);
}

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

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    align-self: flex-start;
}

.btn:hover {
    background-color: #2563eb;
}

/* About section */
.about {
    background-color: var(--secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    list-style: none;
}

.skills-list li {
    background-color: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.skills-list li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 0.5rem;
}

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

.project-card {
    background-color: var(--secondary);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.project-content h3 {
    margin-bottom: 0.75rem;
}


.project-content p {
    margin-bottom: 1rem;
    flex: 1;
    /* This pushes the button down */
}

.project-img {
    width: 100%;
    height: 200px;
    background-color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    /* Changed from margin: 1rem 0 */
}

.project-content .btn {
    margin-top: auto;
    /* This ensures button sticks to bottom */
    align-self: flex-start;
}

.tech-tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

/* Contact section */
.contact {
    background-color: var(--secondary);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    background-color: rgba(59, 130, 246, 0.05);
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.contact-item:hover {
    transform: translateY(-5px);
    background-color: rgba(59, 130, 246, 0.1);
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.contact-item h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}


/* Footer */
footer {
    background-color: var(--primary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    list-style: none;
}

.social-links a {
    color: var(--text);
    font-size: 1.25rem;
    transition: color 0.3s;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 100;
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.social-links a {
    color: #333;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #007bff;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text);
    transition: all 0.3s ease;
}

.typed-text::after {
    content: "|";
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Media queries */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    /* Fix skills list on mobile */
    .skills-list {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .skills-list li {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
    }

    /* Hamburger animation classes */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }


    .about-content {
        grid-template-columns: 1fr;
        /* Stack single column on mobile */
        gap: 2rem;
        text-align: center;
    }

    .about h2 {
        text-align: center;
    }

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

    .hero-image {
        max-width: 100%;
    }

    .nav-links {
        display: none;
    }

    .btn {
        align-self: center;
    }
}