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

:root {
    --primary-color: #4b5563;
    --secondary-color: #6b7280;
    --accent-color: #9ca3af;
    --text-dark: #1a1a1a;
    --text-gray: #4a4a4a;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-light: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f6f2;
    color: var(--text-dark);
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
    font-size: 16px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><line x1='50' y1='44' x2='50' y2='56' stroke='%23b46428' stroke-opacity='0.15' stroke-width='1'/><line x1='44' y1='50' x2='56' y2='50' stroke='%23b46428' stroke-opacity='0.15' stroke-width='1'/></svg>"),
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><line x1='10' y1='8' x2='10' y2='12' stroke='%23b46428' stroke-opacity='0.07' stroke-width='1'/><line x1='8' y1='10' x2='12' y2='10' stroke='%23b46428' stroke-opacity='0.07' stroke-width='1'/></svg>");
    background-size: 100px 100px, 20px 20px;
    background-position: center top, center top;
}


/* Navigation */
nav {
    background: var(--bg-white);
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.3s ease-out;
    transform: translateY(0);
}

nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    letter-spacing: -1px;
    transition: all 0.3s ease;
}

.nav-brand i {
    color: var(--text-gray);
    font-size: 1.75rem;
}

.nav-brand:hover {
    color: var(--secondary-color);
}

.nav-brand-text {
    display: inline-grid;
    align-items: start;
}

.nav-title {
    display: block;
    width: 100%;
}

.nav-divider {
    width: 100%;
    height: 1px;
    background: var(--border-light);
    margin: 0.05rem 0 0.1rem;
}

.nav-tagline {
    font-size: 0.6875rem;
    color: var(--text-light);
    font-weight: 400;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.nav-contacts {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.nav-contact:hover {
    color: var(--text-dark);
}

.nav-contact i {
    font-size: 1rem;
    color: var(--secondary-color);
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

/* Typography */
h1 {
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-size: 3.5rem;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    letter-spacing: -2px;
    line-height: 1.1;
}

h2 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: -1px;
    line-height: 1.25;
}

/* Post Cards */
.post {
    background: var(--bg-white);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-left: 3px solid var(--border-light);
    opacity: 0;
    transform: translateY(40px);
    overflow: hidden;
}

.post.post-card {
    overflow: visible;
}

.post.visible {
    animation: appearFromBottom 0.6s ease-out forwards;
}

.post::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
    radial-gradient(circle at var(--lava-before-1, 20% 30%), var(--car-color, transparent) 0%, transparent 36%),
    radial-gradient(circle at var(--lava-before-2, 76% 60%), var(--car-color, transparent) 0%, transparent 40%),
    radial-gradient(circle at var(--lava-before-3, 55% 16%), var(--car-color, transparent) 0%, transparent 30%),
    radial-gradient(circle at var(--lava-before-4, 30% 80%), var(--car-color, transparent) 0%, transparent 44%),
    radial-gradient(circle at var(--lava-before-5, 62% 78%), var(--car-color, transparent) 0%, transparent 36%);
    background-repeat: no-repeat;
    background-size: 125% 125%;
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    filter: blur(100px);
    opacity: 0.08;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
    animation: lavaLampMerge 2.8s ease-in-out infinite;
    border-radius: 24px;
    clip-path: inset(0 round 24px);
}

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

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

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

.post::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
    radial-gradient(circle at var(--lava-after-1, 18% 35%), var(--car-color, transparent) 0%, transparent 34%),
    radial-gradient(circle at var(--lava-after-2, 72% 68%), var(--car-color, transparent) 0%, transparent 32%),
    radial-gradient(circle at var(--lava-after-3, 52% 18%), var(--car-color, transparent) 0%, transparent 28%),
    radial-gradient(circle at var(--lava-after-4, 42% 52%), var(--car-color, transparent) 0%, transparent 38%);
    background-repeat: no-repeat;
    background-size: 125% 125%;
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    filter: blur(88px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
    animation: lavaLampShadow 2.1s ease-in-out infinite;
    border-radius: 24px;
    clip-path: inset(0 round 24px);
}

.post > * {
    position: relative;
    z-index: 1;
}

@keyframes lavaLampShadow {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    }
    35% {
        background-position: 12% -10%, -10% 12%, 8% -8%, -8% 6%;
    }
    70% {
        background-position: -10% 10%, 10% -12%, -8% 8%, 9% -6%;
    }
}

@keyframes lavaLampMerge {
    0%, 100% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    }
    30% {
        background-position: 14% -12%, -12% 14%, 10% -10%, -10% 10%, 12% 6%;
    }
    65% {
        background-position: -12% 12%, 12% -14%, -10% 10%, 10% -10%, -12% -6%;
    }
}

.post:hover::before,
.post:hover::after {
    opacity: 0.35;
}

.post.post-detail::before,
.post.post-detail::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    animation: none !important;
    background: none !important;
    filter: none !important;
}

.post:hover .post-number {
    opacity: 0;
}

.post-card {
    cursor: pointer;
}

.post-title {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.875rem;
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.5px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.post-title:hover {
    color: var(--secondary-color);
}

.post-title-fade {
    animation: titleFade 1.2s ease-out 0.2s forwards;
}

.post-title-glow {
    position: relative;
    animation: titleLavaGlow 1.0s ease-out 0.2s forwards;
    opacity: 1;
}

.post-title-glow::after {
    content: '';
    position: absolute;
    inset: -12% -6% -20% -6%;
    background:
        radial-gradient(circle at 25% 40%, var(--car-color, rgba(156, 163, 175, 0.7)) 0%, transparent 20%),
        radial-gradient(circle at 70% 65%, var(--car-color, rgba(156, 163, 175, 0.6)) 0%, transparent 20%),
        radial-gradient(circle at 50% 20%, var(--car-color, rgba(156, 163, 175, 0.5)) 0%, transparent 20%);
    filter: blur(508px);
    opacity: 0.06;
    z-index: 3;
    animation: none;
}

@keyframes titleLavaGlow {
    0% {
        text-shadow: 0 0 0 rgba(0, 0, 0, 0);
        opacity: 1;
    }
    20% {
        text-shadow: 0 0 24px var(--car-color, rgba(156, 163, 175, 0.03));
    }
    60% {
        text-shadow: 0 0 12px var(--car-color, rgba(156, 163, 175, 0.03));
    }
    100% {
        text-shadow: 0 0 0 rgba(0, 0, 0, 0);
        opacity: 0.7;
    }
}

@keyframes titleFade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.post-meta {
    color: var(--text-light);
    font-size: 0.8125rem;
        z-index: 1;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-meta i {
    color: var(--secondary-color);
    font-size: 0.75rem;
}

.post-meta strong {
    color: var(--text-gray);
    font-weight: 700;
}

.post-content {
    color: var(--text-gray);
    line-height: 1.75;
    margin-bottom: 0;
    font-weight: 400;
    font-size: 1.0625rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content a {
    color: var(--text-dark);
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.2s ease;
}

.post-content a:hover {
    color: var(--secondary-color);
}

.post-content img,
.post-content video {
    max-width: 100%;
    height: auto;
    display: block;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 15, 15, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999;
    padding: 2rem;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: min(1100px, 92vw);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    background: var(--bg-white);
}

.lightbox-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-button:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-button.prev {
    left: 2rem;
}

.lightbox-button.next {
    right: 2rem;
}

@media (max-width: 640px) {
    .lightbox-button.prev {
        left: 1rem;
    }

    .lightbox-button.next {
        right: 1rem;
    }
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-light);
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--text-dark);
}

.post-media {
    margin: 1.5rem 0;
    position: relative;
    z-index: 1;
}

.post-media img,
.post-media video {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    display: block;
    box-shadow: var(--shadow-sm);
    background: var(--bg-light);
    position: relative;
    z-index: 2;
}

.post-media img {
    transform-origin: right bottom;
    transition: transform 0.35s ease;
}

.post-card:hover .post-media img {
    transform: rotate(0.5deg);
}

.post-media a {
    display: block;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    z-index: 1;
        z-index: 2;
  }

.btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(
            circle at 25% 40%,
            var(--btn-hover-color, var(--primary-color)) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 70% 55%,
            var(--btn-hover-color, var(--primary-color)) 0%,
            transparent 45%
        ),
        radial-gradient(
            circle at 45% 20%,
            var(--btn-hover-color, var(--primary-color)) 0%,
            transparent 35%
        ),
        radial-gradient(
            circle at 75% 75%,
            var(--btn-hover-color, var(--primary-color)) 0%,
            transparent 38%
        ),
        radial-gradient(
            circle at 15% 75%,
            var(--btn-hover-color, var(--primary-color)) 0%,
            transparent 32%
        );
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 12px;
    animation: lavaLamp 16s ease-in-out infinite;
    filter: blur(20px);
}

.btn-slow::before {
    animation-duration: 26s;
}

@keyframes lavaLamp {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        filter: blur(20px);
    }
    20% {
        transform: translate(8%, 12%) rotate(60deg);
        filter: blur(22px);
    }
    40% {
        transform: translate(-8%, 5%) rotate(120deg);
        filter: blur(18px);
    }
    60% {
        transform: translate(5%, -10%) rotate(180deg);
        filter: blur(24px);
    }
    80% {
        transform: translate(-6%, -8%) rotate(270deg);
        filter: blur(19px);
    }
}

.btn:hover::before {
    opacity: 0.8;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--text-dark);
}

.btn-primary:hover {
    background: var(--primary-color);
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: var(--border-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* Filter Buttons */
.btn-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 1rem;
    color: white;
    text-decoration: none;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8125rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.2px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    opacity: 0.9;
}

.btn-filter:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn-filter.active {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: var(--bg-white);
    color: var(--text-dark);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(75, 85, 99, 0.1);
}

textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
}

/* Helper elements */
.empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-size: 1.125rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: #dc2626;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
}




/* Decorative number elements */
.post-number {
    display: none;
}

/* Smooth scroll — disabled on mobile to avoid jank */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html {
        scroll-behavior: auto;
    }
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-text {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -2px;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 3rem;
}

.loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes rotateWrench {
    0%, 100% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(15deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-brand {
        font-size: 1.5rem;
    }
    
    .nav-brand i {
        font-size: 1.5rem;
    }

    .nav-contacts {
        gap: 1.25rem;
    }

    .container {
        padding: 2rem 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    h2 {
        font-size: 1.625rem;
    }
    
    .post {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-number {
        display: none;
    }
    
    .post-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Disable scroll-in animation on mobile — show posts immediately */
    .post {
        opacity: 1;
        transform: none;
    }

    .post.visible {
        animation: none;
    }

    /* Loading screen — scale down text so it fits on narrow screens */
    .loading-text {
        font-size: 2.5rem;
        letter-spacing: -1px;
        padding: 0 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-tagline {
        display: none;
    }

    .nav-contacts {
        gap: 0.75rem;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Scroll-to-top button */
#scroll-top {
    position: fixed;
    bottom: 1.5rem;
    left: calc(50% + 340px + 0.75rem);
    z-index: 200;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
    pointer-events: none;
}

#scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-top:hover {
    background: var(--text-dark);
}

@media (max-width: 740px) {
    #scroll-top {
        left: auto;
        right: 1rem;
        bottom: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}
