/* Projects Page - Modern Masonry Layout - Light Theme */

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

:root {
    --primary-color: #00a896;
    --primary-hover: #01D758;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-light: #6f7a74;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #eef6f2;
    --border-color: #e5e7eb;
    --nav-corner-radius: 12px;
    --ui-corner-radius: var(--nav-corner-radius);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

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

/* Header */
.header {
    background: linear-gradient(180deg, rgba(8, 129, 111, 0.92) 0%, rgba(8, 140, 122, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 0;
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.08),
        0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.45rem 0;
}

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

.header-logo {
    height: 65px;
    width: auto;
    cursor: pointer;
}

.theme-toggle-header {
    position: relative;
    width: 140px;
    height: 44px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: transparent;
    transition: transform 1.2s;
    transform-style: preserve-3d;
    transform: perspective(800px) rotateX(0deg);
}

.theme-toggle-header:hover {
    transform: perspective(800px) rotateX(360deg);
}

.theme-toggle-header > span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--nav-corner-radius);
    color: var(--text-secondary);
    transition: all 0.4s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.theme-toggle-header:hover > span {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 16px rgba(1, 215, 88, 0.3);
}

.theme-toggle-header > span svg {
    width: 18px;
    height: 18px;
}

.theme-toggle-header > span:nth-child(1) {
    transform: rotateX(0deg) translateZ(22px);
    opacity: 1;
}

.theme-toggle-header > span:nth-child(2) {
    transform: rotateX(90deg) translateZ(22px);
    opacity: 0;
}

.theme-toggle-header:hover > span:nth-child(2) {
    opacity: 1;
}

/* Language Toggle Button */
.lang-toggle-header {
    position: relative;
    width: 60px;
    height: 44px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--nav-corner-radius);
    color: var(--text-secondary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-toggle-header:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 16px rgba(1, 215, 88, 0.3);
}

.lang-menu {
    position: relative;
}

.lang-list {
    position: absolute;
    top: 54px;
    right: 0;
    display: none;
    flex-direction: column;
    min-width: 120px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--nav-corner-radius);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    z-index: 2000;
}

.lang-list.open {
    display: flex;
}

.lang-option {
    background: transparent;
    border: 0;
    padding: 8px 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--nav-corner-radius);
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.lang-option.active {
    background: var(--primary-color);
    color: #ffffff;
}


/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #08816feb 100%);
    padding: 4rem 0;
    color: white;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 0.8;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

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

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

.projects-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    align-items: start;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.project-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-content {
    padding: 2rem;
}

.project-category {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link-btn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--nav-corner-radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-link-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.project-link-btn svg {
    width: 16px;
    height: 16px;
}

/* CTA Section */
.cta-section {
    background: var(--primary-color);
    color: white;
    padding: 5rem 0;
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.875rem 2rem;
    border-radius: var(--nav-corner-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 4rem 0 2rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: #cbd5e0;
    line-height: 1.6;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    text-align: center;
    color: #cbd5e0;
}

/* Google Calendar button styling */
.qxCTlb {
    background-color: white !important;
    color: var(--primary-color) !important;
    border-radius: 8px !important;
    padding: 0.875rem 2rem !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.qxCTlb:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.3) !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-masonry {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .projects-masonry {
        grid-template-columns: 1fr;
    }

    .header-logo {
        height: 40px;
    }

    .page-hero {
        padding: 3rem 0;
    }

    .projects-section {
        padding: 3rem 0;
    }

    .cta-section {
        padding: 3rem 0;
    }

    .cta-title {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.75rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-image {
        height: 220px;
    }
}

@media (max-width: 450px) {
    .theme-toggle-header {
        width: 44px;
    }
    .theme-toggle-header > span {
        gap: 0;
        font-size: 0;
    }
    .theme-toggle-header > span svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        font-size: initial;
    }
    .theme-toggle-header > span > span {
        display: none;
    }
}
