* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    --primary-color: #282c34;
    --accent-color: #007acc;
    --light-bg: #fff;
    transition: background-color 0.3s;
}

/* make links more modern */
a {
    color: var(--accent-color);
    transition: color 0.2s;
}
a:hover {
    color: darken(var(--accent-color), 10%);
}

.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
}

.project-title {
    margin-top: 1rem;
    font-size: 2rem;
    text-align: center;
}

main {
    padding: 2rem 0; /* separation from header/footer */
}

.project-title {
    font-size: 2rem;
    margin: 1rem 0 2rem;
    text-align: center;
}

/* project page tabs */
.tabs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    justify-content: center; /* center the tab buttons */
}

.project-description {
    margin: 1rem 0 2rem;
    font-size: 1rem;
    color: #444;
}

.link-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* video embeds: make them bigger and responsive */
.video-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.video-grid iframe {
    width: 100%;
    max-width: 560px; /* YouTube standard width */
    height: 315px;
    border: none;
}

.link-section {
    margin-bottom: 2rem;
}

.link-card {
    display: inline-flex;
    align-items: center;
    padding: 1.25rem 2rem; /* even larger area */
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1.3rem;
    color: #000; /* black text */
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.link-card i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.links-heading,
.tab-content h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #000;
}

.tabs a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: #fafafa;
    color: var(--accent-color);
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid #ddd;
}

.tabs a:hover,
.tabs a.active {
    background: var(--accent-color);
    color: #fff;
}

/* simple tab content hiding via target */
.tab-content {
    display: none;
}

.tab-content:target {
    display: block;
}

/* the default panel is handled by script; remove the always‑visible fallback so Overview only shows when targeted */
/* previously we used .tab-content:first-of-type but that caused the Overview text to remain visible when another section was selected */

header {
    text-align: center;
    padding: 2rem 0 1rem;
    /* use the YouTube banner (rename to banner.jpg) if available */
    background: var(--primary-color) url('assets/banner.jpg') center/cover no-repeat;
    background-blend-mode: overlay;
    color: #fff;
    position: relative;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* subtle shadow under header */
header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

header nav a:hover {
    text-decoration: underline;
}
.tagline {
    margin: 0.5rem 0 2rem;
    font-style: italic;
    color: #ccc;
}

.about-section {
    background: var(--light-bg);
    padding: 2rem 0;
    color: #333;
}

.grid-container {
    display: grid;
    gap: 1.5rem;
    padding: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Force up to 3 cards per row on larger screens */
@media (min-width: 960px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* modern card style */
.project-box {
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-box {
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.project-box:hover {
    transform: translateY(-5px) scale(1.02);
}

.project-box img {
    width: 100%;
    display: block;
    object-fit: cover; /* stretch/crop to fill */
    height: 280px; /* a bit taller than before */
}

.project-info {
    padding: 1rem;
    flex-grow: 1;
}

/* links wrap the entire card; disable default underline and inherit color */
.project-box > a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-info h2 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

.project-info .description {
    font-size: 1rem; /* slightly larger */
    color: #555;
}

.links {
    display: flex;
    justify-content: space-around;
    padding: 0.75rem;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.links a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.links a i {
    margin-right: 0.4rem;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background-color: #282c34;
    color: #fff;
    margin-top: 2rem;
}

/* blog post list */
.post-list {
    list-style: none;
    padding-left: 0;
}

/* gallery grid */
.gallery-grid {
    display: grid;
    /* columns at least 200px but never grow beyond 300px; center if extra space */
    grid-template-columns: repeat(auto-fit, minmax(200px, 300px));
    gap: 1rem;
    justify-content: center;
}

.gallery-grid img {
    width: 100%;
    max-width: 100%;
    height: 180px; /* fixed box height */
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

/* lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.post-list li {
    margin: 0.75rem 0;
}

.post-list li a {
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
}

.post-list .date {
    font-size: 0.85rem;
    color: #666;
    margin-left: 0.5rem;
}

.blog-post .date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

/* general list style for project pages */
main article ul {
    list-style: none;
    padding-left: 0;
}

main article ul li a {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

main article ul li a i {
    margin-right: 0.4rem;
}
