/* ============================================================
   MINIMAL PORTFOLIO
   Neue Haas Grotesk | Black & White | Clean Typography
   ============================================================ */

/* CSS Variables for Theme */
:root {
    --bg-primary: #fff;
    --bg-secondary: #f8f8f8;
    --text-primary: #000;
    --text-secondary: #666;
    --text-tertiary: #888;
    --text-quaternary: #aaa;
    --border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #000;
    --bg-secondary: #111;
    --text-primary: #fff;
    --text-secondary: #999;
    --text-tertiary: #666;
    --text-quaternary: #444;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

/* Base */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out, background-color 0.3s ease;
    visibility: visible;
}

[data-theme="dark"] .loading-screen {
    background: rgba(0, 0, 0, 0.9);
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen-content {
    text-align: center;
}

.loading-screen-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    margin: 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    transition: color 0.3s ease;
}

[data-theme="dark"] .loading-screen-title {
    color: #fff;
}

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

/* Cursor Position Overlay */
.cursor-position-overlay {
    position: fixed;
    bottom: 90vh;
    right: 0;
    pointer-events: none;
    z-index: 9999;
    font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    opacity: 0.4;
    transition: opacity 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-position-overlay.cursor-position-hidden {
    opacity: 0;
    pointer-events: none;
}

.cursor-position-x,
.cursor-position-y,
.cursor-position-scroll,
.cursor-position-viewport,
.cursor-position-time {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.cursor-position-x {
    top: 50vh;
    right: 24px;
    transform: translateY(-50%);
}

.cursor-position-y {
    top: calc(50vh + 16px);
    right: 24px;
    transform: translateY(-50%);
}

.cursor-position-scroll {
    top: calc(50vh + 32px);
    right: 24px;
    transform: translateY(-50%);
}

.cursor-position-viewport {
    top: calc(50vh + 48px);
    right: 24px;
    transform: translateY(-50%);
}

.cursor-position-time {
    top: calc(50vh + 64px);
    right: 24px;
    transform: translateY(-50%);
}

.cursor-position-label {
    font-weight: 500;
    opacity: 0.6;
}

.cursor-position-value {
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}

[data-theme="dark"] .cursor-position-overlay {
    mix-blend-mode: normal;
    opacity: 0.3;
}

[data-theme="dark"] .cursor-position-overlay.cursor-position-hidden {
    opacity: 0;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: 0.5;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: var(--bg-primary);
    z-index: 100;
    transition: background-color 0.3s ease;
}

.site-logo {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.site-logo:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

.header-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.mobile-menu-toggle {
    display: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    background: #000;
    padding: 0;
    cursor: pointer;
}

[data-theme="dark"] .mobile-menu-toggle {
    background: #fff;
}

.header-link {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.header-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-link:nth-child(1) { animation-delay: 0.2s; }
.header-link:nth-child(2) { animation-delay: 0.3s; }
.header-link:nth-child(3) { animation-delay: 0.4s; }

.header-link:hover {
    opacity: 0.55;
    transform: translateY(-1px);
}

.header-link:hover::after,
.header-link:focus-visible::after {
    transform: scaleX(1);
}

.header-link:focus-visible {
    outline: none;
    opacity: 0.55;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    color: var(--text-primary);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.theme-toggle:hover {
    opacity: 0.7;
}

.theme-icon-light,
.theme-icon-dark {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.06em;
    line-height: 1;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="light"] .theme-icon-dark,
:root:not([data-theme]) .theme-icon-dark {
    display: none;
}

[data-theme="light"] .theme-icon-light,
:root:not([data-theme]) .theme-icon-light {
    display: inline-block;
}

/* Legacy support */
.info-link {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.info-link:hover {
    opacity: 0.7;
    transform: translateY(-1px);
}

/* Site Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 24px 32px;
    background: var(--bg-primary);
    z-index: 100;
    transition: background-color 0.3s ease;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.social-links a:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    width: 100%;
    padding: 80px 32px 80px;
    min-height: 100vh;
    flex: 1;
}

/* ============================================================
   HOME PAGE - Posts Grid & List
   ============================================================ */

.posts-index {
    width: 100%;
}

/* Research Index with Tag Filter */
.research-index {
    width: 100%;
}

.research-description {
    max-width: 560px;
    margin-top: 48px;
    margin-bottom: 32px;
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 160px;
    gap: 48px;
}

.research-tags-filter {
    flex: 1;
    max-width: none;
}

.tags-filter-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tags-filter-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px 16px;
}

.tag-filter-btn {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 400;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-tertiary);
    text-align: left;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-filter-btn:hover {
    color: var(--text-primary);
}

.tag-filter-btn.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.toggle-btn {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-quaternary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toggle-btn:nth-child(1) { animation-delay: 0.1s; }
.toggle-btn:nth-child(2) { animation-delay: 0.15s; }
.toggle-btn:nth-child(3) { animation-delay: 0.2s; }

.toggle-btn:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.toggle-btn.active {
    color: var(--text-primary);
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.posts-header-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.posts-count {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* Posts Editorial View - Mixed Sizes Portfolio Layout */
.posts-editorial {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: min-content;
    gap: 24px;
}

.editorial-card {
    display: flex;
    flex-direction: column;
}

.editorial-card .post-card-image {
    width: 100%;
    margin-bottom: 12px;
    display: block;
    line-height: 0;
}

.editorial-card .post-card-image {
    background: transparent;
}

.editorial-card .post-card-image img,
.editorial-card .post-card-image video,
.editorial-card .post-card-image .post-card-image-media {
    width: 100%;
    height: auto;
    display: block;
}

/* Create varied sizes using nth-child patterns for portfolio-like randomness */
.editorial-card:nth-child(4n+1) {
    grid-column: span 5;
}

.editorial-card:nth-child(4n+2) {
    grid-column: span 7;
}

.editorial-card:nth-child(4n+3) {
    grid-column: span 6;
}

.editorial-card:nth-child(4n+4) {
    grid-column: span 6;
}

/* Some larger items for variation */
.editorial-card:nth-child(8n) {
    grid-column: span 8;
}

.editorial-card:nth-child(11n) {
    grid-column: span 4;
}


/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* View containers wrapper */
.postsfeed-wrapper {
    position: relative;
    min-height: 200px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* View containers with smooth transitions */
.postsfeed-container {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.postsfeed-container.view-hidden {
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    visibility: hidden;
}

.postsfeed-container:not(.view-hidden) {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    visibility: visible;
}

/* Staggered animations for editorial items */
.postsfeed-container:not(.view-hidden) .editorial-card {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(1) { animation-delay: 0.05s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(2) { animation-delay: 0.1s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(3) { animation-delay: 0.15s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(4) { animation-delay: 0.2s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(5) { animation-delay: 0.25s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(6) { animation-delay: 0.3s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(7) { animation-delay: 0.35s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(8) { animation-delay: 0.4s; }
.postsfeed-container:not(.view-hidden) .editorial-card:nth-child(n+9) { animation-delay: 0.45s; }

/* Staggered animations for grid items */
.postsfeed-container:not(.view-hidden) .post-card:not(.editorial-card) {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.postsfeed-container:not(.view-hidden) .post-card:nth-child(1) { animation-delay: 0.05s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(2) { animation-delay: 0.1s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(3) { animation-delay: 0.15s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(4) { animation-delay: 0.2s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(5) { animation-delay: 0.25s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(6) { animation-delay: 0.3s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(7) { animation-delay: 0.35s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(8) { animation-delay: 0.4s; }
.postsfeed-container:not(.view-hidden) .post-card:nth-child(n+9) { animation-delay: 0.45s; }

/* Staggered animations for list items */
.postsfeed-container:not(.view-hidden) .post-list-item {
    opacity: 0;
    animation: fadeInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    will-change: opacity, transform;
}

.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(1) { animation-delay: 0.05s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(2) { animation-delay: 0.1s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(3) { animation-delay: 0.15s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(4) { animation-delay: 0.2s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(5) { animation-delay: 0.25s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(6) { animation-delay: 0.3s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(7) { animation-delay: 0.35s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(8) { animation-delay: 0.4s; }
.postsfeed-container:not(.view-hidden) .post-list-item:nth-child(n+9) { animation-delay: 0.45s; }

.post-card a {
    display: block;
}

.post-card-image {
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 10px;
}

.post-card-image img,
.post-card-image video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card-image-media {
    width: 100%;
    height: auto;
    display: block;
}

.post-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card:hover .post-card-image img,
.post-card:hover .post-card-image video {
    transform: scale(1.02);
}

.editorial-card:hover {
    transform: translateY(-2px);
}

.editorial-card:hover .post-card-image img,
.editorial-card:hover .post-card-image video {
    transform: scale(1.01);
}

.post-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.post-card-info .post-number {
    font-size: 9px;
    color: var(--text-quaternary);
}

.post-card-info .post-title {
    font-size: 11px;
}

.post-card-info .post-model {
    font-size: 10px;
    color: var(--text-tertiary);
}

/* List View */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-list-item {
    padding: 24px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disable transition during animation to prevent flicker */
.postsfeed-container:not(.view-hidden) .post-list-item {
    transition: none !important;
}

.post-list-item:last-child {
    border-bottom: none;
}

.post-list-item:hover {
    opacity: 0.6;
    transform: translateX(4px);
}

.post-list-link {
    display: flex;
    align-items: center;
    gap: 32px;
    text-decoration: none;
    color: inherit;
}

.post-list-info {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-list-info .post-number {
    font-size: 9px;
    color: var(--text-quaternary);
    font-variant-numeric: tabular-nums;
}

.post-list-info .post-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.post-list-info .post-model {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.post-list-info .post-number-value {
    font-size: 10px;
    color: var(--text-tertiary);
}

.post-list-gallery {
    flex: 1;
    overflow: hidden;
}

.post-gallery-track {
    display: flex;
    gap: 3px;
    height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.post-gallery-track::-webkit-scrollbar {
    display: none;
}

.post-gallery-item {
    flex: 0 0 auto;
    height: 100%;
    scroll-snap-align: start;
    margin: 0;
}

.post-gallery-media {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
}

.post-gallery-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.post-gallery-item video {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* ============================================================
   POST PAGE
   ============================================================ */

.post-page {
    max-width: 100%;
}

.back-link {
    display: inline-block;
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Post Header */
.post-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
}

.post-header .post-title {
    opacity: 0;
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

.post-header .post-description {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.post-header .post-meta {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.post-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.post-description {
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 560px;
    margin-top: 24px;
    margin-bottom: 20px;
}

.post-description p {
    margin: 0;
}

/* Project Links */
.project-links {
    margin-top: 20px;
    margin-bottom: 20px;
}

.project-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-links-list li {
    margin: 0;
}

.project-link {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    line-height: 1.2;
}

.project-link:hover {
    opacity: 0.6;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

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

.meta-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.meta-value {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

/* ============================================================
   HORIZONTAL SCROLL GALLERY STRIP
   ============================================================ */

.gallery-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background: var(--bg-primary);
    z-index: 50;
    padding-bottom: 60px;
    transition: background-color 0.3s ease;
}

.gallery-track {
    display: flex;
    gap: 3px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 3px;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 auto;
    height: 100%;
    scroll-snap-align: start;
    margin: 0;
    cursor: pointer;
    opacity: 0;
    animation: fadeInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:nth-child(1) { animation-delay: 0.4s; }
.gallery-item:nth-child(2) { animation-delay: 0.45s; }
.gallery-item:nth-child(3) { animation-delay: 0.5s; }
.gallery-item:nth-child(4) { animation-delay: 0.55s; }
.gallery-item:nth-child(5) { animation-delay: 0.6s; }
.gallery-item:nth-child(6) { animation-delay: 0.65s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.75s; }
.gallery-item:nth-child(n+9) { animation-delay: 0.8s; }

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-media {
    height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Post page content adjustment when gallery exists */
.post-page-content {
    padding-bottom: calc(50vh + 32px) !important;
}

.post-page-content .post-header {
    border-bottom: none;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease, background-color 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.lightbox-image,
.lightbox-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox-image.active,
.lightbox-video.active {
    display: block;
    opacity: 1;
}

.lightbox-close {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 60px;
    min-height: 60px;
    background: transparent;
    border: none;
    font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    font-weight: 400;
    padding: 0;
}

.lightbox-close:hover {
    opacity: 0.6;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    min-width: 60px;
    min-height: 60px;
    background: transparent;
    border: none;
    font-family: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 24px;
    line-height: 1;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    font-weight: 400;
    padding: 0;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .lightbox-content {
        padding: 40px 20px;
    }
    
    .lightbox-close {
        top: 16px;
        right: 16px;
        min-width: 50px;
        min-height: 50px;
        font-size: 18px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        min-width: 50px;
        min-height: 50px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: 16px;
    }
    
    .lightbox-next {
        right: 16px;
    }
}

/* ============================================================
   INFORMATION PAGE
   ============================================================ */

.info-page {
    max-width: 100%;
}

.info-layout {
    display: flex;
    gap: 64px;
    align-items: flex-start;
}

.info-title-col {
    flex: 0 0 200px;
}

.info-title {
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.info-content-col {
    flex: 1;
    max-width: 560px;
}

.info-content {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
}

.info-content:last-child {
    margin-bottom: 0;
}

.info-content p {
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 500;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.info-content a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-content a::before {
    content: '+';
    font-size: 11px;
    color: var(--text-tertiary);
}

.info-content a:hover {
    color: var(--text-primary);
}

/* Information Page Structure Grid */
.info-structure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 64px;
    margin-top: 48px;
    margin-bottom: 48px;
}

.info-structure-item {
    display: flex;
    flex-direction: column;
}

.info-structure-title {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 400;
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

.info-structure-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-structure-list li {
    margin: 0;
}

.info-structure-link,
.info-structure-text {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.05em;
    display: block;
    line-height: 1.4;
}

.info-structure-link {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-structure-link:hover {
    color: var(--text-primary);
}

/* Newsletter index layout */
.newsletter-index {
    margin-top: 48px;
}

.newsletter-index-heading {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}

.newsletter-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-index-item {
    margin: 0;
}

.newsletter-index-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: baseline;
    text-decoration: none;
    color: var(--text-primary);
}

.newsletter-index-count {
    font-size: 10px;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
    min-width: 18px;
}

.newsletter-index-title {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.newsletter-detail-title {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin: 0 0 20px;
}

.newsletter-index-number {
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
}

.newsletter-index-link:hover .newsletter-index-title,
.newsletter-index-link:hover .newsletter-index-count,
.newsletter-index-link:hover .newsletter-index-number {
    opacity: 0.7;
}

.newsletter-empty {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.newsletter-files-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.newsletter-file-item {
    margin: 0;
}

.newsletter-file-media {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.newsletter-detail-page .info-intro {
    margin-bottom: 40px !important;
}

@media (max-width: 480px) {
    .info-structure-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ============================================================
   EDITORIALS LISTING PAGE
   ============================================================ */

.editorials-index {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.editorial-list-item {
    padding: 32px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    animation: fadeInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: none !important;
    will-change: opacity, transform;
    overflow: visible;
}

.editorial-list-item:nth-child(1) { animation-delay: 0.05s; }
.editorial-list-item:nth-child(2) { animation-delay: 0.1s; }
.editorial-list-item:nth-child(3) { animation-delay: 0.15s; }
.editorial-list-item:nth-child(4) { animation-delay: 0.2s; }
.editorial-list-item:nth-child(5) { animation-delay: 0.25s; }
.editorial-list-item:nth-child(6) { animation-delay: 0.3s; }
.editorial-list-item:nth-child(7) { animation-delay: 0.35s; }
.editorial-list-item:nth-child(8) { animation-delay: 0.4s; }
.editorial-list-item:nth-child(n+9) { animation-delay: 0.45s; }

.editorial-list-item:last-child {
    border-bottom: none;
}

.editorial-list-item:hover {
    transform: translateX(4px);
    transition: transform 0s !important;
}

.editorial-list-item:hover .editorial-list-info {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.editorial-list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    text-decoration: none;
    color: inherit;
    overflow: visible;
    min-width: 0;
}

.editorial-list-info {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editorial-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    color: var(--text-primary);
}

.editorial-meta {
    display: flex;
    gap: 16px;
    align-items: baseline;
}

.editorial-model {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    display: inline;
}

.editorial-number {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    display: inline;
}

.editorial-list-image {
    flex: 1 1 auto;
    overflow: visible;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    max-width: none;
    transition: transform 0s !important;
}

.editorial-list-image img,
.editorial-list-media {
    width: auto;
    height: auto;
    max-width: 600px;
    max-height: 400px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    opacity: 1;
    transition: opacity 0s;
}

/* Hover-reveal extra files beside featured image */
.editorial-extra {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    flex-shrink: 0;
}

.editorial-extra-item {
    margin: 0;
    flex: 0 0 auto;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 60ms);
}

.editorial-extra-media {
    width: auto;
    height: auto;
    max-width: 180px;
    max-height: 160px;
    object-fit: contain;
    display: block;
}

.editorial-list-item:hover .editorial-extra {
    max-width: 2000px;
    opacity: 1;
    transition-delay: 120ms;
    overflow: visible;
}

.editorial-list-item:hover .editorial-extra-item {
    opacity: 1;
    transform: translateX(0);
}

/* Slightly staggered disappear on hover off */
.editorial-list-item:not(:hover) .editorial-extra-item {
    transition-delay: calc(var(--i, 0) * 40ms);
}

@media (max-width: 768px) {
    .editorial-list-item {
        padding: 24px 0;
    }
    
    .editorial-list-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .editorial-list-info {
        flex: 0 0 auto;
    }
    
    .editorial-list-image {
        width: 100%;
        max-width: 100%;
    }
    
    .editorial-list-image img,
    .editorial-list-media {
        max-height: 250px;
    }

    .editorial-extra {
        display: none;
    }
    
    .editorial-title {
        font-size: 10px;
    }
    
    .editorial-model,
    .editorial-number {
        font-size: 9px;
    }
}

/* ============================================================
   404 PAGE
   ============================================================ */

.error-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
}

.error-code {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.error-message {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 24px;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination-wrapper {
    margin-top: 48px;
}

.pagination-wrapper > div {
    display: none;
}

.pagination-wrapper > div:first-child {
    display: block;
}

.catalogue-pagination {
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 4px;
    padding: 24px 32px !important;
    font-size: 10px;
    z-index: 100;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.catalogue-pagination__controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.catalogue-pagination__prev,
.catalogue-pagination__next,
.catalogue-pagination__page {
    padding: 6px 10px;
}

.catalogue-pagination__prev--disabled,
.catalogue-pagination__next--disabled {
    color: #ccc;
    pointer-events: none;
}

.catalogue-pagination__page--active {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.catalogue-pagination__pages {
    display: flex;
}

.catalogue-pagination__ellipsis {
    padding: 6px 4px;
    color: #ccc;
}

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

@media (max-width: 768px) {
    .site-header {
        padding: 16px 20px;
        flex-direction: row;
        align-items: center;
        gap: 0;
    }
    
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .header-links {
        position: absolute;
        top: calc(100% - 4px);
        right: 20px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px 14px 16px;
        padding-right: 48px;
        min-width: 190px;
        border-radius: 0;
        background: var(--bg-primary);
        border: none;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
        z-index: 120;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.26s ease, visibility 0.26s ease;
    }

    .site-header.menu-open .header-links {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .header-link {
        opacity: 1;
        animation: none;
        transform: translateY(4px);
        transition: opacity 0.2s ease, transform 0.24s ease;
    }

    .site-header.menu-open .header-link {
        transform: translateY(0);
    }

    .site-header.menu-open .header-link:nth-child(1) { transition-delay: 40ms; }
    .site-header.menu-open .header-link:nth-child(2) { transition-delay: 80ms; }
    .site-header.menu-open .header-link:nth-child(3) { transition-delay: 120ms; }
    
    .theme-toggle {
        position: absolute;
        top: 10px;
        right: 12px;
        opacity: 1;
        animation: none;
        width: 24px;
        height: 24px;
        padding: 0;
        font-size: 12px;
        transform: translateY(4px);
        transition: opacity 0.2s ease, transform 0.24s ease;
    }

    .site-header.menu-open .theme-toggle {
        transform: translateY(0);
        transition-delay: 160ms;
    }
    
    .site-footer {
        padding: 16px 20px;
    }
    
    .main-content {
        padding: 60px 20px 60px;
    }
    
    .research-header {
        flex-direction: column;
        gap: 24px;
    }
    
    .research-tags-filter {
        max-width: 100%;
    }
    
    .tags-filter-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-editorial {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .editorial-card:nth-child(n) {
        grid-column: span 1;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    
    .post-title {
        font-size: 11px;
    }
    
    .post-meta {
        gap: 16px;
    }
    
    .info-page {
        max-width: 100%;
    }
    
    .info-layout {
        flex-direction: column;
        gap: 24px;
    }
    
    .info-title-col {
        flex: 0 0 auto;
    }
    
    .info-content-col {
        max-width: 100%;
    }

    .newsletter-index-link {
        grid-template-columns: auto 1fr auto;
        gap: 8px 12px;
    }

    .newsletter-index-title {
        grid-column: 2 / 3;
    }

    .newsletter-index-number {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        align-self: center;
        font-size: 16px;
    }

    .newsletter-files-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery strip mobile */
    .gallery-strip {
        height: 40vh;
        padding-bottom: 50px;
    }
    
    .post-page-content {
        padding-bottom: calc(40vh + 24px) !important;
    }
    
    .catalogue-pagination {
        padding: 16px 20px;
    }
    
    /* List view mobile */
    .post-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .post-list-info {
        flex: 0 0 auto;
    }
    
    .post-list-gallery {
        width: 100%;
    }
    
    .post-gallery-track {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .posts-editorial {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
}
