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

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: #fdf8f5;
    min-height: 100vh;
    color: #5a5a5a;
    position: relative;
    overflow-x: hidden;
}

/* Soft background pattern */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 218, 185, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 182, 193, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(221, 160, 221, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(176, 224, 230, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.header {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 218, 185, 0.3);
    position: relative;
}

/* Hand-drawn underline effect */
.header::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: url("data:image/svg+xml,%3Csvg width='200' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 2 Q50 0 100 2 T200 2' stroke='%23ffb6c1' stroke-width='2' fill='none' opacity='0.6'/%3E%3C/svg%3E");
    background-size: 200px 4px;
}

.header h1 {
    color: #d4a574;
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'Quicksand', sans-serif;
}

.header p {
    color: #8b7d7b;
    font-size: 1.1em;
    font-style: italic;
    letter-spacing: 1px;
}

.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Masonry grid with artistic spacing */
.grid {
    column-count: 4;
    column-gap: 25px;
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .grid {
        column-count: 1;
    }
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 218, 185, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 25px;
    display: inline-block;
    width: 100%;
    position: relative;
}

/* Chalky brush stroke effect on cards */
.card::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='roughPaper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' result='noise' seed='2'/%3E%3CfeDiffuseLighting in='noise' lighting-color='white' surfaceScale='1'%3E%3CfeDistantLight azimuth='45' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23roughPaper)' opacity='0.3'/%3E%3C/svg%3E");
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.card:hover {
    transform: translateY(-8px) rotate(0.5deg);
    box-shadow: 
        0 12px 25px rgba(0, 0, 0, 0.1),
        inset 0 0 0 2px rgba(255, 182, 193, 0.3);
}

.card:hover::before {
    opacity: 0.3;
}

.image-container {
    position: relative;
    overflow: hidden;
    background: #fef5f1;
}

/* Soft vignette effect on images */
.image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 60%, rgba(255, 255, 255, 0.3) 100%);
    pointer-events: none;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
    filter: brightness(1.05) saturate(0.9);
}

.card:hover img {
    transform: scale(1.08);
    filter: brightness(1.1) saturate(0.95);
}

.card-content {
    padding: 25px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 248, 245, 0.5) 100%);
}

.card h3 {
    font-size: 1.4em;
    margin-bottom: 12px;
    color: #6b5d5d;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.card .location {
    color: #9d8b8b;
    font-size: 0.9em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-style: italic;
}

.card .location::before {
    content: "✿";
    margin-right: 8px;
    color: #ffb6c1;
}

.card .preview {
    color: #8b7d7b;
    font-size: 0.95em;
    line-height: 1.6;
    opacity: 0.9;
}

/* Modal with soft styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 248, 245, 0.95);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: white;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 30px;
    overflow: hidden;
    animation: gentleSlideUp 0.4s ease;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 218, 185, 0.3);
}

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

.modal-image-container {
    position: relative;
    background: #fef5f1;
    max-height: 450px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    filter: brightness(1.05) saturate(0.9);
}

.modal-body {
    padding: 35px;
    background: linear-gradient(to bottom, white 0%, rgba(255, 248, 245, 0.5) 100%);
}

.modal-body h2 {
    font-size: 2em;
    margin-bottom: 12px;
    color: #6b5d5d;
    font-weight: 300;
    letter-spacing: 1px;
}

.modal-body .info {
    color: #9d8b8b;
    margin-bottom: 20px;
    font-size: 1.05em;
    font-style: italic;
}

.modal-body .description {
    font-size: 1.05em;
    line-height: 1.8;
    color: #7a6b6b;
    margin-bottom: 30px;
    text-align: justify;
}

.interests {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px dashed rgba(255, 182, 193, 0.4);
}

.interests h3 {
    font-size: 1.1em;
    margin-bottom: 18px;
    color: #d4a574;
    font-weight: 300;
    letter-spacing: 1px;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background: linear-gradient(135deg, #fff5ee 0%, #ffe4e1 100%);
    color: #8b7d7b;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.85em;
    font-weight: 400;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 182, 193, 0.2);
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffdab9 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.tag:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
}

.tag:hover::before {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid rgba(255, 182, 193, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    z-index: 10;
    color: #9d8b8b;
}

.close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #fff5ee;
    border-color: #ffb6c1;
}

.loading {
    text-align: center;
    padding: 60px;
    color: #9d8b8b;
    font-size: 1.1em;
    font-style: italic;
}

/* Soft pulsing animation for loading */
.loading::after {
    content: " ♡";
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
    color: #ffb6c1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #fef5f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ffdab9, #ffb6c1);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ffb6c1, #ffdab9);
}