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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Site header rotator */
.site-header {
    position: relative;
    overflow: hidden;
}

.header-rotator {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.header-rotator.visible { opacity: 1; }
.header-rotator:not(.visible) { opacity: 0; }

.site-header .container { position: relative; z-index: 1; }

.site-nav-and-social { display: flex; gap: 18px; align-items: center; }
.site-nav a { color: white; margin-right: 14px; font-weight: 600; opacity: 0.95; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }

/* Project-specific header that uses thumbnail images */
.project-header {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
}

.project-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 0;
}

.project-header .container,
.project-header .brand {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Header layout with social icons */
header nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand h1 {
    font-size: 2rem;
    margin: 0;
}

.social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icons a {
    color: white;
    opacity: 0.95;
    transition: opacity 0.15s ease;
}

.social-icons a:hover {
    opacity: 1;
}

.social-icons svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: currentColor;
}

/* Main Content */
main {
    padding: 60px 0;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-link {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 250px;
}

.project-image {
    flex: 0 0 40%;
    overflow: hidden;
    background: #e0e0e0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.project-snippet {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
    flex-grow: 1;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.project-card:hover .read-more {
    color: #764ba2;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .project-link {
        flex-direction: column;
        min-height: auto;
    }

    .project-image {
        flex: 0 0 auto;
        height: 200px;
    }

    .project-content {
        padding: 20px;
    }

    .project-content h2 {
        font-size: 1.4rem;
    }
}

/* Project Detail Page Styles */
.project-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-detail h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.project-detail .project-meta {
    color: #777;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.project-detail .project-image-large {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin: 30px 0;
}

.project-detail h2 {
    color: #2c3e50;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.project-detail p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #555;
}

.project-detail ul {
    margin: 15px 0 15px 30px;
    color: #555;
}

.project-detail ul li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tech-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}
