/* --- Variables & Reset --- */
:root {
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --accent-purple: #7c3aed;
    --accent-purple-hover: #6d28d9;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
    --max-width: 1140px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    border-top: 5px solid var(--accent-purple);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header & Navigation --- */
.site-header {
    padding: 32px 0 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-purple);
    text-decoration: none;
    display: block;
    width: fit-content;
    white-space: nowrap;
    padding: 0px 8px;
    border: 2px solid var(--accent-purple);
    border-radius: 10px;
    margin-bottom: 6px;
}

.brand-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.site-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-purple);
}

.nav-link:hover,
.footer-right a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent-purple);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* --- Project Section & Grid --- */
.projects-section {
    padding: 48px 0;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-main);
    margin-bottom: 24px;
    border-bottom: 2px solid var(--text-main);
    display: inline-block;
    padding-bottom: 4px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* Responsive Grid */
@media (max-width: 1100px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* --- Project Card Styling --- */
.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--card-bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.4), 0 10px 20px rgba(0,0,0,0.06);
    border-color: var(--accent-purple);
    border-width: 1.5px;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #000;
}

.card-image-wrapper.card-image-wide {
    aspect-ratio: 16 / 9;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-image {
    opacity: 0.92;
}

.card-content {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.project-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-meta strong {
    color: var(--text-main);
}

/* --- About Page --- */
.about-section {
    padding: 48px 0;
}

.about-section p {
    max-width: 720px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.about-section a {
    color: var(--accent-purple);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-section a:hover {
    color: var(--accent-purple-hover);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.video-embed {
    aspect-ratio: 16 / 9;
    max-width: 800px;
    margin-top: 8px;
}

.video-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
}

/* --- Project Detail Page --- */
.project-detail {
    padding: 32px 0 48px;
}

.back-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-purple);
    text-decoration: none;
    margin-bottom: 24px;
}

.project-hero {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.project-boxart {
    flex: 0 0 240px;
    max-width: 240px;
}

.project-boxart.project-boxart-wide {
    flex: 0 0 400px;
    max-width: 400px;
}

.project-boxart img {
    display: block;
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.project-info {
    flex: 1;
    min-width: 260px;
}

.project-detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.meta-row {
    display: flex;
    gap: 16px;
    padding: 5px 0;
    font-size: 0.9rem;
}

.meta-row dt {
    flex: 0 0 110px;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-accent {
    color: var(--accent-purple);
    font-weight: 700;
}

.meta-row a {
    color: var(--accent-purple);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.meta-row a:hover {
    color: var(--accent-purple-hover);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.contribution-text {
    max-width: 720px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.contribution-bullets {
    list-style: none;
    max-width: 720px;
    margin-bottom: 40px;
}

.contribution-bullets li {
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.contribution-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-purple);
}

.project-video {
    margin-bottom: 48px;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.highlight-card {
    display: flex;
    flex-direction: column;
}

.highlight-media {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    margin-bottom: 12px;
}

.highlight-media img,
.highlight-media video,
.highlight-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

.highlight-media-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 2rem;
}

.highlight-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.highlight-description {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.project-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.pager-link {
    color: var(--accent-purple);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.pager-link:hover,
.back-link:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent-purple);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* --- Footer Styling --- */
.site-footer {
    margin-top: 64px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-right a i {
    margin-right: 6px;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 16px;
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: var(--accent-purple);
}