/* ============================================
   DEEGLERDEV - SHARED STYLES
   Theme: locked dark. One accent (coral).
   Radius system: containers 16px, small elements 8px.
   ============================================ */

:root {
    /* Colors */
    --bg: #0b0f14;
    --surface: #121821;
    --surface-raised: #18202b;
    --border: rgba(232, 237, 242, 0.09);
    --border-strong: rgba(232, 237, 242, 0.16);
    --accent: #ff6b6b;
    --accent-soft: rgba(255, 107, 107, 0.12);
    --text: #e8edf2;
    --text-muted: #8b99a8;
    --status-released: #5dd39e;
    --status-in-progress: #ffb84d;

    /* Typography */
    --font-sans: 'Geist', system-ui, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, monospace;

    /* Shape */
    --radius-lg: 16px;
    --radius-sm: 8px;

    /* Layout */
    --nav-height: 68px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(11, 15, 20, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text);
    transition: color 0.2s;
}

.nav__logo:hover {
    color: var(--accent);
}

.nav__links {
    display: flex;
    gap: 6px;
}

.nav__link {
    font-size: 14px;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background-color 0.2s;
}

.nav__link:hover {
    color: var(--text);
    background: var(--surface-raised);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    padding: 88px 0 96px;
    overflow: hidden;
}

/* Single ambient glow: ties hero to the accent without gradient slop */
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -120px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.07) 0%, transparent 65%);
    pointer-events: none;
}

.hero__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    align-items: center;
}

.hero__availability {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero__availability-sep {
    color: var(--border-strong);
}

.hero__title {
    font-size: clamp(2.75rem, 6.5vw, 4.25rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 16px;
}

.hero__subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 28ch;
}

.hero__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    padding: 5px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.hero__media {
    position: relative;
}

.hero__media a {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s;
}

.hero__media a:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 107, 0.4);
}

.hero__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero__media-caption {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

/* Semantic status dot: real availability state only */
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot--green {
    background: var(--status-released);
    box-shadow: 0 0 0 3px rgba(93, 211, 158, 0.15);
}

.dot--amber {
    background: var(--status-in-progress);
    box-shadow: 0 0 0 3px rgba(255, 184, 77, 0.15);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 88px 0;
    border-top: 1px solid var(--border);
}

.section__title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

/* ============================================
   FEATURED PROJECT
   ============================================ */
.project {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: start;
}

.gallery__main {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-strong);
    background: var(--surface);
}

.gallery__main img,
.gallery__main iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.gallery__play {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.gallery__play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 15, 20, 0.3);
    transition: background-color 0.2s;
}

.gallery__play:hover .gallery__play-badge {
    background: rgba(11, 15, 20, 0.15);
}

.gallery__play-badge span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(11, 15, 20, 0.75);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 20px;
    padding-left: 4px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}

.gallery__play:hover .gallery__play-badge span {
    transform: scale(1.08);
    background: var(--accent);
}

.gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.gallery__thumb {
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s, border-color 0.2s;
}

.gallery__thumb img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.gallery__thumb:hover {
    opacity: 0.85;
}

.gallery__thumb.active {
    opacity: 1;
    border-color: var(--accent);
}

.project__header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.project__title {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.project__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.project__description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 60ch;
}

.project__specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.project__spec-key {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.project__spec-value {
    font-size: 15px;
    font-weight: 500;
}

.project__systems {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.project__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--bg);
    background: var(--accent);
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    transition: transform 0.2s, filter 0.2s;
}

.project__link:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.project__link:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================
   AUDIO
   ============================================ */
.audio__empty {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 64px 24px;
    text-align: center;
}

.audio__empty-title {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text-muted);
}

/* ============================================
   BLOG
   ============================================ */
.blog-header {
    padding: 80px 0 24px;
}

.blog-header__title {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.blog-header__subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 50ch;
}

.blog-posts {
    max-width: 760px;
    padding-bottom: 88px;
}

.blog-post {
    padding: 48px 0;
}

.blog-post + .blog-post {
    border-top: 1px solid var(--border);
}

.blog-post__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.blog-post__date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

.blog-post__tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    padding: 3px 10px;
    border: 1px solid rgba(255, 107, 107, 0.35);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
}

.blog-post__title {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.blog-post__content p {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 16px;
}

.blog-post__content p:last-child {
    margin-bottom: 0;
}

.blog-post__content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
}

.blog-post__content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.blog-post__content pre code {
    background: none;
    border: none;
    padding: 0;
}

/* ============================================
   FOOTER / CONTACT
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 72px 0 40px;
    background: var(--surface);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 56px;
}

.footer__title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.footer__note {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--status-released);
}

.footer__links {
    list-style: none;
    display: grid;
    gap: 4px;
    justify-self: end;
    width: 100%;
    max-width: 380px;
}

.footer__links li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

.footer__links li + li {
    border-top: 1px solid var(--border);
}

.footer__link-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

.footer__links a {
    font-size: 15px;
    color: var(--text);
    transition: color 0.2s;
}

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

.footer__copyright {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ============================================
   SCROLL REVEAL (JS adds .reveal, observer adds .is-visible)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero__media a,
    .gallery__play-badge span,
    .project__link {
        transition: none;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero {
        padding: 56px 0 72px;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .project {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .footer__links {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .nav__link {
        font-size: 13px;
        padding: 8px 8px;
    }

    .nav__logo {
        font-size: 13px;
    }

    .section {
        padding: 64px 0;
    }

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

    .footer__links li {
        flex-direction: column;
        gap: 2px;
    }
}
