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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    position: fixed;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    color: #000000; /* Black */
    font-weight: bold;
    text-decoration: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img.profile-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Style for logo when it's an anchor tag */
.navbar a.logo {
    text-decoration: none;
    font-weight: bold;
    color: #000000;
}

/* Style for logo when it's an h1 */
nav .logo,
nav h1.logo {
    font-size: 1.5rem;
    color: #000000;
    font-weight: bold;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

/* Remove any underline on hover for all logo types */
.navbar a.logo:hover,
.navbar h1.logo:hover,
.navbar .logo:hover {
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #000000; /* Black */
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a:not(.nav-button):hover {
    color: #84130b; /* Maroon */
}

/* Style for the contact button */
.nav-links .nav-button {
    background: #000000;
    color: #ffffff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links .nav-button:hover {
    background: #84130b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

/* Mobile menu icon */
.mobile-menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001; /* Higher than the mobile menu to ensure it's clickable */
    position: relative; /* Ensure proper stacking context */
}

.mobile-menu-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #000000;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-icon.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-icon.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.photography-hero {
    padding: 12rem 2rem 6rem;
    text-align: center;
    background: linear-gradient(180deg, #e2d4b6, #d6c399);
    color: #000000;
}

.photography-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.photography-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.album-button {
    display: inline-block;
    background: #84130b; /* Maroon color */
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.album-button:hover {
    background: #6a0f09; /* Darker maroon on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, #e2d4b6, #d6c399);
    color: #2c3e50;
    padding: 10rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: auto;
    position: relative;
    z-index: 2;
}

.hero .greeting {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    color: #84130b;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 0 0 1rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    line-height: 1.2;
    font-weight: 800;
    background: linear-gradient(90deg, #84130b, #b81a10);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
    color: #4a4a4a;
}

.hero .bio {
    font-size: 1.25rem;
    margin: 0 auto 2rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
    color: #5a5a5a;
    line-height: 1.6;
}

/* Favorite Word Section */
.favorite-word-section {
    padding: 4rem 2rem;
    background-color: #f8f3e8;
    text-align: center;
    overflow: hidden;
}

.word-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(180deg, #e7d8c0, #d9c7a8);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out forwards;
}

.favorite-word-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #84130b;
    position: relative;
    font-weight: 700;
}

.word-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.word {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #84130b, #b81a10);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-transform: lowercase;
    position: relative;
    display: inline-block;
}

.word::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -10px;
    left: 0;
    background: linear-gradient(90deg, #84130b, #b81a10);
    transform-origin: left;
    transform: scaleX(0.3);
    transition: transform 0.5s ease;
}

.word:hover::after {
    transform: scaleX(1);
}

.definitions {
    text-align: left;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a4a4a;
    max-width: 600px;
}

.definition-number {
    font-weight: bold;
    color: #84130b;
    margin-right: 0.5rem;
}

.obsolete {
    font-style: italic;
    color: #777;
    margin-right: 0.5rem;
}

.scroll-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.8s forwards;
    margin-top: 1rem; /* Add space between tagline and scroll hint */
    padding-top: 1rem;
    position: relative;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
}

.scroll-hint:hover {
    opacity: 0.8;
    transform: translateY(3px);
}

.scroll-hint svg {
    margin-top: 0.5rem;
    animation: bounce 2s infinite;
    pointer-events: none;
}

.scroll-hint span {
    pointer-events: none;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Mosaic Grid Section */
.mosaic-section {
    padding: 5rem 2rem;
    background: #f9f9f9;
    width: 100%;
    overflow: hidden;
}

.mosaic-header {
    max-width: 1200px;
    margin: 0 auto 3rem;
    text-align: center;
    width: 100%;
}

.mosaic-header h2 {
    font-size: 2.5rem;
    color: #84130b;
    margin-bottom: 1.5rem;
}

.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid #84130b;
    background: transparent;
    color: #84130b;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-btn:hover, .filter-btn.active {
    background: #84130b;
    color: #ffffff;
}

.mosaic-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    opacity: 0; /* Hidden initially, will be shown after Masonry initializes */
    transition: opacity 0.3s ease;
}

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #84130b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Error States */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-text {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.retry-button {
    background: #84130b;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: #a01611;
}

/* Lazy Loading Styles */
.lazy-load {
    position: relative;
    background-color: #f5f5f5;
    background-image: none !important;
}

.image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd),
                linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: 4px;
    opacity: 0.7;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.4; }
}

.image-error {
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-error .error-icon {
    font-size: 2rem;
    color: #ccc;
}

/* Grid sizing elements for Masonry */
.grid-sizer,
.mosaic-card {
    width: 32%; /* Exact width for 3 columns */
}

/* Gutter size */
.gutter-sizer {
    width: 2%;
}

.mosaic-card {
    position: relative;
    perspective: 1000px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px; /* Bottom margin between cards */
    height: 400px; /* Standard height */
}

/* Special sizes for different card types */
.mosaic-card.wide {
    width: 65%; /* Two column width */
}

.mosaic-card.tall {
    height: 820px; /* Double height for tall cards */
}


/* Isotope-specific transition classes */
.isotope-item {
    z-index: 2;
}

.isotope-hidden.isotope-item {
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

/* Media queries for responsive layout */
@media screen and (max-width: 1200px) {
    .grid-sizer,
    .mosaic-card {
        width: 49%; /* Exact width for 2 columns */
    }
    
    .gutter-sizer {
        width: 2%;
    }
    
    .mosaic-card.wide {
        width: 100%; /* Full width on smaller screens */
    }
}

@media screen and (max-width: 768px) {
    .nav-content {
        padding: 1rem;
    }
    
    .mobile-menu-icon {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%; /* Reduced width */
        height: auto; /* Auto height instead of 100vh */
        max-height: 80vh; /* Maximum height */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem; /* Reduced gap */
        transition: all 0.4s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 1.5rem; /* Reduced padding */
        z-index: 1000; /* Ensure proper stacking with the hamburger icon */
        display: flex;
        margin-top: 60px; /* Add margin at the top to leave space for the navbar */
        border-radius: 0 0 0 10px; /* Rounded corners on the bottom left */
    }
    
    .nav-links.active {
        right: 0 !important; /* Use !important to override any other styles */
        display: flex !important; /* Ensure it's displayed when active */
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .nav-links a {
        display: block;
        font-size: 1.1rem;
        padding: 0.8rem;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    
    .nav-links a:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    .nav-links .nav-button {
        margin-top: 0.5rem;
    }
    
    .grid-sizer{
        width: 100%; /* Full width for single column */
    }
    
    .gutter-sizer {
        width: 0;
    }
    
    body.mobile-menu-open .mosaic-card,
    body.mobile-menu-open .mosaic-card.tall,
    body.mobile-menu-open .mosaic-card.wide,
    html body .mosaic-card,
    html body .mosaic-card.tall,
    html body .mosaic-card.wide {
        width: 100% !important;
        height: 400px !important; /* Standardized height for all cards on mobile */
    }
    
    /* Fix for image cutoff on mobile */
    .card-front {
        background-position: center 15%; /* Position slightly towards the top */
    }
}

@media screen and (max-width: 480px) {
    .logo span {
        font-size: 1.2rem;
    }
    
    .logo img.profile-icon {
        width: 32px;
        height: 32px;
    }
    
    .nav-links {
        width: 85%;
    }
}

/* Card sizes are now defined in the grid section */

.card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    /* Specify the property to avoid conflicts with Isotope transitions */
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1.000);
    transform-style: preserve-3d;
    box-sizing: border-box;
}

/* Hover effect for desktop */
@media (hover: hover) and (pointer: fine) {
  .mosaic-card:hover .card-inner {
    transform: rotateY(180deg);
  }
}

/* Active state for mobile tap */
.mosaic-card.active .card-inner {
  transform: rotateY(180deg);
}

/* Make sure cards are tap targets on mobile */
@media (max-width: 768px) {
  .mosaic-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.card-front {
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.5rem;
    color: white;
    text-align: left;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-tag {
background: rgba(0, 0, 0, 0.7);
color: white;
padding: 0.5rem 1rem;
border-radius: 50px;
font-size: 0.9rem;
font-weight: 600;
backdrop-filter: blur(5px);
display: inline-block;
}

.card-back {
    background: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-align: left;
    overflow-y: auto;
    box-sizing: border-box;
}

.card-back h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.card-back .subtitle {
    color: #84130b;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.card-back .description {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #84130b;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
}

.card-button:hover {
    background: #6a0f09;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-tags span {
    background: #f0f0f0;
    color: #555;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Responsive Design */
/* All responsive styles are consolidated in the main media queries above */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .mosaic-card.wide,
    .mosaic-card.tall {
        grid-column: span 1;
        grid-row: span 1;
        height: 280px;
    }
    
    .mosaic-grid {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }
    
    .mosaic-header h2 {
        font-size: 2rem;
    }
    
    .filter-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .filter-container::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 2px;
    }
}

/* Contact Page */
.contact-page {
    padding: 8rem 2rem 5rem;
    background: #f9f9f9;
    min-height: calc(100vh - 100px);
}

.contact-page h1 {
    text-align: center;
    margin-bottom: 3rem;
    color: #000000;
    font-size: 2.5rem;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    background: #e2d4b6; /* Dutch white background */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-info {
    background: #e2d4b6; /* Dutch white background */
    color: #000000; /* Black text */
    padding: 3rem 2rem;
    border-radius: 10px 0 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: #000000; /* Black text */
}

.contact-info h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: #84130b; /* Maroon underline */
}

.contact-info p {
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #000000; /* Black text */
}

.contact-info i {
    color: #84130b; /* Maroon icons */
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.contact-form {
    padding: 3rem 2rem;
    background: white;
    border-radius: 0 10px 10px 0;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e2d4b6;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #84130b;
    box-shadow: 0 0 0 2px rgba(132, 19, 11, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    background: #84130b;
    color: white;
    border: 2px solid #84130b;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 600;
}

.submit-btn:hover {
    background: #6a140f;
    border-color: #6a140f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.social-icon {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #f6f2e9;
    color: #84130b;
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-info h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem auto 0;
    max-width: 300px;
}

/* For screens smaller than 600px */
@media (max-width: 600px) {
    .social-links {
        max-width: 240px;
        gap: 1.2rem;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}

.social-icon {
    font-size: 1.5rem;
    color: #84130b;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: #000000;
    color: #e2d4b6;
    margin-top: auto;
    flex-shrink: 0;
    width: 100%;
}
