/* https://catppuccin.com/palette/ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Josefin Sans', monospace;
    background-color: #fff1e5;
    color: #1a1a1a;
    line-height: 1.6;
    padding: 60px 20px;
    padding-bottom: 60vh;
}

.redaction-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 2px solid #1a1a1a;
    background: #fff1e5;
    box-shadow: 4px 4px 0 #1a1a1a;
    width: fit-content;
}

.redaction-toggle.visible {
    display: inline-flex;
}

.redaction-bar {
    display: inline-block;
    width: 50px;
    height: 10px;
    background: #1a1a1a;
    box-shadow: inset 0 0 0 2px #1a1a1a;
}


.container {
    max-width: 600px;
    margin: 0 auto;
    container-type: inline-size;
}
/* TODO: replace with Rubik vinyl regular instead Google font */
h1, h2 {
    font-family: 'Bungee Shade', monospace;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(24px, 9cqw, 120px);
    white-space: nowrap;      /* keep it on one line */
    text-align: left;
}

h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Tools & Tech block */
.tools-tech {
    margin: 1rem 0 0.5rem;
    padding: 1rem;
    border: 2px solid #1a1a1a;
    background: #fff1e5;
    box-shadow: 6px 6px 0 #1a1a1a;
}

.tools-tech h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.tools-lede {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid #1a1a1a;
    background: #fff;
}

.tool-name {
    font-family: 'Josefin Sans', monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tool-note {
    font-size: 0.95rem;
}

@media (max-width: 560px) {
    .tools-tech {
        padding: 1.2rem;
    }

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

/* Header section with metadata and profile photo */
.header-section {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.profile-photo {
    height: 9rem;
    width: 9rem;
    object-fit: cover;
    object-position: center 20%;
    flex-shrink: 0;
    border: 2px solid #1a1a1a;
    box-shadow: 6px 6px 0 #1a1a1a;
}

/* Document metadata */
.metadata {
    font-family: 'Josefin Sans', monospace;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 350;
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    align-items: center;
}

.social-icon {
    height: 24px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.social-icon:hover {
    opacity: 1;
}

.social-icon.substack {
    height: 32px;
}

.tagline {
    font-family: 'Josefin Sans', monospace;
    font-size: 1.2rem;
    font-weight: 350;
    line-height: 1.4;
    font-style: italic;
    border-left: 4px solid #1a1a1a;
    padding-left: 1rem;
    margin: 1.5rem 0;
}

.emoji {
    font-style: normal;
}

/* Redaction styling */
:root {
    --redact-gap: 0.7em;
}

.word {
    display: inline;
    position: relative;
    letter-spacing: 0;
}

.word.redacted {
    color: transparent;
    background-color: #343434ff;
    border-radius: 0;
    user-select: none;
    /* Padding on all sides ensures complete coverage for proportional fonts and emojis */
    padding: 0.1em 0.3em;
    margin: 0 -0.3em;
    display: inline-block;
    line-height: 1;
    filter: url(#grainNoise);
}

.word.redacted::after {
    content: none;
}

.word.redacted::selection {
    background-color: #1a1a1a;
}

.word.revealed {
    color: #1a1a1a;
    background-color: transparent;
    padding: 0;
    margin: 0;
    display: inline;
    line-height: inherit;
}

.word.fully-revealed {
    color: #1a1a1a;
    background-color: transparent;
    padding: 0;
    margin: 0;
    display: inline;
    line-height: inherit;
}

/* Expandable terms styling */
.expandable {
    cursor: pointer;
    border-bottom: 2px dotted #1a1a1a;
    position: relative;
    transition: border-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.expandable:hover {
    border-bottom-color: #666;
}

.chevron {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
    font-size: 0.9em;
}

.chevron-icon {
    width: 1.8em;
    height: 1.6em;
    vertical-align: -0.125em;
}

.chevron svg.chevron-down {
    display: block;
}

.chevron svg.chevron-up {
    display: none;
}

.chevron.expanded svg.chevron-down {
    display: none;
}

.chevron.expanded svg.chevron-up {
    display: block;
}

/* Inline info content styling */
.info-content {
    display: none;
    background-color: #fff; 
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 100%;
    padding-left: 2px;
    border-radius: 3px;
}

.info-content.expanded {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Werk header with lever on the right */
.werk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.werk-header h2 {
    margin: 0;
    line-height: 1;
}

.redaction-toggle {
    display: inline-flex;
    height: 100%;
    margin-top: 0.5rem;
    visibility: hidden;
}

.redaction-toggle.visible {
    visibility: visible;
}

.redaction-lever {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 2px solid #1a1a1a;
    background: #fff1e5;
    box-shadow: 4px 4px 0 #1a1a1a;
    height: 100%;
}

.redaction-bar {
    width: 50px;
    height: 10px;
    background: #1a1a1a;
    box-shadow: inset 0 0 0 2px #1a1a1a;
}

.lever-switch {
    position: relative;
    width: 50px;
    height: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.lever-icon {
    width: 100%;
    height: 100%;
    color: #1a1a1a;
    position: absolute;
}

.lever-icon-off {
    display: block;
}

.lever-icon-on {
    display: none;
}

.lever-switch input {
    display: none;
}

.lever-switch input:checked ~ .lever-icon-off {
    display: none;
}

.lever-switch input:checked ~ .lever-icon-on {
    display: block;
}

/* Tab styling */
.werk-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.werk-tab {
    border: 2px solid #1a1a1a;
    padding: 0.6rem 1.2rem;
    background: #fff;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    font-family: 'Josefin Sans', monospace;
    transition: all 0.15s ease;
    box-shadow: 4px 4px 0 #1a1a1a;
    transform: translateY(0);
}

.werk-tab:hover:not(.active) {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0 #1a1a1a;
}

.werk-tab.active {
    background: #f0f0f0;
    color: #1a1a1a;
    transform: translateY(6px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Tab panel styling */
.tab-panel {
    display: block;
}

/* Publicatielijst styling */
.publicaties-lijst {
    list-style: none;
    padding: 0;
}

.publicaties-lijst li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #d0d0d0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    font-size: 0.95rem;
    align-items: start;
}

.publicaties-lijst a {
    color: #1a1a1a;
    text-decoration: underline;
    font-weight: 500;
    grid-column: 2;
    grid-row: 1 / 3;
}

.publicaties-lijst a:hover {
    color: #666;
}

.pub-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    grid-column: 1;
    grid-row: 1 / 3;
    align-items: center;
}

.pub-soort {
    font-size: 0.75rem;
    color: #1a1a1a;
    border: 1.5px solid #1a1a1a;
    padding: 4px 6px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
    background: #fff;
    width: 130px;
    text-align: center;
}

/* Catppuccin colors per type - border and text only */
.pub-soort[data-soort="Nieuws"] {
    border-color: #ea76cb; /* Catppuccin Pink */
    color: #ea76cb;
}

.pub-soort[data-soort="Achtergrond"] {
    border-color: #8839ef; /* Catppuccin Mauve */
    color: #8839ef;
}

.pub-soort[data-soort="Factcheck"] {
    border-color: #00d3d0; /* Catppuccin Teal */
    color: #00d3d0;
}

.pub-soort[data-soort="Interactive"] {
    border-color: #179299; /* Catppuccin Teal darker */
    color: #179299;
}

.pub-soort[data-soort="TV-uitzending"] {
    border-color: #d20f39; /* Catppuccin Red */
    color: #d20f39;
}

.pub-soort[data-soort="Radio-uitzending"] {
    border-color: #fe640b; /* Catppuccin Peach */
    color: #fe640b;
}

.pub-soort[data-soort="Youtube"] {
    border-color: #f72585; /* Catppuccin Flamingo */
    color: #f72585;
}

.pub-soort[data-soort="Making-of"] {
    border-color: #7287fd; /* Catppuccin Lavender */
    color: #7287fd;
}

.pub-soort[data-soort="Oproep"] {
    border-color: #94e2d5; /* Catppuccin Mint */
    color: #94e2d5;
}

.pub-soort[data-soort="Dataverantwoording"] {
    border-color: #f5c2e7; /* Catppuccin Flamingo light */
    color: #f5c2e7;
}

.pub-soort[data-soort="Dataset"] {
    border-color: #cba6f7; /* Catppuccin Lavender light */
    color: #cba6f7;
}

.pub-soort[data-soort="Nieuwsbrief"] {
    border-color: #a6e3a1; /* Catppuccin Green */
    color: #a6e3a1;
}

.pub-soort[data-soort="Interview"] {
    border-color: #f8bd96; /* Catppuccin Peach light */
    color: #f8bd96;
}

.pub-datum {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
    text-align: center;
}

/* Mobile responsive styles - must be at end to override */
@media (max-width: 560px) {
    .header-section {
        gap: 0.75rem;
    }

    .metadata {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .profile-photo {
        height: 6.5rem;
        width: 6.5rem;
    }

    .social-icon {
        height: 1.2rem;
    }

    .redaction-toggle {
        width: 6.5rem;
    }
}
