/* ── portfolio.css ─────────────────────────────────────────────────
   Étienne Marque — Sound Designer portfolio
   Charcoal / cream / amber, VU-meter accent.
   Headings: Space Grotesk · Body: Inter · Data: JetBrains Mono
   ─────────────────────────────────────────────────────────────────── */

:root {
    --pf-charcoal:  #15161A;
    --pf-surface:   #1C1B22;
    --pf-cream:     #EDEAE2;
    --pf-muted:     #8C8894;
    --pf-muted-2:   #555555;
    --pf-amber:     #E8A33D;
    --pf-teal:      #2FA98F;

    --pf-border:      rgba(255, 255, 255, 0.06);
    --pf-border-soft: rgba(255, 255, 255, 0.04);
    --pf-border-hard: rgba(255, 255, 255, 0.12);

    --pf-font-heading: 'Space Grotesk', sans-serif;
    --pf-font-body:    'Inter', sans-serif;
    --pf-font-mono:    'JetBrains Mono', monospace;
}

/* ── GLOBAL ─────────────────────────────────────────────────────── */
html, body {
    background: linear-gradient(60deg, var(--pf-charcoal), #26252b);
    color: var(--pf-cream);
    font-family: var(--pf-font-mono);
    font-size: 13px;
    line-height: 1.6;
}

* { box-sizing: border-box; }

a { color: var(--pf-cream); text-decoration: none; }
a:hover { color: var(--pf-amber); }

/* ── SITE HEADER / NAV ──────────────────────────────────────────── */
.pf-site-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 1.75rem 0 0;
    background: transparent;
}

.pf-site-header-inner {
    max-width: 6xl;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.pf-logo { display: flex; align-items: center; flex-shrink: 0; }
.pf-logo-img { height: 64px; width: auto; display: block; transition: opacity 0.15s; }
.pf-logo-img:hover { opacity: 0.8; }

.pf-nav-desktop { display: flex; gap: 2rem; }

.pf-nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-family: var(--pf-font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--pf-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.pf-nav-link:hover,
.pf-nav-link.pf-active { color: var(--pf-cream); }

/* Animated underline */
.pf-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--pf-teal);
    transition: width 0.3s ease;
}
.pf-nav-link:hover::after,
.pf-nav-link.pf-active::after { width: 100%; }

/* Champ de recherche */
.pf-search { flex: 1; max-width: 24rem; display: flex; justify-content: flex-end; }
.pf-search-form { width: 100%; max-width: 24rem; }
.pf-search-wrapper { position: relative; display: flex; align-items: center; }

.pf-search-icon {
    position: absolute;
    left: 0.875rem;
    font-size: 14px;
    color: var(--pf-muted-2);
    pointer-events: none;
}

.pf-search-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.25rem;
    background: var(--pf-surface);
    border: 1px solid var(--pf-border-hard);
    border-radius: 4px;
    color: var(--pf-cream);
    font-family: var(--pf-font-mono);
    font-size: 13px;
    outline: none;
    transition: all 0.15s;
}
.pf-search-input::placeholder { color: var(--pf-muted-2); }
.pf-search-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(47, 169, 143, 0.2);
}

/* Hamburger */
.pf-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60;
}
.pf-hamburger-line {
    display: block;
    width: 24px; height: 2px;
    background: var(--pf-cream);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.pf-hamburger.pf-active .pf-hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pf-hamburger.pf-active .pf-hamburger-line:nth-child(2) { opacity: 0; }
.pf-hamburger.pf-active .pf-hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile overlay */
.pf-mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; height: 100vh;
    background: rgba(15, 14, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: right 0.3s ease;
    z-index: 55;
    display: none;
}
.pf-mobile-menu.pf-open { right: 0; }

.pf-mobile-menu-inner {
    height: 100%;
    padding: 4rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pf-nav-mobile { display: flex; flex-direction: column; gap: 1.5rem; }

.pf-mobile-nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-family: var(--pf-font-mono);
    font-size: 18px;
    font-weight: 500;
    color: var(--pf-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.pf-mobile-nav-link:hover,
.pf-mobile-nav-link.pf-active { color: var(--pf-cream); }

.pf-mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--pf-teal);
    transition: width 0.3s ease;
}
.pf-mobile-nav-link:hover::after,
.pf-mobile-nav-link.pf-active::after { width: 100%; }

.pf-search-mobile { margin-top: auto; }

@media (max-width: 768px) {
    .pf-nav-desktop,
    .pf-search { display: none; }
    .pf-hamburger { display: flex; }
    .pf-site-header { padding: 1rem 0; }
    .pf-logo-img { height: 28px; }
}

/* ── TOOLBAR / TAG FILTER ───────────────────────────────────────── */
.pf-toolbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.pf-filter-wrapper { position: relative; }

.pf-filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--pf-border-hard);
    border-radius: 8px;
    color: var(--pf-muted);
    cursor: pointer;
    font-family: var(--pf-font-mono);
    font-size: 12px;
    transition: all 0.15s;
}
.pf-filter-btn:hover,
.pf-filter-btn.pf-filter-btn--active {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--pf-cream);
}

.pf-filter-icon { opacity: 0.7; }
.pf-arrow { font-size: 10px; transition: transform 0.2s; }
.pf-filter-btn[aria-expanded="true"] .pf-arrow { transform: rotate(180deg); }

.pf-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 260px;
    background: var(--pf-surface);
    border: 1px solid var(--pf-border-hard);
    border-radius: 8px;
    z-index: 200;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.pf-dropdown.pf-dropdown--open { display: block; }

.pf-dropdown-search {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--pf-border);
    color: var(--pf-cream);
    font-family: var(--pf-font-mono);
    font-size: 12px;
    outline: none;
}
.pf-dropdown-search::placeholder { color: var(--pf-muted-2); }

.pf-dropdown-list { max-height: 220px; overflow-y: auto; padding: 0.5rem 0; }

.pf-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-family: var(--pf-font-mono);
    font-size: 12px;
    color: var(--pf-muted);
    transition: background 0.1s;
    user-select: none;
}
.pf-dropdown-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--pf-cream); }
.pf-dropdown-item.pf-dropdown-item--selected { color: var(--pf-cream); }

.pf-tag-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pf-tag-label { flex: 1; }
.pf-tag-count { font-size: 11px; color: var(--pf-muted-2); margin-right: 0.5rem; }

.pf-checkbox { font-size: 14px; color: var(--pf-muted-2); width: 16px; text-align: center; }
.pf-dropdown-item.pf-dropdown-item--selected .pf-checkbox .la-check-square { display: inline; }
.pf-dropdown-item.pf-dropdown-item--selected .pf-checkbox .la-square { display: none; }

/* Tags actifs — pilules inline */
.pf-active-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.pf-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: 16px;
    font-family: var(--pf-font-mono);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
    border: 1px solid transparent;
}
.pf-active-tag:hover { opacity: 0.7; }
.pf-active-tag-x { font-size: 12px; opacity: 0.6; margin-left: 0.25rem; }

.pf-count { font-family: var(--pf-font-mono); font-size: 11px; color: var(--pf-muted-2); margin-left: auto; }

/* ── TABLE EXPLORER ─────────────────────────────────────────────── */
.pf-explorer { overflow: hidden; }

.pf-header {
    display: flex;
    padding: 1.75rem 1rem;
    border-bottom: 1px solid var(--pf-border);
    font-family: var(--pf-font-mono);
    letter-spacing: 0.06em;
    color: var(--pf-muted-2);
    text-transform: uppercase;
}
.pf-header .pf-col { padding-right: 1rem; }

.pf-row {
    display: flex;
    align-items: center;
    padding: 1.75rem 1rem;
    border-bottom: 1px solid var(--pf-border-soft);
    transition: background 0.12s;
    text-decoration: none !important;
    color: inherit;
    font-family: var(--pf-font-mono);
    font-size: 12px;
}
.pf-row-pinned { position: relative; }
.pf-row-pinned::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--pf-amber);
    opacity: 0.7;
}
.pf-row:last-of-type { border-bottom: none; }
.pf-row:hover { background: rgba(255, 255, 255, 0.03); }
.pf-row.pf-row-hidden { display: none; }

.pf-col { padding-right: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-col-name { flex: 0 0 280px; display: flex; align-items: center; gap: 0.5rem; }
.pf-col-tags { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pf-col-date { flex: 0 0 90px; }
.pf-col-items { flex: 0 0 56px; color: var(--pf-muted-2); text-align: right; }

.pf-item-icon { font-size: 14px; opacity: 0.7; flex-shrink: 0; }
.pf-item-title { font-family: var(--pf-font-heading); font-weight: 500; color: var(--pf-cream); }
    .pf-item-title:hover { color: var(--pf-amber); }
.pf-item-paid { font-size: 12px; color: var(--pf-muted-2); margin-left: 0.25rem; opacity: 0.5; }

.pf-tag-inline { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--pf-font-mono); font-size: 11px; color: var(--pf-muted); }
.pf-tag-dot-inline { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pf-no-results { display: none; padding: 2rem; text-align: center; font-family: var(--pf-font-mono); font-size: 12px; color: var(--pf-muted-2); }

@media (max-width: 768px) {
    .pf-header { display: none; }
    .pf-row { flex-wrap: wrap; gap: 0.5rem; }
    .pf-col { width: 100%; padding-right: 0; }
}

/* ── HERO — full-bleed page header with parallax ───────────────── */
.pf-hero {
    position: relative;
    height: 32vh;
    min-height: 360px;
    overflow: hidden;
    isolation: isolate; /* keep blend modes contained to the hero */
}

.pf-hero-media { position: absolute; inset: 0; overflow: hidden; }

.pf-hero-img {
    position: absolute;
    top: -15%; left: 0;
    width: 100%; height: 130%;
    object-fit: cover;
    filter: grayscale(0.55) contrast(1.05) brightness(0.85);
    will-change: transform;
    opacity: 0;
    animation: pf-hero-fade-in 0.9s ease-out 0.05s forwards;
}

/* Amber tint — blends with the desaturated image beneath it */
.pf-hero-tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(21, 22, 26, 0.25) 0%, rgba(21, 22, 26, 0.55) 60%, rgba(21, 22, 26, 0.98) 100%);
}
.pf-hero-tint::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--pf-amber);
    mix-blend-mode: color;
    opacity: 0.28;
}

.pf-hero-content {
    position: absolute;
    left: 0; right: 0; bottom: 2.75rem;
    width: 100%;
    opacity: 0;
    animation: pf-hero-fade-in 0.9s ease-out 0.2s forwards;
}

.pf-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.9rem; }

.pf-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--pf-font-mono);
    font-size: 11px;
    color: var(--pf-cream);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--pf-border-hard);
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
}
.pf-hero-tag-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.pf-hero-date,
.pf-hero-count {
    font-family: var(--pf-font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #A7A69E;
}

.pf-hero-eyebrow {
    font-family: var(--pf-font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pf-amber);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pf-hero-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--pf-amber);
    display: inline-block;
    animation: pf-hero-pulse 2.4s infinite;
}

@keyframes pf-hero-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(232, 163, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0); }
}

.pf-hero-title {
    font-family: var(--pf-font-heading);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: var(--pf-cream);
    margin: 0;
    max-width: 14ch;
}

.pf-hero-text {
    margin-top: 1rem;
    color: #A7A69E;
    font-family: var(--pf-font-body);
    font-size: 15px;
    line-height: 1.6;
}

.pf-hero-scroll-hint {
    position: absolute;
    right: 1.75rem; bottom: 2.5rem;
    font-family: var(--pf-font-mono);
    font-size: 11px;
    color: #A7A69E;
    writing-mode: vertical-rl;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0.7;
}
.pf-hero-scroll-hint::after {
    content: '';
    width: 1px; height: 34px;
    background: #A7A69E;
}

@keyframes pf-hero-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .pf-hero-img,
    .pf-hero-content { animation: none; opacity: 1; }
}

@media (max-width: 768px) {
    .pf-hero { height: 42vh; min-height: 280px; }
    .pf-hero-scroll-hint { display: none; }
}

/* ── FOOTER / WAVES ─────────────────────────────────────────────── */
footer .content { background-color: var(--pf-charcoal); color: #929ab3; }
footer .waves {
    position: relative;
    width: 100%;
    height: 15vh;
    margin-bottom: -7px; /* fix for Safari gap */
    min-height: 100px;
    max-height: 150px;
    background-color: transparent;
}

/* ── ARTICLE CONTENT (ITEM PAGE) ────────────────────────────────── */

/* Magazine layout — media on the left, article text on the right */
.pf-magazine {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: start;
}
.pf-magazine-media { min-width: 0; }
.pf-magazine-media img { width: 100%; height: auto; display: block; border-radius: 8px; }
.pf-magazine-media iframe { width: 100%; border: 0; border-radius: 8px; }
.pf-magazine-text { min-width: 0; }

@media (max-width: 900px) {
    .pf-magazine { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}

.pf-article-content {
    font-size: 15px;
    line-height: 1.75;
    color: var(--pf-cream);
    font-family: var(--pf-font-body);
}
.pf-article-content h2 {
    font-family: var(--pf-font-heading);
    font-size: 20px;
    font-weight: 500;
    color: var(--pf-cream);
    margin: 2rem 0 1rem;
}
.pf-article-content h3 {
    font-family: var(--pf-font-heading);
    font-size: 16px;
    font-weight: 500;
    color: var(--pf-cream);
    margin: 1.5rem 0 0.75rem;
}
.pf-article-content p { margin-bottom: 1.25rem; }
.pf-article-content ul,
.pf-article-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.pf-article-content li { margin-bottom: 0.5rem; }

.pf-article-content code {
    font-family: var(--pf-font-mono);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
}
.pf-article-content pre {
    background: var(--pf-surface);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}
.pf-article-content pre code { background: transparent; padding: 0; }

.pf-article-content blockquote {
    border-left: 3px solid var(--pf-teal);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1.25rem;
    font-style: italic;
    color: var(--pf-muted);
}

.pf-article-content a { color: var(--pf-amber); text-decoration: underline; }

.pf-article-content iframe,
.pf-article-content img {
    max-width: 100%;
    border-radius: 6px;
    margin: 1rem 0;
}
.pf-article-content img { height: auto; }

/* Tailwind Typography ('.prose-invert') variable overrides.
   Only takes effect if the typography plugin is actually loaded
   (cdn.tailwindcss.com?plugins=typography) — otherwise .pf-article-content
   above already covers the same elements by hand. */
.prose-invert {
    --tw-prose-body: var(--pf-cream);
    --tw-prose-headings: var(--pf-cream);
    --tw-prose-lead: var(--pf-muted);
    --tw-prose-links: var(--pf-teal);
    --tw-prose-bold: var(--pf-cream);
    --tw-prose-counters: var(--pf-muted);
    --tw-prose-bullets: var(--pf-muted-2);
    --tw-prose-hr: var(--pf-border);
    --tw-prose-quotes: var(--pf-cream);
}