/* 
    Font-family: 'Poppins', sans-serif; (Headings)
    Font-family: 'Inter', sans-serif; (Body)
*/

:root {
    --primary-color: #1e3a8a;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --text-color: #343a40;
    --border-color: #dee2e6;
}

/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #172554;
}

a:focus {
    color: #172554;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
}

/* --- Header --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.main-nav a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.main-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.language-switcher a {
    margin-left: 0.5rem;
    font-weight: 500;
    color: #adb5bd;
}

.language-switcher .lang-active {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 4rem 0 6rem 0; /* Reduced top padding by 33% */
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.hero-intro {
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- Projects Section --- */
.projects-section {
    padding: 4rem 0;
}

.projects-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.project-grid {
    display: grid;
    gap: 3rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    background: #ffffff;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

/* Alternate card layout */
.project-card:nth-child(even) {
    grid-template-columns: 1fr 1fr;
}

.project-card:nth-child(even) .project-image-container {
    order: -1;
}

.project-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.project-content p {
    margin-bottom: 1.5rem;
}

.project-links {
    margin-top: 1.5rem;
}

.project-links a {
    display: inline-block;
    margin-right: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.project-links a:hover,
.project-links a:focus {
    background-color: var(--light-color);
}

.project-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.project-image-container {
    border-radius: 6px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    max-height: 400px;
    display: block;
    object-fit: contain;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.project-card iframe {
    width: 100%;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    aspect-ratio: 4 / 3;
}

/* --- Contact Section --- */
.contact-section {
    padding: 3rem 2rem;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 4rem;
    margin-bottom: 4rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.contact-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-section p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-links a {
    display: inline-block;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: transparent;
    color: var(--primary-color);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.contact-links a:hover,
.contact-links a:focus {
    background-color: var(--light-color);
    color: var(--primary-color);
    border-color: var(--border-color);
}

.contact-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    color: #6c757d;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--primary-color);
}

.footer-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.footer-links .separator {
    color: #6c757d;
    margin: 0 0.5rem;
}

/* --- Animations --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Button Styles --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: #172554;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

.btn-primary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.btn-outline:hover,
.btn-outline:focus {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* --- Hero CTA --- */
.hero-cta {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* --- Credibility Bar --- */
.credibility-bar {
    background-color: #f0f8ff;
    padding: 1rem 0;
    margin: 2rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.credibility-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.credibility-content p {
    margin: 0;
    font-size: 0.95rem;
    color: #495057;
}

.credibility-content a {
    font-weight: 500;
}

/* --- Expertise Section --- */
.expertise-section {
    padding: 4rem 0;
    background-color: #fafafa;
}

.expertise-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.expertise-card {
    background: white;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expertise-card:hover,
.expertise-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.expertise-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.expertise-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.expertise-card p {
    margin-bottom: 1.5rem;
    color: #6c757d;
    min-height: 4.5rem; /* Ensures consistent alignment of lists */
    line-height: 1.5;
}

.expertise-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.expertise-card li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.expertise-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* --- Project Highlights --- */
.project-highlights {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.highlight {
    background-color: #f0f4ff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #1e3a8a;
}

/* --- Demo Preview --- */
.demo-preview {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.demo-preview h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.demo-question {
    background-color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-style: italic;
    border-left: 3px solid var(--primary-color);
}

.demo-answer {
    color: #28a745;
    font-weight: 500;
}

/* --- More Projects --- */
.more-projects {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.project-hint {
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* --- About Section --- */
.about-section {
    padding: 4rem 0;
    background-color: white;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* --- Updated Contact Section --- */
.contact-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.contact-cta {
    text-align: center;
}

.contact-alternative {
    margin-top: 1.5rem;
    color: #6c757d;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .project-card, .project-card:nth-child(even) {
        grid-template-columns: 1fr;
    }
    .project-card:nth-child(even) .project-image-container {
        order: 0;
    }
    .expertise-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .projects-section h2, .expertise-section h2, .about-section h2 {
        font-size: 2rem;
    }
    .hero-cta {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    font-size: 14px;
    animation: slideUp 0.3s ease-out;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

#accept-cookies {
    background: #0066ff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#accept-cookies:hover,
#accept-cookies:focus {
    background: #0052cc;
}

#accept-cookies:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        font-size: 13px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    #accept-cookies {
        width: 100%;
    }
}