@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&display=swap');

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

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Merriweather', serif;
    background-color: #00002e;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.content {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Projects Section */
.projects-section {
    margin-bottom: 80px;
}

.projects-section h2 {
    font-size: 2.5rem;
    color: #f5ffe8;
    margin-bottom: 48px;
    text-align: center;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding-bottom: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    gap: 36px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: rgba(12, 17, 108, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(245, 255, 232, 0.12);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.project-card:hover {
    transform: translateY(-6px);
    background: rgba(12, 17, 108, 0.35);
    border-color: rgba(245, 255, 232, 0.25);
    box-shadow: 0 16px 40px rgba(12, 17, 108, 0.4);
}

.project-image {
    width: 100%;
    height: clamp(180px, 45vw, 270px);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 0, 46, 0.4), rgba(12, 17, 108, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.project-card:hover .project-image {
    background: linear-gradient(135deg, rgba(0, 0, 46, 0.3), rgba(12, 17, 108, 0.4));
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image-bottom img {
    object-position: bottom;
}

.placeholder-image {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-family: Georgia, serif;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 500;
}

.project-info {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.project-title .tag {
    transform: translateY(-10px);
}

.project-info h3 {
    color: #f5ffe8;
    font-size: 1.5rem;
    margin: 0 0 12px 0;
    font-family: Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.project-info p {
    color: rgba(245, 255, 232, 0.75);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}


.tag {
    background: rgba(153, 102, 255, 0.3);
    color: #f5ffe8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-meta {
    margin-bottom: 16px;
}

.project-meta .first-worked {
    color: rgba(245, 255, 232, 0.6);
    font-size: 0.9rem;
    font-style: italic;
}

.project-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    display: inline-block;
}

.btn-primary {
    background: var(--accent, #7b5fc7);
    color: var(--bg-primary, #faf8f3);
    border-color: var(--accent, #7b5fc7);
}

.btn-primary:hover {
    background: var(--accent-hover, #6849b0);
    border-color: var(--accent-hover, #6849b0);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(123, 95, 199, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary, #4a4d5e);
    border-color: var(--border, rgba(26, 29, 46, 0.15));
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-secondary, #ffffff);
    border-color: var(--border-hover, rgba(26, 29, 46, 0.25));
    color: var(--text-primary, #1a1d2e);
}

.btn-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

@media (max-width: 768px) {
    .content {
        padding: 40px 16px;
    }

    .projects-section h2 {
        font-size: 2rem;
        margin-bottom: 36px;
    }

    .projects-grid {
        gap: 28px;
    }

    .page-title {
        font-size: 2.8rem;
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 32px 12px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .page-title {
        font-size: 2.2rem;
        margin-bottom: 32px;
    }

    .projects-section h2 {
        font-size: 1.8rem;
        margin-bottom: 28px;
    }

    .project-info {
        padding: 20px;
    }

    .project-info h3 {
        font-size: 1.3rem;
    }

    .project-info p {
        font-size: 0.9rem;
    }

    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .commits-section h2 {
        font-size: 1.6rem;
        margin-bottom: 36px;
    }

    .commits-section h3 {
        font-size: 1.5rem;
        margin-bottom: 28px;
    }

    .commit-item {
        padding: 20px;
        border-radius: 12px;
    }

    .commit-content h4 {
        font-size: 1.2rem;
    }

    .commit-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 40px 15px;
    }
    
    .projects-section {
        margin-bottom: 60px;
    }
    
    .projects-section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .commits-section h2 {
        font-size: 1.6rem;
    }
    
    .project-card {
        border-radius: 8px;
    }
    
    .project-info {
        padding: 20px;
    }
    
    .commit-item {
        padding: 20px;
    }

    .project-image {
        max-height: 180px;
    }
}

/* Tablet Portrait  */
@media (min-width: 769px) and (max-width: 1024px) {
    .project-image {
        height: clamp(200px, 30vw, 250px);
    }
}

