/* ============================================================
   PROTOTYPE.RS STYLES - GOBLINCORE FIELD JOURNAL
   ============================================================ */

:root {
    /* Color Palette */
    --color-bg: #F5F0E8;              /* Aged parchment */
    --color-bg-alt: #EDE6DA;          /* Darker parchment */
    --color-surface: #E8E0D4;         /* Weathered paper */
    --color-moss: #6B7F5A;            /* Moss accent */
    --color-code: #5A6E48;            /* Code green - moss-tinted */
    --color-bark: #8B6B4A;            /* Strings - bark brown */
    --color-lichen: #A0936B;          /* Comments - lichen gold */
    --color-text: #3A3428;            /* Deep earth */
    --color-text-secondary: #6B6254;  /* Warm stone */
    --color-border: #7A6B5A;          /* Twig brown */
    --color-star: #C4A86E;            /* Pale gold */

    /* Typography */
    --font-mono: "JetBrains Mono", monospace;
    --font-serif: "Crimson Pro", serif;

    /* Font sizes with responsive scaling */
    --font-size-h1: clamp(2.2rem, 5vw, 3.8rem);
    --font-size-h2: clamp(1.3rem, 2.5vw, 1.8rem);
    --font-size-body: clamp(1.05rem, 1.5vw, 1.2rem);

    /* Spacing */
    --spacing-section: 80px;
    --spacing-container-left: clamp(48px, 8vw, 120px);
}

/* ============================================================
   GLOBAL STYLES
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-serif);
    font-size: var(--font-size-body);
    line-height: 1.82;
    overflow-x: hidden;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 var(--spacing-container-left);
    background: linear-gradient(135deg, rgba(107, 127, 90, 0.02), rgba(139, 107, 74, 0.02));
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: var(--font-size-h1);
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--color-text);
    margin-bottom: 20px;
}

.terminal-prompt {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--color-code);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
}

.prompt-symbol {
    margin-right: 8px;
    opacity: 0.8;
    color: var(--color-code);
}

.prompt-text {
    display: inline;
    min-height: 1.4em;
    color: var(--color-code);
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--color-code);
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Hero watercolor blobs */
.watercolor-hero {
    position: absolute;
    opacity: 0.3;
}

.watercolor-hero.watercolor-1 {
    width: 300px;
    height: 300px;
    top: 20%;
    right: 10%;
    border-radius: 40% 60% 50% 50% / 60% 40% 50% 50%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.2), transparent 70%);
    filter: blur(3px);
}

.watercolor-hero.watercolor-2 {
    width: 250px;
    height: 250px;
    bottom: 15%;
    right: 5%;
    border-radius: 55% 45% 60% 40% / 50% 50% 40% 60%;
    background: radial-gradient(ellipse, rgba(139, 107, 74, 0.15), transparent 70%);
    filter: blur(3px);
}

/* ============================================================
   ENTRY SECTIONS
   ============================================================ */

.entry-section {
    position: relative;
    padding: var(--spacing-section) var(--spacing-container-left) var(--spacing-section) var(--spacing-container-left);
    border-top: 1px dashed var(--color-border);
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInFromLeft 500ms ease-out forwards;
}

.entry-section:first-of-type {
    border-top: none;
}

@keyframes fadeInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.entry-container {
    max-width: 1100px;
    margin-left: 0;
    margin-right: auto;
}

/* ============================================================
   ENTRY HEADER AND TYPOGRAPHY
   ============================================================ */

.entry-header {
    margin-bottom: 30px;
}

.entry-prefix {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-code);
    letter-spacing: 0.03em;
    margin-bottom: 10px;
    opacity: 0.7;
    animation: prefixPulse 4s ease-in-out infinite;
}

@keyframes prefixPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.entry-title {
    font-family: var(--font-mono);
    font-size: var(--font-size-h2);
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--color-text);
    margin-top: 8px;
}

.entry-text {
    margin-bottom: 20px;
    line-height: 1.82;
    color: var(--color-text);
}

.entry-text code {
    font-family: var(--font-mono);
    background-color: var(--color-surface);
    padding: 2px 6px;
    border-radius: 2px;
    color: var(--color-code);
}

.font-mono {
    font-family: var(--font-mono);
    color: var(--color-code);
}

.font-serif {
    font-family: var(--font-serif);
    color: var(--color-bark);
}

/* ============================================================
   SPECIMEN CARDS
   ============================================================ */

.specimen-card {
    margin: 30px 0;
    padding: 20px 24px;
    background: linear-gradient(90deg,
        var(--color-surface) 0%,
        var(--color-surface) 100%),
        repeating-linear-gradient(
        0deg,
        rgba(122, 107, 90, 0.03) 0px,
        rgba(122, 107, 90, 0.03) 2px,
        transparent 2px,
        transparent 4px
    );
    border: 1px dashed var(--color-border);
    border-radius: 2px;
    position: relative;
}

.specimen-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-bark);
    letter-spacing: 0.03em;
    margin-bottom: 15px;
    text-transform: uppercase;
    opacity: 0.8;
    animation: labelPulse 2s ease-in-out infinite;
}

@keyframes labelPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.specimen-card pre {
    margin: 0;
    overflow-x: auto;
}

.specimen-card code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.6;
}

.specimen-card .keyword {
    color: var(--color-code);
    font-weight: 600;
}

.specimen-card .string {
    color: var(--color-bark);
}

.specimen-card .comment {
    color: var(--color-lichen);
}

.specimen-card .number {
    color: var(--color-lichen);
}

.specimen-with-watercolor {
    background: var(--color-surface);
}

.specimen-watercolor-demo {
    position: relative;
    height: 150px;
    margin-bottom: 20px;
    background: rgba(245, 240, 232, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

/* ============================================================
   COLOR PALETTE DISPLAY
   ============================================================ */

.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin: 20px 0 30px 0;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.color-swatch {
    width: 80px;
    height: 80px;
    border-radius: 2px;
    border: 1px dashed var(--color-border);
    box-shadow: 0 2px 8px rgba(58, 52, 40, 0.1);
}

.color-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* ============================================================
   WATERCOLOR DECORATIONS
   ============================================================ */

.watercolor {
    position: absolute;
    border-radius: 40% 60% 50% 50% / 60% 40% 50% 50%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.15), transparent 70%);
    filter: blur(2px);
    pointer-events: none;
}

.watercolor-right {
    right: 0;
    opacity: 0.25;
}

.watercolor-right.watercolor-3 {
    width: 200px;
    height: 200px;
    top: 150px;
    right: -50px;
    border-radius: 50% 50% 40% 60% / 40% 50% 50% 60%;
    background: radial-gradient(ellipse, rgba(160, 147, 107, 0.1), transparent 70%);
}

.watercolor-right.watercolor-4 {
    width: 180px;
    height: 180px;
    top: 350px;
    right: -40px;
    border-radius: 60% 40% 50% 50% / 50% 40% 60% 50%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.12), transparent 70%);
}

.watercolor-right.watercolor-5 {
    width: 220px;
    height: 220px;
    top: 550px;
    right: -60px;
    border-radius: 45% 55% 55% 45% / 55% 45% 45% 55%;
    background: radial-gradient(ellipse, rgba(139, 107, 74, 0.1), transparent 70%);
}

.watercolor-right.watercolor-6 {
    width: 190px;
    height: 190px;
    top: 750px;
    right: -50px;
    border-radius: 55% 45% 45% 55% / 45% 55% 55% 45%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.11), transparent 70%);
}

.watercolor-right.watercolor-7 {
    width: 210px;
    height: 210px;
    top: 950px;
    right: -55px;
    border-radius: 50% 50% 55% 45% / 60% 40% 50% 50%;
    background: radial-gradient(ellipse, rgba(160, 147, 107, 0.09), transparent 70%);
}

.watercolor-right.watercolor-8 {
    width: 200px;
    height: 200px;
    top: 1150px;
    right: -45px;
    border-radius: 40% 60% 50% 50% / 50% 50% 40% 60%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.12), transparent 70%);
}

.watercolor-right.watercolor-9 {
    width: 230px;
    height: 230px;
    top: 1350px;
    right: -60px;
    border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%;
    background: radial-gradient(ellipse, rgba(139, 107, 74, 0.1), transparent 70%);
}

.watercolor-right.watercolor-10 {
    width: 195px;
    height: 195px;
    top: 1550px;
    right: -50px;
    border-radius: 50% 50% 45% 55% / 55% 45% 55% 45%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.11), transparent 70%);
}

.watercolor-right.watercolor-11 {
    width: 220px;
    height: 220px;
    top: 1750px;
    right: -55px;
    border-radius: 45% 55% 50% 50% / 50% 50% 55% 45%;
    background: radial-gradient(ellipse, rgba(160, 147, 107, 0.1), transparent 70%);
}

.watercolor-right.watercolor-12 {
    width: 210px;
    height: 210px;
    top: 1950px;
    right: -50px;
    border-radius: 55% 45% 45% 55% / 55% 45% 55% 45%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.12), transparent 70%);
}

.watercolor-demo-1 {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 15px;
    left: 20px;
    border-radius: 40% 60% 50% 50% / 60% 40% 50% 50%;
    background: radial-gradient(ellipse, rgba(107, 127, 90, 0.2), transparent 70%);
    filter: blur(2px);
}

.watercolor-demo-2 {
    position: absolute;
    width: 100px;
    height: 100px;
    top: 40px;
    left: 100px;
    border-radius: 55% 45% 60% 40% / 50% 50% 40% 60%;
    background: radial-gradient(ellipse, rgba(160, 147, 107, 0.15), transparent 70%);
    filter: blur(2px);
}

.watercolor-demo-3 {
    position: absolute;
    width: 110px;
    height: 110px;
    top: 50px;
    left: 170px;
    border-radius: 45% 55% 55% 45% / 55% 45% 45% 55%;
    background: radial-gradient(ellipse, rgba(139, 107, 74, 0.15), transparent 70%);
    filter: blur(2px);
}

/* ============================================================
   STAR ACCENTS
   ============================================================ */

.star-accent {
    position: absolute;
    width: 24px;
    height: 24px;
    right: calc(var(--spacing-container-left) - 60px);
    color: var(--color-star);
    opacity: 0.7;
    animation: starPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.star-1 { top: 800px; animation-delay: 0s; }
.star-2 { top: 1100px; animation-delay: 0.3s; }
.star-3 { top: 1400px; animation-delay: 0.6s; }
.star-4 { top: 1700px; animation-delay: 0.9s; }
.star-5 { top: 2000px; animation-delay: 1.2s; }
.star-6 { top: 2300px; animation-delay: 1.5s; }
.star-7 { top: 2600px; animation-delay: 1.8s; }
.star-8 { top: 2900px; animation-delay: 2.1s; }
.star-9 { top: 3200px; animation-delay: 2.4s; }
.star-10 { top: 3500px; animation-delay: 2.7s; }

/* ============================================================
   ENTRY FINAL STYLING
   ============================================================ */

.final-entry {
    background-color: var(--color-bg-alt);
    border: 1px dashed var(--color-lichen);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --spacing-container-left: 24px;
    }

    .entry-section {
        padding: 60px 24px;
    }

    .star-accent {
        display: none;
    }

    .watercolor-right {
        opacity: 0.15;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-container-left: 16px;
        --font-size-h1: 1.8rem;
        --font-size-h2: 1.2rem;
        --font-size-body: 0.95rem;
    }

    .entry-section {
        padding: 40px 16px;
    }

    .specimen-card {
        padding: 16px 20px;
    }

    .color-palette {
        grid-template-columns: repeat(2, 1fr);
    }
}
