/* ============================================================
   PROJECT DETAIL — DARK BOLD EDITORIAL
   Oversized display type · numbered sections · thin rules
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #0a0a0c;
    --bg-2: #101013;
    --line: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.07);

    --fg: #f4f4f6;
    --fg-muted: #8c8c96;
    --fg-dim: #5c5c66;

    --accent: #4d7cff;
    --accent-bright: #6f97ff;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --maxw: 1320px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    counter-reset: sec;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- NAVIGATION ---------- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 56px;
    z-index: 999;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-soft);
}

#nav h3 {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#nav h3 a { color: var(--fg); text-decoration: none; }
#nav h3 b { font-weight: 700; }

.back-button {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s var(--ease);
}

.back-button:hover { color: var(--fg); }

/* ---------- HERO ---------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 140px 56px 8vh;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line-soft);
}

.hero-content {
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
}

.project-category {
    display: inline-block;
    font-size: clamp(12px, 1vw, 14px);
    color: var(--accent-bright);
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.hero-title {
    font-size: clamp(48px, 9.5vw, 140px);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.92;
    margin-bottom: 36px;
    color: var(--fg);
    max-width: 16ch;
}

.hero-description {
    font-size: clamp(17px, 1.7vw, 23px);
    color: var(--fg-muted);
    font-weight: 400;
    margin-bottom: 44px;
    line-height: 1.55;
    max-width: 760px;
}

.hero-meta {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 44px;
    border-top: 1px solid var(--line-soft);
    padding-top: 28px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 48px;
    margin-right: 48px;
    border-right: 1px solid var(--line-soft);
}

.meta-item:last-child { border-right: none; margin-right: 0; padding-right: 0; }

.meta-label {
    color: var(--fg-dim);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.meta-value { color: var(--fg); font-weight: 600; font-size: 16px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-btn {
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.35s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-btn.primary {
    background: var(--fg);
    color: var(--bg);
    border: 1px solid var(--fg);
}

.hero-btn.primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.hero-btn.secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--line);
}

.hero-btn.secondary:hover { border-color: var(--fg); transform: translateY(-2px); }

/* ---------- SECTION SHELL ---------- */
.overview-section,
.features-section,
.gallery-section,
.case-study-section,
.tech-section,
.impact-section {
    padding: 13vh 56px;
    position: relative;
    border-bottom: 1px solid var(--line-soft);
}

.section-container { max-width: var(--maxw); margin: 0 auto; }

.section-title {
    counter-increment: sec;
    font-size: clamp(36px, 6vw, 88px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 0.98;
    margin-bottom: 18px;
    text-align: left;
    color: var(--fg);
}

.section-title::before {
    content: counter(sec, decimal-leading-zero) ' \2014';
    display: block;
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--accent-bright);
    margin-bottom: 22px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: clamp(16px, 1.4vw, 20px);
    color: var(--fg-muted);
    text-align: left;
    margin-bottom: 64px;
    max-width: 680px;
    line-height: 1.55;
}

/* ---------- FLAT PANEL BASE ---------- */
.overview-card,
.feature-card,
.timeline-card,
.architecture-card,
.outcome-card,
.tech-category,
.impact-stat {
    position: relative;
    background: transparent;
    border-top: 1px solid var(--line);
    padding-top: 30px;
    transition: border-color 0.4s var(--ease);
}

.overview-card:hover,
.feature-card:hover,
.timeline-card:hover,
.architecture-card:hover,
.outcome-card:hover,
.tech-category:hover,
.impact-stat:hover {
    border-color: var(--accent);
}

/* ---------- OVERVIEW ---------- */
.overview-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 48px 40px;
}

.card-icon { font-size: 34px; margin-bottom: 20px; display: block; }

.card-title {
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.card-description { font-size: 16px; color: var(--fg-muted); line-height: 1.65; }

/* ---------- FEATURES ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 44px 40px;
}

.feature-icon { font-size: 28px; margin-bottom: 18px; display: block; }

.feature-title {
    font-size: clamp(19px, 1.7vw, 25px);
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.feature-description { font-size: 15px; color: var(--fg-muted); line-height: 1.6; }

/* ---------- GALLERY GRID ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 28px;
}

.gallery-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-2);
    aspect-ratio: 16 / 9;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--ease);
}

.gallery-item:hover img,
.gallery-item:hover video { transform: scale(1.05); }

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 12, 0.85), transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: 26px;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-title { font-size: 20px; font-weight: 600; color: #fff; }

/* ---------- TIMELINE / ARCHITECTURE / OUTCOMES ---------- */
.timeline-grid,
.architecture-grid,
.outcome-grid { display: grid; gap: 48px 40px; }

.timeline-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.architecture-grid,
.outcome-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.timeline-step,
.architecture-step,
.outcome-step {
    display: block;
    margin-bottom: 18px;
    color: var(--accent-bright);
    font-weight: 600;
    font-size: clamp(36px, 4vw, 56px);
    letter-spacing: -0.04em;
    line-height: 1;
}

.timeline-title,
.architecture-title,
.outcome-title,
.demo-title {
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.timeline-description,
.architecture-description,
.outcome-description,
.demo-description { font-size: 15px; color: var(--fg-muted); line-height: 1.65; }

.architecture-card ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; }

.architecture-card li {
    color: var(--fg-muted);
    font-size: 14.5px;
    line-height: 1.5;
    padding-left: 20px;
    position: relative;
}

.architecture-card li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    position: absolute;
    left: 0;
    top: 8px;
}

/* ---------- LIVE DEMO ---------- */
.gallery-showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 40px;
    align-items: start;
}

.demo-panel { position: relative; }

.demo-media {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #04050a;
    border: 1px solid var(--line-soft);
}

.demo-media video,
.demo-media img { width: 100%; display: block; max-height: 540px; object-fit: cover; }

.demo-title { margin-top: 22px; }

.demo-notes { display: grid; gap: 0; }

.demo-note {
    padding: 22px 0;
    border-top: 1px solid var(--line-soft);
}

.demo-note:first-child { border-top: none; padding-top: 0; }

.demo-note strong {
    display: block;
    font-size: 17px;
    color: var(--fg);
    margin-bottom: 7px;
    font-weight: 600;
}

.demo-note span { font-size: 14.5px; color: var(--fg-muted); line-height: 1.55; }

/* ---------- TECH STACK ---------- */
.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px 40px;
}

.tech-category-title {
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.tech-list { display: flex; flex-wrap: wrap; gap: 10px; }

.tech-tag {
    padding: 9px 18px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50px;
    font-size: 13.5px;
    color: var(--fg-muted);
    font-weight: 500;
    transition: all 0.3s var(--ease);
}

.tech-tag:hover { border-color: var(--accent); color: var(--fg); }

/* ---------- OUTCOMES / IMPACT (BIG NUMBERS) ---------- */
.outcome-metric {
    display: block;
    font-size: clamp(64px, 9vw, 130px);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.9;
    color: var(--fg);
    margin-bottom: 16px;
}

.outcome-card .stat-label { display: block; margin-bottom: 10px; }

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
}

.impact-stat {
    text-align: left;
    padding: 0 40px;
    border-top: none;
    border-left: 1px solid var(--line);
    padding-top: 0;
}

.impact-stat:first-child { padding-left: 0; border-left: none; }
.impact-stat:hover { border-color: var(--accent); }

.stat-number {
    display: block;
    font-size: clamp(56px, 7.5vw, 120px);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.95;
    color: var(--fg);
    margin-bottom: 12px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--fg-muted);
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ---------- CTA ---------- */
.cta-section {
    padding: 18vh 56px;
    text-align: center;
    position: relative;
}

.cta-section h2 {
    font-size: clamp(44px, 9vw, 150px);
    margin-bottom: 32px;
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 0.95;
    color: var(--fg);
}

.cta-section p {
    font-size: clamp(16px, 1.4vw, 20px);
    color: var(--fg-muted);
    margin-bottom: 48px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.cta-button {
    padding: 18px 44px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.35s var(--ease);
    display: inline-block;
    letter-spacing: 0.3px;
}

.cta-button.primary {
    background: var(--fg);
    color: var(--bg);
    border: 1px solid var(--fg);
}

.cta-button.primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.cta-button.secondary {
    background: transparent;
    color: var(--fg-muted);
    border: 1px solid var(--line);
}

.cta-button.secondary:hover { color: var(--fg); border-color: var(--fg); transform: translateY(-2px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    #nav { padding: 18px 28px; }
    .hero-section { padding: 130px 28px 8vh; }
    .overview-section,
    .features-section,
    .gallery-section,
    .case-study-section,
    .tech-section,
    .impact-section,
    .cta-section { padding-left: 28px; padding-right: 28px; }
}

@media (max-width: 768px) {
    #nav { padding: 14px 20px; }
    #nav h3 { font-size: 11px; }
    .back-button { font-size: 11px; }

    .hero-section { padding: 120px 20px 9vh; min-height: 90vh; }

    .meta-item {
        padding-right: 0; margin-right: 0; border-right: none;
        padding-bottom: 18px; margin-bottom: 18px;
        border-bottom: 1px solid var(--line-soft);
        width: 100%;
    }
    .meta-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

    .hero-actions { flex-direction: column; width: 100%; }
    .hero-btn { width: 100%; justify-content: center; }

    .overview-section,
    .features-section,
    .gallery-section,
    .case-study-section,
    .tech-section,
    .impact-section { padding: 9vh 20px; }

    .section-subtitle { margin-bottom: 44px; }

    .overview-content,
    .features-grid,
    .tech-categories,
    .timeline-grid,
    .architecture-grid,
    .outcome-grid,
    .gallery-showcase,
    .gallery-grid { grid-template-columns: 1fr; gap: 40px; }

    .impact-stats { grid-template-columns: 1fr 1fr; gap: 36px 0; }
    .impact-stat { padding: 0 20px; }
    .impact-stat:nth-child(odd) { padding-left: 0; border-left: none; }

    .cta-section { padding: 12vh 20px; }
    .cta-buttons { flex-direction: column; }
    .cta-button { width: 100%; }
}

@media (max-width: 480px) {
    .impact-stats { grid-template-columns: 1fr; gap: 36px; }
    .impact-stat { padding-left: 0; border-left: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
