/* CSS Reset and Basic Setup */
:root {
    --primary-color: #6366f1; /* Indigo from your original design */
    --background-dark: #1e293b; /* Dark blue-gray from your original design */
    --background-light: #334155; /* Lighter slate color */
    --text-primary: #f0f4f8; /* Light blue-gray text */
    --text-secondary: #cbd5e1; /* Lighter secondary text */
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* General Styles */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; border-bottom: 3px solid var(--primary-color); display: inline-block; padding-bottom: 10px; }
h3 { font-size: 1.5rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

section {
    padding: 80px 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Navigation */
.header {
    background-color: rgba(30, 41, 59, 0.85); /* rgba version of --background-dark */
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: top 0.3s;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo span { color: var(--primary-color); }

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

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

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: left;
}

.hero-content {
    max-width: 700px;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--primary-color);
}

.hero-content h1 {
    font-size: 3.5rem; /* Adjusted for longer name */
    line-height: 1.1;
    margin: 10px 0;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 20px;
    border: 2px solid var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    margin-left: 15px;
}

.btn:hover {
    transform: translateY(-3px);
    background-color: #4f46e5; /* Darker Indigo */
    border-color: #4f46e5;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* About Section */
#about .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

#about .about-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--border-color);
}

#about .about-content {
    flex: 1;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.skill-item {
    background: var(--background-light);
    padding: 25px;
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.skill-item h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.skill-item p {
    font-size: 0.9rem;
}

/* Projects Section */
#projects {
    background-color: #121212; /* A slightly darker bg for contrast */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--background-dark);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--primary-color);
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    color: var(--primary-color);
}

.project-tags {
    margin: 15px 0;
    flex-grow: 1;
}

.project-tags span {
    background-color: var(--background-light);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

.project-links a {
    margin-right: 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* Contact Section */
#contact .container {
    text-align: center;
    max-width: 600px;
}

/* Achievements Section */
#achievements {
    background-color: #121212;
}

.achievements-list {
    margin-top: 40px;
}

.achievement-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.achievement-item:last-child {
    border-bottom: none;
}

.achievement-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.achievement-item h3 i {
    margin-right: 10px;
}

.achievement-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Exploring New Technologies Section */
#exploring {
    background-color: #1e293b;
}

.exploring-list {
    margin-top: 40px;
}

.exploring-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.exploring-item:last-child {
    border-bottom: none;
}

.exploring-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.exploring-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: var(--background-light);
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    color: var(--text-primary);
    box-shadow: 0 5px 20px var(--shadow-color);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: #1e293b;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.close:hover { color: var(--primary-color); }

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: #121212;
    border-top: 1px solid var(--border-color);
}

/* Button Icon Styles */
.btn-icon {
    background-color: var(--background-light);
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 12px 18px;
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* Contact Info */
.contact-info {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Responsive Design */
@media(max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .hero-content h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--background-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease-in-out;
    }

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

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #about .container {
        flex-direction: column;
        text-align: center;
    }

    #about .about-image {
        margin-bottom: 30px;
        width: 250px;
        height: 250px;
    }
}
