/* styles.css */

/* Global Styles */
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #1d1d1f;
    background-color: #f9fafb;
    line-height: 1.6;
    font-weight: 400;
}

h1, h2, h3 {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: #3b82f6;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: #2563eb;
    opacity: 0.9;
}

/* Navbar */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1d1d1f;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1d1d1f;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3b82f6;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    text-align: center;
    padding: 8rem 2rem;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    animation: fadeIn 1s ease-out;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

#hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 1rem;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
section {
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

section h2 {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-align: center;
    color: #1d1d1f;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* About */
#about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #4b5563;
}

/* Experience */
.experience-item {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.experience-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.experience-item h3 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.experience-item .dates {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.2rem;
}

.experience-item ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: #4b5563;
}

.experience-item li {
    margin-bottom: 0.5rem;
}

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

.project-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-card p {
    margin-bottom: 1.5rem;
    color: #4b5563;
    font-size: 1rem;
}

.project-card a {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.project-card a:hover {
    background: #2563eb;
}

/* Skills */
#skills .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: left;
}

.skill-category {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.skill-category:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: #4b5563;
}

/* Contact */
#contact form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#contact input, #contact textarea {
    padding: 1.2rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.3s ease;
}

#contact input:focus, #contact textarea:focus {
    border-color: #3b82f6;
    outline: none;
}

#contact button {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

#contact button:hover {
    background: #2563eb;
}

#form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    min-height: 1.5rem; /* Ensures space is reserved */
}

#form-status.loading::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 2px solid #3b82f6;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
footer {
    background: #f3f4f6;
    color: #6b7280;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 6rem;
    font-size: 0.85rem;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

footer p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    #hero h1 {
        font-size: 2.8rem;
    }

    section h2 {
        font-size: 2.2rem;
    }
}