/* ============================================
   STORIOGRAPHER.NET - Frutiger Aero + Data-Viz
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: #2a3a4a;
    background-color: #e8eff4;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #d8e4ec 0%, #e8eff4 50%, #f4f8fc 100%);
    position: relative;
    overflow: hidden;
}

.hud-frame {
    position: relative;
    width: 90%;
    max-width: 800px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HUD Corner Brackets */
.hud-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0;
}

.hud-tl { top: 0; left: 0; }
.hud-tr { top: 0; right: 0; }
.hud-bl { bottom: 0; left: 0; }
.hud-br { bottom: 0; right: 0; }

.hud-corner path {
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.5s ease-out;
}

.hud-corner.animate {
    opacity: 1;
}

.hud-corner.animate path {
    stroke-dashoffset: 0;
}

/* HUD Arcs */
.hud-arc {
    position: absolute;
    width: 120px;
    height: 240px;
    opacity: 0;
    transition: opacity 1s ease-out 0.5s;
}

.hud-arc-left {
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
}

.hud-arc-right {
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
}

.hud-arc.animate {
    opacity: 0.5;
}

.hud-arc path {
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 2s ease-out 0.3s;
}

.hud-arc.animate path {
    stroke-dashoffset: 0;
}

/* HUD Central Circle */
.hud-circle {
    position: absolute;
    width: 360px;
    height: 360px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.5s ease-out 0.3s;
}

.hud-circle.animate {
    opacity: 1;
}

.hud-circle circle {
    transition: stroke-dashoffset 2.5s ease-out;
}

/* Hero Content */
.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease-out 0.6s, transform 0.8s ease-out 0.6s;
}

.hero-content.animate {
    opacity: 1;
    transform: translateY(0);
}

.hero-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    color: #7a8a9a;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(36px, 7vw, 72px);
    font-weight: 400;
    letter-spacing: 8px;
    color: #2a3a4a;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(14px, 2vw, 20px);
    color: #7a8a9a;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 40px;
}

/* Hero Data Bar */
.hero-data-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: rgba(244, 248, 252, 0.7);
    border: 1px solid rgba(74, 138, 184, 0.15);
    border-radius: 8px;
    padding: 16px 32px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.data-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #7a8a9a;
}

.data-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 28px;
    color: #4a8ab8;
    line-height: 1;
}

.data-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #7a8a9a, transparent);
    opacity: 0.3;
}

/* --- Section Headers (HUD-framed) --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 400;
    letter-spacing: 4px;
    color: #2a3a4a;
}

.bracket-left,
.bracket-right {
    width: 24px;
    height: 32px;
    flex-shrink: 0;
}

/* --- Portfolio Section --- */
#portfolio {
    padding: 80px 5% 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* --- Project Cards --- */
.project-card {
    background: #f4f8fc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease;
}

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

.project-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Frutiger aero glossy top-edge highlight */
.project-card::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.card-dataviz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    background: linear-gradient(180deg, rgba(216, 228, 236, 0.3) 0%, transparent 100%);
}

.mini-chart {
    width: 160px;
    height: 40px;
    flex-shrink: 0;
}

.progress-ring {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.ring-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    fill: #2a3a4a;
}

.card-content {
    padding: 8px 24px 24px;
}

.card-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: #3aaa98;
    text-transform: uppercase;
}

.card-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 400;
    color: #2a3a4a;
    margin: 8px 0 12px;
    line-height: 1.3;
}

.card-summary {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(14px, 1.3vw, 16px);
    color: #7a8a9a;
    line-height: 1.65;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.meta-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: #7a8a9a;
}

.meta-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #4a8ab8;
}

.status-active {
    color: #4a8ab8;
}

.status-complete {
    color: #5ab868;
}

/* --- Data Panel / Analytics Section --- */
#data-panel {
    padding: 80px 5% 100px;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

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

.analytics-card {
    background: #f4f8fc;
    border-radius: 10px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.analytics-card::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9), transparent);
    margin-bottom: 8px;
}

.analytics-viz {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.large-ring {
    width: 100px;
    height: 100px;
}

.analytics-ring-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    fill: #2a3a4a;
}

.analytics-ring-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    fill: #7a8a9a;
    letter-spacing: 1px;
}

.analytics-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    color: #2a3a4a;
    margin-bottom: 10px;
}

.analytics-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    color: #7a8a9a;
    line-height: 1.65;
}

/* --- Methodology Section --- */
#approach {
    padding: 80px 5% 100px;
    max-width: 1000px;
    margin: 0 auto;
}

.methodology-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.method-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 20px;
    row-gap: 6px;
    align-items: start;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.method-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step-number {
    grid-row: 1 / 4;
    font-family: 'Share Tech Mono', monospace;
    font-size: 36px;
    color: #d8e4ec;
    line-height: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
}

.step-bar {
    height: 3px;
    background: linear-gradient(to right, #4a8ab8, #3aaa98);
    border-radius: 2px;
    width: 0;
    transition: width 1s ease-out 0.3s;
    margin-bottom: 4px;
}

.method-step.visible .step-bar {
    width: var(--bar-width, 100%);
}

.step-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 400;
    color: #2a3a4a;
    letter-spacing: 1px;
}

.step-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(14px, 1.3vw, 16px);
    color: #7a8a9a;
    line-height: 1.65;
}

/* --- Footer --- */
#site-footer {
    padding: 40px 5% 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    letter-spacing: 4px;
    color: #2a3a4a;
}

.footer-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    color: #7a8a9a;
}

.footer-meta {
    display: flex;
    gap: 24px;
}

.footer-datum {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: #7a8a9a;
}

.footer-label {
    color: #4a8ab8;
    margin-right: 4px;
}

.footer-line {
    height: 1px;
    background: linear-gradient(to right, transparent, #7a8a9a, transparent);
    opacity: 0.2;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-data-bar {
        flex-direction: column;
        gap: 16px;
        padding: 20px 24px;
    }

    .data-divider {
        width: 40px;
        height: 1px;
        background: linear-gradient(to right, transparent, #7a8a9a, transparent);
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .hud-circle {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 600px) {
    .card-dataviz-header {
        padding: 16px 16px 8px;
    }

    .card-content {
        padding: 8px 16px 20px;
    }

    .mini-chart {
        width: 120px;
    }

    .hud-arc {
        display: none;
    }

    .method-step {
        grid-template-columns: 40px 1fr;
        column-gap: 12px;
    }

    .step-number {
        font-size: 28px;
    }
}
