:root {
    --dot-color: rgba(0, 0, 0, 0.8);
    --dot-size: 2px;
    --dot-space: 20px;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background-color: transparent;
}

.chrome-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle, var(--dot-color) var(--dot-size), transparent var(--dot-size)),
        linear-gradient(135deg,
            #e0e0e0 0%,
            #ffffff 20%,
            #a0a0a0 40%,
            #d0d0d0 60%,
            #808080 80%,
            #ffffff 100%);
    background-size: var(--dot-space) var(--dot-space), 100% 100%;
    filter: contrast(1.2) brightness(1.1);
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin: 0;
    background: linear-gradient(to bottom, #000 0%, #555 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.5));
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
    align-items: start;
    width: 100%;
}

.item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item.wide {
    grid-column: span 2;
}

.item.tall {
    grid-row: span 2;
}

.item.big {
    grid-column: span 2;
    grid-row: span 2;
}

.item-image {
    width: 100%;
    min-height: 200px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.item:hover .item-image {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.6);
}

.item-image.liquid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    transform: translate(-50%, -50%) rotate(45deg);
    filter: blur(30px);
}

.item-image.geo::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: rotate(15deg);
}

.item-image.neon::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.item h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

.item p {
    margin: 0;
    color: #444;
    line-height: 1.4;
    font-size: 0.9rem;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #555;
    font-size: 0.9rem;
}

/* Semantic Clustering & Typographic Styles */

.cluster-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-bottom: 100px;
}

.cluster {
    position: relative;
    border-top: 2px solid #0000ff;
    /* Blue line from reference */
    padding-top: 20px;
}

.cluster-header {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    color: #0066ff;
    /* Reference Blue */
    margin-bottom: 30px;
    max-width: 80%;
}

.cluster-header span {
    display: block;
}

.cluster-header .sub-header {
    font-size: 1rem;
    color: #0066ff;
    margin-bottom: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Boxed Annotations (Green/Pink boxes) */
.annotation-box {
    display: inline-block;
    border: 1px solid;
    padding: 0 4px;
    margin: 0 2px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: help;
}

.box-green {
    border-color: #00cc00;
    color: #00cc00;
}

.box-pink {
    border-color: #ff00ff;
    color: #ff00ff;
}

filter: contrast(1.2) brightness(1.1);
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin: 0;
    background: linear-gradient(to bottom, #000 0%, #555 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.5));
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-flow: dense;
    gap: 20px;
    align-items: start;
    width: 100%;
}

.item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.item.wide {
    grid-column: span 2;
}

.item.tall {
    grid-row: span 2;
}

.item.big {
    grid-column: span 2;
    grid-row: span 2;
}

.item-image {
    width: 100%;
    min-height: 200px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.item:hover .item-image {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.6);
}

.item-image.liquid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    transform: translate(-50%, -50%) rotate(45deg);
    filter: blur(30px);
}

.item-image.geo::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transform: rotate(15deg);
}

.item-image.neon::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.item h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

.item p {
    margin: 0;
    color: #444;
    line-height: 1.4;
    font-size: 0.9rem;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #555;
    font-size: 0.9rem;
}

/* Semantic Clustering & Typographic Styles */

.cluster-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-bottom: 100px;
}

.cluster {
    position: relative;
    border-top: 2px solid #0000ff;
    /* Blue line from reference */
    padding-top: 20px;
}

.cluster-header {
    font-family: 'Inter', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    color: #0066ff;
    /* Reference Blue */
    margin-bottom: 30px;
    max-width: 80%;
}

.cluster-header span {
    display: block;
}

.cluster-header .sub-header {
    font-size: 1rem;
    color: #0066ff;
    margin-bottom: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Boxed Annotations (Green/Pink boxes) */
.annotation-box {
    display: inline-block;
    border: 1px solid;
    padding: 0 4px;
    margin: 0 2px;
    font-weight: 700;
    font-size: 0.9em;
    cursor: help;
}

.box-green {
    border-color: #00cc00;
    color: #00cc00;
}

.box-pink {
    border-color: #ff00ff;
    color: #ff00ff;
}

.box-blue {
    border-color: #0066ff;
    color: #0066ff;
}

/* Dynamic & Deconstructed Styles */

/* Vibrant Text Colors */
.text-blue {
    color: #0066ff !important;
}

.text-pink {
    color: #ff00ff !important;
}

.text-green {
    color: #00cc00 !important;
}

.text-orange {
    color: #ff6600 !important;
}

/* Scatter Effects */
.scatter-1 {
    transform: translate(10px, 20px) rotate(1deg);
}

.scatter-2 {
    transform: translate(-15px, 10px) rotate(-1deg);
}

.scatter-3 {
    transform: translate(5px, -15px) rotate(0.5deg);
}

.scatter-4 {
    transform: translate(-10px, -5px) rotate(-0.5deg);
}

/* Deconstructed Grid */
.encyclopedia-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    /* Looser gap */
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    /* Scatter effect */
}

.entry {
    background: white;
    border: 1px solid transparent;
    /* Remove default border */
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    width: calc(30% - 20px);
    /* Variable widths */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Soft float shadow */
}

.entry.wide {
    width: calc(60% - 20px);
}

.entry.tall {
    width: calc(30% - 20px);
    min-height: 250px;
}

.entry.big {
    width: calc(50% - 20px);
    min-height: 300px;
}

.entry:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* Typography Overrides */
.entry h3 {
    font-family: 'Inter', sans-serif;
    /* Or Helvetica */
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: none;
    text-transform: none;
    /* Natural case */
    letter-spacing: -0.5px;
}

.entry h3::before {
    content: '';
    /* Remove fig prefix */
}

.entry p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

/* Floating Annotations */
.floating-annotation {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 6px;
    border: 1px solid;
    background: white;
    z-index: 20;
    pointer-events: none;
}

/* Citation/Reference Links */
.citation-link {
    display: block;
    margin-top: 10px;
    font-size: 0.7rem;
    color: #0066ff;
    text-decoration: none;
    border-top: 1px dotted #ccc;
    padding-top: 4px;
}

.citation-link::before {
    content: '→ ';
}

/* Category Colors */
.category-purple {
    background: linear-gradient(to bottom, #e8ddf5 0%, #d4c5e8 100%);
    border-left: 4px solid #9575cd;
}

.category-beige {
    background: linear-gradient(to bottom, #f0ebe5 0%, #e8d5c5 100%);
    border-left: 4px solid #c9a882;
}

.category-blue {
    background: linear-gradient(to bottom, #e5eff5 0%, #c5d5e8 100%);
    border-left: 4px solid #7da7ca;
}

.category-orange {
    background: linear-gradient(to bottom, #f5e5e5 0%, #e8c5c5 100%);
    border-left: 4px solid #d88a8a;
}

.category-green {
    background: linear-gradient(to bottom, #e5f5e8 0%, #c5e8d5 100%);
    border-left: 4px solid #7dca9b;
}

/* Striped background effect */
.encyclopedia-container {
    background-image: repeating-linear-gradient(0deg,
            transparent,
            transparent 19px,
            rgba(0, 0, 0, 0.02) 19px,
            rgba(0, 0, 0, 0.02) 20px);
}

/* Entry size variations */
/* These are now handled by the deconstructed grid styles above */
/*
.entry.tall {
    grid-row: span 2;
}

.entry.wide {
    grid-column: span 2;
}
*/

/* Responsive adjustments */
@media (max-width: 768px) {
    .cluster-header {
        font-size: 2.5rem;
    }

    .entry,
    .entry.wide,
    .entry.tall,
    .entry.big {
        width: 100%;
        transform: none !important;
        /* Disable scatter on mobile */
    }

    .encyclopedia-grid {
        gap: 20px;
    }
}