:root {
    --primary-color: #2c3e50;
    --accent-color: #34495e;
    --text-color: #2c3e50;
    --light-bg: #f5f6fa;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('NAND');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.parallax-header {
    background-attachment: fixed;
}

.hero-content {
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 0;
    font-weight: 300;
}

.hero h2 {
    font-size: 2.5rem;
    margin: 1rem 0;
}

.date {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.biography {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bio-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.bio-entry {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.bio-text {
    text-align: left;
}

.bio-entry img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.bio-entry img:hover {
    transform: scale(1.05);
}

.memorial-photo {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.memories {
    background: var(--light-bg);
    padding: 4rem 2rem;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fade-in {
    animation: fadeIn 2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.quotes {
    padding: 4rem 2rem;
    background: var(--accent-color);
    color: white;
}

.quote-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

blockquote {
    font-size: 1.5rem;
    font-style: italic;
    margin: 0;
}

.timeline {
    padding: 4rem 2rem;
    background: var(--light-bg);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    scroll-snap-align: start;
    min-width: 300px;
    transform: translateY(50px);
    opacity: 0;
    transition: var(--transition);
}

.timeline-item.visible {
    transform: translateY(0);
    opacity: 1;
}

.timeline-item h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.timeline-item ul {
    list-style-type: none;
    padding: 0;
}

.timeline-item li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-item li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.timeline-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 2rem;
    scrollbar-width: none;
}

.timeline-scroll::-webkit-scrollbar {
    display: none;
}

.region-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.region {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: var(--transition);
    cursor: pointer;
}

.region:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.favorite-word {
    font-style: italic;
    margin-top: 1rem;
    font-size: 1.2rem;
}

section {
    min-height: 100vh;
    scroll-margin-top: 0;
}

.travels {
    background: white;
    padding: 4rem 2rem;
}

.legacy {
    background: var(--light-bg);
    padding: 4rem 2rem;
}

/* ...existing code... */

.photo-gallery {
    padding: 4rem 2rem;
    background: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* ...existing code... */

.bio-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.bio-photos img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.bio-photos img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .bio-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }

    .travel-content p {
        font-size: 1.2rem;
        padding: 0.5rem;
    }

    .bio-photos {
        grid-template-columns: 1fr;
    }

    .bio-entry,
    .bio-entry:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .bio-entry img {
        height: 200px;
    }
}

/* ...existing code... */

.travel-content p {
    font-size: 1.4rem;
    text-align: center;
    color: var(--primary-color);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

/* ...existing code... */

.career-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.career-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.timeline-milestone {
    position: relative;
    margin: 4rem 0;
    cursor: pointer;
}

.timeline-milestone:nth-child(odd) {
    padding-right: calc(50% + 2rem);
}

.timeline-milestone:nth-child(even) {
    padding-left: calc(50% + 2rem);
}

.timeline-milestone::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 0;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 1;
}

.timeline-milestone:nth-child(odd)::before {
    right: calc(50% - 10px);
}

.timeline-milestone:nth-child(even)::before {
    left: calc(50% - 10px);
}

.timeline-milestone::before:hover {
    transform: scale(1.2);
    background-color: var(--primary-color);
}

.milestone-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: var(--transition);
    cursor: pointer;
}

.milestone-expanded {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    margin-top: 1rem;
}

.milestone-expanded.active {
    max-height: 500px;
    opacity: 1;
}

.milestone-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin: 1rem 0;
}

.milestone-description {
    color: var(--text-color);
    line-height: 1.6;
}

/* Remove previous milestone-details styles */
.milestone-details,
.timeline-modal,
.timeline-modal-content,
.timeline-modal-close,
.timeline-modal-body,
.timeline-modal-image,
.timeline-overlay {
    display: none;
}

.milestone-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.milestone-year {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .career-timeline::before {
        left: 20px;
    }
    
    .timeline-milestone {
        padding-left: 50px !important;
        padding-right: 0 !important;
    }
    
    .timeline-milestone::before {
        left: 10px !important;
    }

    .milestone-details {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 90%;
        max-width: 300px;
        right: auto;
        z-index: 1000;
    }

    .timeline-milestone:nth-child(odd) .milestone-details,
    .timeline-milestone:nth-child(even) .milestone-details {
        right: auto;
        left: 50%;
    }

    .milestone-details.active {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Add overlay for mobile */
.timeline-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.timeline-overlay.active {
    display: block;
}

/* ...existing code... */

.family {
    padding: 4rem 2rem;
    background: var(--light-bg);
}

.family-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.family-content h3 {
    color: var(--accent-color);
    text-align: center;
    margin: 3rem 0 2rem;
    font-size: 1.8rem;
}

.family-members {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.family-member {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.family-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.family-content > p {
    font-size: 1.4rem;
    text-align: center;
    color: var(--primary-color);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    font-weight: 300;
}

.family-grid {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.family-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.family-member {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.family-member h4 {
    text-align: center;
    margin-bottom: 1rem;
}

.family-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.family-group {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.family-group h3 {
    color: var(--accent-color);
    text-align: center; 
    font-size: 1.8rem;
}

.family-members {
    display: grid;
    gap: 1.5rem;
}

.family-member {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.family-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.family-member h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.family-member p {
    color: var(--text-color);
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .family-grid {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .family-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ...existing code... */

.family-slideshow {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.family-slideshow h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    text-align: center;
}

.slideshow-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.slideshow-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ...existing code... */

.slideshow-nav {
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slideshow-nav button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin: 0 0.5rem;
    color: var(--primary-color);
}

/* Remove the previous button positioning styles */
.prev, .next {
    padding: 0;
}

/* ...existing code... */

.slideshow-nav {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slideshow-container:hover .slideshow-nav {
    opacity: 1;
}

.slideshow-nav button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.slideshow-nav button:hover {
    background: white;
    transform: scale(1.1);
}

/* Add enlarge button */
.enlarge-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.slideshow-container:hover .enlarge-btn {
    opacity: 1;
}

.enlarge-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Modal styles for enlarged images */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
}

.photo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.photo-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Remove the old modal styles */
.modal,
.modal-content {
    display: none;
}

/* ...existing code... */

.children-grid {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}


.grandchildren-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    justify-content: center; /* Centers the items horizontally */
}

/* First row of 4 cards */
.grandchild-card:nth-child(-n+4) {
    grid-column: auto;
}

/* Last three cards centered in second row */
.grandchild-card:nth-child(5) {
    grid-column: 1 / span 1;
}

.grandchild-card:nth-child(6) {
    grid-column: 2 / span 1;
}

.grandchild-card:nth-child(7) {
    grid-column: 3 / span 1;
}

@media (max-width: 1200px) {
    .grandchildren-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grandchild-card {
        grid-column: auto !important;
    }
}

@media (max-width: 480px) {
    .grandchildren-grid {
        grid-template-columns: 1fr;
    }
}

/* ...existing code... */

.grandchild-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.grandchild-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.grandchild-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.grandchild-card h4 {
    padding: 1rem;
    margin: 0;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .grandchildren-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }

    .grandchild-card img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .grandchildren-grid {
        grid-template-columns: 1fr;
    }
}

/* Remove all carousel-related styles */

/* ...existing code... */

@media (max-width: 768px) {
    .children-grid {
        grid-template-columns: 1fr;
    }
}

/* ...existing code... */

.footer {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.footer-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-info p {
    margin: 0;
}

.footer-divider {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 2rem auto;
}

.footer-quote {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}


.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    will-change: transform, opacity;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.slide.previous {
    transform: translateX(-100%);
    opacity: 0;
}

// ...existing code...

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

// ...existing code...



