@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Space+Mono&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f5f5f5;
    --text: #1a1a1a;
    --text-muted: #888;
    --accent: #8B7355;
    --card-shadow: 0 4px 24px rgba(0,0,0,0.15);
    --card-shadow-hover: 0 20px 25px rgba(0, 0, 0, 0.3);
}

html,body{
    background-color: #f5f5f5;
    scrollbar-width: auto; 
    scrollbar-color: #888 #f1f1f1;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    min-height: 100vh;
    padding: 60px 24px 80px;
}

body {
  opacity: 1;
  transition: opacity 0.4s ease;
}

body.fade-out {
  opacity: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

section {
    max-width: 1200px;
    margin: 0 auto 80px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.section-header h2 {
    font-family: 'Poppins', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 400;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #ccc, transparent);
}

.section-count {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    white-space: nowrap;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #e8e8e8;
    box-shadow: var(--card-shadow);
    transform: translateY(0);
    transition: transform 0.35s ease,
                box-shadow 0.35s ease;
    aspect-ratio: 2/3;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card:active,
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.menu {
    display: none;
    position: fixed;
    justify-content: center;
    align-items: center;
    background-color: #2c3e50;
    padding: 3px;
    color: #fff;
    right: 10px;
    top: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.menu span{
    font-size: 35px;
}

.menu:active,
.menu:hover{
    background-color: #44617d;
}

nav{
    display: none;
    padding-top: 60px;
    padding-left: 20px;
    padding-bottom: 40px;
    padding-right: 40px;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #2c3e50;
    gap: 10px;
}

nav .categories {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

nav .categories a{
    border: 2px solid #f5f5f5;
    border-radius: 30px;
    padding: 5px;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    width: 160px;
    font-size: 18px;
    color: #f5f5f5;
    transition: all 0.2s ease;
}

nav .categories a:active,
nav .categories a:hover{
    background-color: #9F001E;
    border-color:  #C4002E;
    transform: scale(1.1);
}

nav .closeBtn{
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
nav .closeBtn span{
    font-size: 30px;
}

nav .closeBtn:active,
nav .closeBtn:hover{
    transform: scale(1.2);
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 28px;
    }
}

@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .menu{
        display: flex;
    }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

section {
    animation: fadeUp 0.6s ease both;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }

.card {
    animation: fadeUp 0.5s ease;
}