/* Main Styles - Neutral Grey Color Scheme */

:root {
    --primary-grey: #2c2c2c;
    --medium-grey: #4a4a4a;
    --light-grey: #6b6b6b;
    --lighter-grey: #8a8a8a;
    --background-grey: #f5f5f5;
    --white: #ffffff;
    --border-grey: #d4d4d4;
    --hover-grey: #3a3a3a;
    --text-dark: #1a1a1a;
}

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

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background-color: var(--primary-grey);
    color: var(--white);
    padding: 8px;
    z-index: 1001;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    font-weight: 500;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

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

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

.nav-brand {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

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

/* Main Content */
main {
    margin-top: 80px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Styling */
.section {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.section h1, .section h2 {
    font-size: 2.5rem;
    color: var(--primary-grey);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 300;
}

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

.project-box {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--medium-grey);
}

.project-box h3 {
    font-size: 1.3rem;
    color: var(--primary-grey);
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-box p {
    color: var(--light-grey);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Contact Section */
.contact-content {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.contact-form-box {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.contact-form-box h3 {
    font-size: 1.5rem;
    color: var(--primary-grey);
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

.contact-form-box > p {
    color: var(--light-grey);
    margin-bottom: 2rem;
    text-align: center;
}

/* Contact Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-grey);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-grey);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--white);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--medium-grey);
    box-shadow: 0 0 0 3px rgba(44, 44, 44, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--light-grey);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-grey), var(--medium-grey));
    color: var(--white);
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--hover-grey), var(--primary-grey));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.submit-btn:disabled {
    background: var(--lighter-grey);
    cursor: not-allowed;
    transform: none;
}

/* Form Message Styling */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Skills Section */
.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-category {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--primary-grey);
    margin-bottom: 1rem;
    font-weight: 500;
}

.skill-category p {
    color: var(--light-grey);
    line-height: 1.5;
}

/* Dynamic Content Area */
#dynamic-content {
    background-color: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#dynamic-content h2 {
    color: var(--primary-grey);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: left;
}

.project-detail h3 {
    color: var(--medium-grey);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-weight: 500;
}

.project-detail p {
    color: var(--light-grey);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-detail ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.project-detail li {
    color: var(--light-grey);
    margin-bottom: 0.5rem;
    list-style-type: disc;
    line-height: 1.5;
}

/* Back Button */
.back-button {
    background-color: var(--medium-grey);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: var(--primary-grey);
}

/* Loading and Error States */
.loading-state, .error-state {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 8px;
    background-color: var(--background-grey);
    border: 1px solid var(--border-grey);
}

.loading-state h2, .error-state h2 {
    color: var(--primary-grey);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    text-align: center;
}

.loading-state p, .error-state p {
    color: var(--light-grey);
    margin-bottom: 0.5rem;
}

.error-details {
    font-size: 0.85rem;
    color: var(--lighter-grey);
    font-style: italic;
}

/* Enhanced Project Box Styling */
.project-box {
    position: relative;
    overflow: hidden;
}

.project-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--medium-grey), transparent);
    transition: left 0.5s ease;
}

.project-box:hover::before {
    left: 100%;
}

.project-box:active {
    transform: translateY(1px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Footer */
footer {
    background-color: var(--primary-grey);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer p {
    color: var(--lighter-grey);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .section h1, .section h2 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        padding: 0 1rem;
    }
    
    .contact-form-box {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 1rem;
    }
    
    .section h1, .section h2 {
        font-size: 1.8rem;
    }
    
    .project-box, .contact-box, .skill-category {
        padding: 1rem;
    }
}