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

@font-face {
    font-family: 'Chalk Board';
    src: url('fonts/Chalk Board - A Handmade Chalk Font/2. TTF/Chalk Board.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --color-bg: #05070b;
    --color-bg-alt: #0a0f16;
    --color-surface: #0f1520;
    --color-surface-strong: #131c2a;
    --color-text: #f8fafc;
    --color-text-muted: #9fb0c6;
    --color-accent: #39d0ff;
    --color-accent-strong: #63f5d4;
    --color-border: rgba(148, 163, 184, 0.18);
    --color-glow: rgba(57, 208, 255, 0.35);
    --color-shadow: rgba(2, 8, 23, 0.55);
    --font-body: 'Manrope', 'Segoe UI', sans-serif;
    --font-display: 'Oswald', 'Impact', sans-serif;
    --font-chalk: 'Chalk Board', cursive;
    --transition: all 0.3s ease;
    --transition-fast: all 0.18s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image:
        radial-gradient(circle at 15% 20%, rgba(63, 245, 212, 0.08), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(57, 208, 255, 0.08), transparent 40%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 40%);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(5, 7, 11, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    z-index: 1000;
}

.nav-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 28px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 6px 12px rgba(2, 8, 23, 0.5));
}

.nav-logo:hover .nav-logo-img {
    opacity: 0.85;
    transform: translateY(-1px) scale(1.02);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-strong));
    transition: width 0.3s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile menu button */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* Hero */
.hero {
    position: relative;
    padding: 11rem 0 7rem;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: -10%;
    background: url('images/chalkboard.jpg') center center / cover no-repeat;
    filter: saturate(0.85) contrast(1.1);
    transform: translateZ(0);
    will-change: transform;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(5, 7, 11, 0.9) 0%, rgba(5, 7, 11, 0.7) 45%, rgba(10, 15, 22, 0.95) 100%),
        radial-gradient(circle at 15% 20%, rgba(57, 208, 255, 0.18), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(99, 245, 212, 0.12), transparent 50%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
    animation: heroEnter 0.8s ease both;
}

.hero-logo-wrap {
    padding: 1.5rem 2rem;
    max-width: 280px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.4));
    box-shadow:
        0 20px 40px rgba(2, 8, 23, 0.55),
        0 0 0 1px rgba(148, 163, 184, 0.12),
        0 0 40px rgba(57, 208, 255, 0.15);
    backdrop-filter: blur(10px);
    animation: float 5s ease-in-out infinite;
    transition: var(--transition);
    max-width: 600px;
}

.hero-logo-wrap:hover {
    transform: translateY(-6px);
    box-shadow:
        0 28px 60px rgba(2, 8, 23, 0.7),
        0 0 0 1px rgba(57, 208, 255, 0.4),
        0 0 50px rgba(57, 208, 255, 0.25);
}

.hero-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(2, 8, 23, 0.7));
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 3vw + 2rem, 4.2rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    line-height: 1.05;
    text-shadow: 0 12px 30px rgba(2, 8, 23, 0.65);
}

.hero-subheadline {
    font-size: clamp(1.05rem, 1vw + 0.9rem, 1.45rem);
    color: var(--color-text-muted);
    max-width: 600px;
    text-align: center;
}

.hero-headline::after {
    content: '';
    display: block;
    margin: 1rem auto 0;
    width: 110px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-strong));
    border-radius: 999px;
    box-shadow: 0 0 14px var(--color-glow);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heroEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About */
.about {
    padding: 6rem 0 5rem;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    position: relative;
}

.section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--color-accent);
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.about-content {
    max-width: 760px;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    background: linear-gradient(140deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 20px 50px rgba(2, 8, 23, 0.4);
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Projects */
.projects {
    padding: 7rem 0 6rem;
    background:
        linear-gradient(180deg, var(--color-bg-alt) 0%, #06090f 100%);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(57, 208, 255, 0.08), transparent 60%);
    filter: blur(10px);
    pointer-events: none;
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-top: 2.5rem;
}

.project-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(10, 15, 22, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: 0 20px 50px rgba(2, 8, 23, 0.55);
    display: grid;
    grid-template-columns: 1fr;
    opacity: 0;
    transform: translateY(24px);
}

@media (min-width: 920px) {
    .project-card {
        grid-template-columns: 1.1fr 1fr;
        align-items: stretch;
    }

    .project-card:nth-child(even) {
        direction: rtl;
    }

    .project-card:nth-child(even) > * {
        direction: ltr;
    }
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card.visible:hover {
    border-color: rgba(57, 208, 255, 0.6);
    transform: translateY(-8px);
    box-shadow:
        0 30px 70px rgba(2, 8, 23, 0.7),
        0 0 0 1px rgba(57, 208, 255, 0.4),
        0 0 40px rgba(57, 208, 255, 0.15);
}

.project-image {
    width: 100%;
    min-height: 320px;
    background: radial-gradient(circle at top, rgba(57, 208, 255, 0.15), transparent 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(5, 7, 11, 0.4), rgba(5, 7, 11, 0.85)),
        linear-gradient(0deg, rgba(5, 7, 11, 0.4), transparent 60%);
    z-index: 1;
}

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

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

.project-image-triple {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #0c121b;
}

.project-image-triple::before {
    display: none;
}

.grid-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.grid-image,
.grid-explainer {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: #0f1520;
}

.project-content {
    padding: 2.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-title {
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
    line-height: 1.25;
}

.project-description {
    color: var(--color-text-muted);
    line-height: 1.75;
    font-size: 0.98rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    font-size: 0.72rem;
    padding: 0.35rem 0.9rem;
    background: rgba(57, 208, 255, 0.1);
    border: 1px solid rgba(57, 208, 255, 0.3);
    border-radius: 999px;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: var(--transition-fast);
}

.tag:hover {
    background: rgba(57, 208, 255, 0.2);
    border-color: rgba(57, 208, 255, 0.6);
    transform: translateY(-1px);
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    width: fit-content;
}

.project-link:hover {
    color: var(--color-accent-strong);
    gap: 0.75rem;
}

.project-note {
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.82rem;
    font-style: italic;
    margin: 0;
}

/* One Play a Day placeholder */
.opad-placeholder {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #101827 0%, #0c111a 100%);
    color: rgba(148, 163, 184, 0.8);
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.opad-placeholder-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.opad-placeholder-text {
    font-size: 0.9rem;
    max-width: 200px;
}

/* Footer */
.footer {
    padding: 3.5rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background-color: #05070b;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: rgba(148, 163, 184, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a:hover {
    color: var(--color-accent);
}

/* Responsive */
@media (max-width: 960px) {
    .container {
        padding: 0 1.75rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-logo-wrap {
        max-width: 220px;
        margin: 0 auto;
    }

    .hero-headline::after {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.9rem 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(5, 7, 11, 0.98);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 9rem 0 5rem;
        min-height: 70vh;
    }

    .hero-text {
        align-items: center;
    }

    .about {
        padding: 4.5rem 0 4rem;
    }

    .about-content {
        padding: 1.75rem;
    }

    .projects {
        padding: 5rem 0 4.5rem;
    }

    .project-content {
        padding: 2rem;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 1.2rem;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .hero-logo-wrap {
        padding: 1rem;
    }

    .project-image {
        min-height: 240px;
    }

    .project-content {
        padding: 1.5rem;
    }

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Print */
@media print {
    .nav,
    .project-links {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .project-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
