/* ==========================================================================
   infra.day - Neubrutalist Infrastructure Design
   ========================================================================== */

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

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

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    font-size: clamp(14px, 1vw, 16px);
    color: #1A1A18;
    background-color: #F0F0E8;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, .footer-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

code, .card-code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 13px;
}

/* --- Section Foundations --- */
.section-light {
    background-color: #F0F0E8;
    color: #1A1A18;
    position: relative;
    overflow: hidden;
}

.section-dark {
    background-color: #1A1A18;
    color: #F0F0E8;
    position: relative;
    border-top: 4px solid #1A1A18;
    border-bottom: 4px solid #1A1A18;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
    position: relative;
    z-index: 2;
}

.section-heading {
    font-size: clamp(36px, 6vw, 72px);
    color: #F0F0E8;
    margin-bottom: 48px;
    line-height: 1.1;
}

.section-heading-dark {
    color: #1A1A18;
}

/* ==========================================================================
   SECTION 1: Hero
   ========================================================================== */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.hero-title-wrapper {
    display: inline-block;
    position: relative;
}

.hero-infra {
    font-size: clamp(48px, 12vw, 160px);
    letter-spacing: 0.04em;
    color: #1A1A18;
    display: inline-block;
    padding: 10px 30px;
    border: 4px solid #1A1A18;
    box-shadow: 6px 6px 0px #1A1A18;
    background-color: #F0F0E8;
    line-height: 1;
    opacity: 0;
    transform: translateY(-50px);
}

.hero-infra.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-day {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 5vw, 72px);
    letter-spacing: 0.04em;
    color: #D04040;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(30px);
}

.hero-day.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out 0.2s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #8A8A80;
    margin-top: 24px;
    opacity: 0;
}

.hero-tagline.animate-in {
    opacity: 1;
    transition: opacity 0.6s ease-out 0.5s;
}

/* ==========================================================================
   Bokeh Background Circles
   ========================================================================== */
.bokeh-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.bokeh-amber {
    background: radial-gradient(circle, #D4A040 0%, transparent 70%);
    opacity: 0.08;
}

.bokeh-blue {
    background: radial-gradient(circle, #4060A0 0%, transparent 70%);
    opacity: 0.08;
}

/* Bokeh drift animations */
@keyframes bokeh-drift-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(25px, -15px); }
    50% { transform: translate(-10px, 30px); }
    75% { transform: translate(-25px, -10px); }
}

@keyframes bokeh-drift-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-20px, 20px); }
    50% { transform: translate(30px, -10px); }
    75% { transform: translate(10px, 25px); }
}

@keyframes bokeh-drift-3 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(15px, 25px); }
    50% { transform: translate(-25px, -20px); }
    75% { transform: translate(20px, -15px); }
}

.bokeh-circle:nth-child(1) { animation: bokeh-drift-1 25s ease-in-out infinite; }
.bokeh-circle:nth-child(2) { animation: bokeh-drift-2 30s ease-in-out infinite; }
.bokeh-circle:nth-child(3) { animation: bokeh-drift-3 22s ease-in-out infinite; }
.bokeh-circle:nth-child(4) { animation: bokeh-drift-1 35s ease-in-out infinite reverse; }
.bokeh-circle:nth-child(5) { animation: bokeh-drift-2 28s ease-in-out infinite; }
.bokeh-circle:nth-child(6) { animation: bokeh-drift-3 32s ease-in-out infinite reverse; }

/* ==========================================================================
   SECTION 2: Infrastructure Type Cards
   ========================================================================== */
.card-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.neubrutalist-card {
    border: 3px solid #1A1A18;
    box-shadow: 4px 4px 0px #1A1A18;
    background-color: #F0F0E8;
    color: #1A1A18;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    cursor: default;
}

.neubrutalist-card:hover {
    transform: translate(-2px, -2px) rotate(-1deg);
    box-shadow: 6px 6px 0px #1A1A18;
}

.neubrutalist-card:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1A1A18;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 3px solid #1A1A18;
}

.card-header h3 {
    font-size: clamp(20px, 2.5vw, 32px);
    line-height: 1.2;
}

.card-header-yellow {
    background-color: #E0D040;
    color: #1A1A18;
}

.card-header-blue {
    background-color: #4060A0;
    color: #F0F0E8;
}

.card-header-red {
    background-color: #D04040;
    color: #F0F0E8;
}

.card-body {
    padding: 24px;
}

.card-body p {
    margin-bottom: 16px;
    line-height: 1.75;
}

.card-code {
    display: block;
    background-color: #1A1A18;
    color: #E0D040;
    padding: 8px 12px;
    border: 2px solid #8A8A80;
    margin-top: 8px;
}

.card-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 4px;
    opacity: 0.8;
}

.card-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #8A8A80;
    display: block;
    margin-top: 8px;
}

/* Dark section cards */
.section-dark .neubrutalist-card {
    box-shadow: 4px 4px 0px #8A8A80;
}

.section-dark .neubrutalist-card:hover {
    box-shadow: 6px 6px 0px #8A8A80;
}

.section-dark .neubrutalist-card:active {
    box-shadow: 2px 2px 0px #8A8A80;
}

/* ==========================================================================
   SECTION 3: Infrastructure Diagrams
   ========================================================================== */
#diagrams {
    padding-bottom: 40px;
}

.diagram-block {
    margin-bottom: 64px;
}

.diagram-title {
    font-size: clamp(24px, 3vw, 40px);
    color: #1A1A18;
    margin-bottom: 24px;
    display: inline-block;
    padding: 6px 16px;
    border: 3px solid #1A1A18;
    box-shadow: 4px 4px 0px #1A1A18;
    background-color: #F0F0E8;
}

.diagram-container {
    background-color: #F0F0E8;
    border: 3px solid #1A1A18;
    box-shadow: 4px 4px 0px #1A1A18;
    padding: 24px;
    overflow: visible;
}

.infra-diagram {
    width: 100%;
    height: auto;
    display: block;
}

/* Diagram lines */
.diagram-line {
    stroke: #1A1A18;
    stroke-width: 2.5;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.diagram-line.animate-in {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.4s ease-out;
}

/* Diagram nodes */
.diagram-node {
    stroke: #1A1A18;
    stroke-width: 2.5;
    transform-origin: center;
    transform: scale(0);
}

.diagram-node.animate-in {
    transform: scale(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node-yellow {
    fill: #E0D040;
}

.node-blue {
    fill: #4060A0;
}

.node-red {
    fill: #D04040;
}

/* Diagram labels */
.diagram-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    fill: #1A1A18;
    text-anchor: middle;
    opacity: 0;
}

.diagram-label.animate-in {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

/* ==========================================================================
   SECTION 4: Today in Infrastructure Feed
   ========================================================================== */
#today {
    border-top: 4px solid #1A1A18;
    padding-bottom: 20px;
}

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

.feed-card .card-header {
    padding: 12px 20px;
}

.feed-card .card-header h3 {
    font-size: clamp(16px, 2vw, 24px);
}

.feed-card .card-body {
    padding: 20px;
}

.feed-card .card-body p {
    font-size: clamp(13px, 0.9vw, 15px);
    line-height: 1.7;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#site-footer {
    background-color: #1A1A18;
    color: #F0F0E8;
    border-top: 4px solid #1A1A18;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-link {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(18px, 2vw, 28px);
    letter-spacing: 0.04em;
    color: #F0F0E8;
    text-decoration: none;
    padding: 4px 12px;
    border: 2px solid transparent;
    transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out, transform 0.15s ease-out;
}

.footer-link:hover {
    border-color: #F0F0E8;
    box-shadow: 3px 3px 0px #F0F0E8;
    transform: translate(-2px, -2px);
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-logo {
    font-size: clamp(28px, 4vw, 48px);
    color: #F0F0E8;
}

.footer-logo-dot {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(20px, 3vw, 36px);
    color: #D04040;
    letter-spacing: 0.04em;
}

.footer-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: #8A8A80;
    margin-top: 8px;
}

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

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

    .section-inner {
        padding: 60px 20px;
    }

    .hero-infra {
        padding: 8px 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }

    .diagram-container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .hero-infra {
        padding: 6px 12px;
        border-width: 3px;
        box-shadow: 4px 4px 0px #1A1A18;
    }

    .section-heading {
        margin-bottom: 32px;
    }
}
