/* ============================================
   namu.systems — Graffiti-Tagged Systems Terminal
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    color: #5A4A30;
    background-color: #F0E8D8;
    overflow-x: hidden;
    position: relative;
}

/* === Organic Blob Background Layer === */
.blob-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
}

.blob-1 {
    top: -5%;
    left: -5%;
    animation: drift 20s ease-in-out infinite;
}

.blob-2 {
    top: 30%;
    right: -10%;
    animation: drift 25s ease-in-out infinite reverse;
}

.blob-3 {
    bottom: -10%;
    left: 20%;
    animation: drift 22s ease-in-out infinite 3s;
}

@keyframes drift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(30px, -20px) rotate(5deg) scale(1.03);
    }
    50% {
        transform: translate(-15px, 25px) rotate(-3deg) scale(0.97);
    }
    75% {
        transform: translate(20px, 15px) rotate(4deg) scale(1.02);
    }
}

/* === Icon Navigation === */
.icon-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(240, 232, 216, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid rgba(90, 74, 48, 0.15);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.4rem;
    color: #2A1E10;
    letter-spacing: 2px;
}

.nav-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.nav-icon-link:hover {
    background-color: rgba(90, 74, 48, 0.08);
}

.nav-icon-link::after {
    content: attr(data-label);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Permanent Marker', cursive;
    font-size: 0.65rem;
    color: #A08050;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-icon-link:hover::after {
    opacity: 1;
}

.nav-icon {
    width: 48px;
    height: 48px;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title-group {
    margin-bottom: 32px;
}

.hero-title {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: #2A1E10;
    letter-spacing: 4px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-dot {
    color: #C05040;
}

.hero-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #A08050;
    display: block;
    transform: rotate(-2deg);
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(250, 244, 232, 0.7);
    border: 1px solid rgba(90, 74, 48, 0.15);
    border-radius: 20px;
}

.status-text {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.85rem;
    color: #508040;
    letter-spacing: 1px;
}

.hero-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #A08050, transparent);
    opacity: 0.4;
    animation: scanline 4s linear infinite;
}

@keyframes scanline {
    0% { top: 0; }
    100% { top: 100%; }
}

/* === Status Indicators === */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-active {
    background-color: #508040;
    box-shadow: 0 0 6px rgba(80, 128, 64, 0.5);
    animation: pulse-green 2s ease-in-out infinite;
}

.status-warning {
    background-color: #A08050;
    box-shadow: 0 0 6px rgba(160, 128, 80, 0.5);
    animation: pulse-amber 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px rgba(80, 128, 64, 0.4); }
    50% { box-shadow: 0 0 10px rgba(80, 128, 64, 0.7); }
}

@keyframes pulse-amber {
    0%, 100% { box-shadow: 0 0 4px rgba(160, 128, 80, 0.4); }
    50% { box-shadow: 0 0 10px rgba(160, 128, 80, 0.7); }
}

/* === F-Pattern Grid Layout === */
.f-pattern-grid {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Feature Row (Full Width Top Band) === */
.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.feature-card {
    background: #FAF4E8;
    padding: 32px 28px;
    border-radius: 4px;
    border-left: 3px solid #C05040;
    position: relative;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
}

.card-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.8rem;
    color: #A08050;
    display: block;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.card-heading {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: #2A1E10;
    margin-bottom: 12px;
}

.card-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    color: #5A4A30;
    line-height: 1.8;
}

/* === F-Content (60/40 Split) === */
.f-content {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 20px;
    margin-bottom: 60px;
}

.f-left {
    min-width: 0;
}

.f-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* === Content Blocks === */
.content-block {
    background: #FAF4E8;
    padding: 36px 32px;
    border-radius: 4px;
    position: relative;
}

.section-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.85rem;
    color: #C05040;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.section-heading {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #2A1E10;
    margin-bottom: 16px;
}

.section-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    color: #5A4A30;
    line-height: 1.8;
    margin-bottom: 16px;
}

.section-body:last-of-type {
    margin-bottom: 24px;
}

/* === Process Visual === */
.process-visual {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-number {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.9rem;
    color: #A08050;
    width: 28px;
    flex-shrink: 0;
}

.step-label {
    font-family: 'Bitter', serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: #2A1E10;
    width: 70px;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.step-bar {
    flex: 1;
    height: 8px;
    background: rgba(200, 176, 144, 0.3);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.step-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #508040, #A08050);
    border-radius: 4px;
    transition: width 1.2s ease-out;
}

.step-bar.animated::after {
    width: var(--bar-width);
}

/* === Sidebar Blocks === */
.sidebar-block {
    background: #FAF4E8;
    padding: 24px 20px;
    border-radius: 4px;
    border-top: 2px solid #A08050;
}

.sidebar-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.75rem;
    color: #A08050;
    display: block;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

/* === Status List === */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(200, 176, 144, 0.3);
}

.status-item:last-child {
    border-bottom: none;
}

.status-name {
    font-family: 'Bitter', serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2A1E10;
    flex: 1;
}

.status-value {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.7rem;
    color: #508040;
    letter-spacing: 1px;
}

/* === Graffiti Quote === */
.sidebar-quote {
    border-top-color: #C05040;
}

.graffiti-quote {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: #2A1E10;
    line-height: 1.6;
    transform: rotate(-1deg);
    position: relative;
    padding-left: 16px;
    border-left: 3px solid #C05040;
}

/* === Network Visual === */
.network-visual {
    margin-top: 24px;
    background: rgba(240, 232, 216, 0.5);
    border-radius: 4px;
    padding: 16px;
    overflow: hidden;
}

.network-svg {
    width: 100%;
    height: auto;
}

/* === Metrics Grid === */
.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.metric-item {
    text-align: center;
}

.metric-value {
    font-family: 'Bitter', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: #2A1E10;
    display: block;
    line-height: 1.2;
}

.metric-label {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.7rem;
    color: #A08050;
    letter-spacing: 1px;
    display: block;
    margin-top: 4px;
}

/* === Archive Entries === */
.archive-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.archive-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(200, 176, 144, 0.25);
    transition: background-color 0.3s ease;
}

.archive-entry:last-child {
    border-bottom: none;
}

.archive-entry:hover {
    background-color: rgba(200, 176, 144, 0.08);
}

.archive-date {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.75rem;
    color: #A08050;
    width: 90px;
    flex-shrink: 0;
    letter-spacing: 1px;
}

.archive-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    color: #5A4A30;
    flex: 1;
}

.archive-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* === Code Fragment === */
.code-fragment {
    background: #2A1E10;
    border-radius: 4px;
    padding: 20px;
    overflow-x: auto;
}

.code-fragment pre {
    margin: 0;
}

.code-fragment code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    color: #C8B090;
    line-height: 1.7;
}

/* === Signal Section === */
.signal-section {
    margin-bottom: 60px;
}

.signal-content {
    background: #FAF4E8;
    padding: 36px 32px;
    border-radius: 4px;
}

.signal-wave {
    margin-top: 24px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(240, 232, 216, 0.5);
    padding: 16px 0;
}

.wave-svg {
    width: 100%;
    height: 120px;
    display: block;
}

/* === Blur-Focus Reveal === */
.blur-reveal {
    filter: blur(4px);
    opacity: 0.7;
    transition: filter 400ms ease-out, opacity 400ms ease-out;
}

.blur-reveal.revealed {
    filter: blur(0);
    opacity: 1;
}

/* === Footer === */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 2px solid rgba(90, 74, 48, 0.15);
    margin-top: 40px;
    padding: 32px 24px;
    background: rgba(240, 232, 216, 0.8);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-tag {
    font-family: 'Permanent Marker', cursive;
    font-size: 1rem;
    color: #2A1E10;
    letter-spacing: 2px;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Permanent Marker', cursive;
    font-size: 0.75rem;
    color: #508040;
    letter-spacing: 1px;
}

.footer-mark {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.75rem;
    color: #A08050;
}

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

    .f-content {
        grid-template-columns: 1fr;
    }

    .nav-icons {
        gap: 4px;
    }

    .nav-icon-link {
        width: 44px;
        height: 44px;
    }

    .nav-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        letter-spacing: 2px;
    }

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

    .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .archive-entry {
        flex-wrap: wrap;
        gap: 8px;
    }

    .archive-date {
        width: auto;
    }
}
