* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lora', serif;
    line-height: 1.8;
    color: #2c2c2c;
    background-color: #f8f8f8;
    position: relative;
}

.memorial-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0));
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.profile-image {
    width: 180px;
    height: 180px;
    margin: 25px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.15);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 400;
}

.profile-info h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c2c2c;
}

.dates {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.quote {
    font-style: italic;
    color: #666;
    font-size: 1.1rem;
    margin: 20px 0;
    font-family: 'Cormorant Garamond', serif;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.tab {
    padding: 10px 25px;
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #666;
    font-family: 'Lora', serif;
    transition: all 0.3s ease;
    position: relative;
}

.tab::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2c2c2c;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab.active {
    color: #2c2c2c;
}

.tab.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    padding: 20px;
    line-height: 1.8;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-item img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

/* Image Viewer Styles */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.viewer-content img {
    max-width: 85%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.image-description {
    color: white;
    margin-top: 20px;
    font-size: 1.1rem;
    text-align: center;
    padding: 0 20px;
    font-family: 'Cormorant Garamond', serif;
}

.close-viewer {
    position: absolute;
    right: 25px;
    top: 15px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.close-viewer:hover {
    transform: rotate(90deg);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px;
    cursor: pointer;
    border: none;
    font-size: 18px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.prev {
    left: 25px;
}

.next {
    right: 25px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    .profile-info h2 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }

    .gallery-item img {
        height: 130px;
    }

    .viewer-content img {
        max-width: 95%;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        padding: 10px;
    }
}