/* Modern Design System */
:root {
    --primary-green: #3d5919;
    --light-green: #6f8a53;
    --sage: #9db078;
    --cream: #faf8f5;
    --warm-white: #ffffff;
    --text-dark: #2c2c2c;
    --text-light: #6b7280;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
  }
  
  /* Smooth Scroll */
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
  }
  
  /* Modern Navigation */
  .navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
  }
  
  .navbar-modern.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
  }
  
  .nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: -0.5px;
  }
  
  .nav-link-modern {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
  }
  
  .nav-link-modern:hover {
    background: rgba(61, 89, 25, 0.08);
    color: var(--primary-green);
  }
  
  .nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--primary-green);
    transition: transform 0.3s;
  }
  
  .nav-link-modern:hover::after {
    transform: translateX(-50%) scaleX(1);
  }
  
  /* Hero Section with Background Image */
  .hero-modern {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1601634853634-f370ae79ff66?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTg0fHx5ZWxsb3clMjBza3l8ZW58MHwwfDB8fHww&auto=format&fit=crop&q=60&w=700');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0 80px;
    margin-top: 70px;
    position: relative;
  }
  
  .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(61, 89, 25, 0.75), rgba(111, 138, 83, 0.7));
    z-index: 1;
  }
  
  .hero-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
  }
  
  .hero-image-wrapper {
    position: relative;
  }
  
  .hero-image-modern {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 8px solid white;
    position: relative;
    z-index: 2;
  }
  
  .hero-image-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(61, 89, 25, 0.3), rgba(111, 138, 83, 0.3));
    border-radius: 24px;
    opacity: 0.5;
    z-index: 1;
  }
  
  .hero-content-modern {
    padding: 20px 0;
  }
  
  .hero-label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .hero-name {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  .hero-dates {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    font-weight: 400;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
  }
  
  .hero-quote {
    font-size: 1.15rem;
    line-height: 1.8;
    color: white;
    font-style: italic;
    padding: 20px;
    border-left: 4px solid white;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    margin-top: 24px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
  }
  
  /* Section Styling */
  .section-modern {
    padding: 80px 0;
    position: relative;
  }
  
  .section-header {
    text-align: center;
    margin-bottom: 60px;
  }
  
  .section-tag {
    display: inline-block;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  
  .section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
  }
  
  .section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
  }
  
  /* About Section - Timeline Style */
  .about-modern {
    background: linear-gradient(135deg, #f8faf6 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
  }
  
  .about-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
      radial-gradient(circle at 20% 30%, rgba(61, 89, 25, 0.03) 0%, transparent 50%),
      radial-gradient(circle at 80% 70%, rgba(111, 138, 83, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }
  
  .about-modern .container {
    position: relative;
    z-index: 1;
  }
  
  .timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
  }
  
  .timeline-item {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-green);
    transition: var(--transition);
  }
  
  .timeline-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
  }
  
  .timeline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 12px;
    color: white;
    font-size: 1.3rem;
    margin-bottom: 16px;
  }
  
  .timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
  }
  
  .timeline-content p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
  }
  
  /* Gallery - Masonry with Filters */
  .gallery-modern {
    background: var(--cream);
  }
  
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
  }
  
  .gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    box-shadow: var(--shadow-sm);
  }
  
  .gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
  }
  
  .gallery-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: var(--transition);
  }
  
  .gallery-card:hover img {
    transform: scale(1.05);
  }
  
  .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
  }
  
  .gallery-card:hover .gallery-overlay {
    opacity: 1;
  }
  
  /* Video Section */
  .video-modern {
    background: white;
  }
  
  .video-container-modern {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    background: #000;
  }
  
  .video-container-modern iframe,
  .video-container-modern video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
  
  /* Modal - Modern Design */
  .modal-modern {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .modal-content-modern {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .modal-content-modern img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
  
  .modal-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
  }
  
  .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
  }
  
  .modal-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
  }
  
  .modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
  }
  
  .modal-nav-btn.prev { left: 30px; }
  .modal-nav-btn.next { right: 30px; }
  
  /* Memories Form - Modern Card Design */
  .memories-modern {
    background: var(--cream);
  }
  
  .memories-form-card {
    max-width: 700px;
    margin: 0 auto 60px;
    background: white;
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(61, 89, 25, 0.1);
  }
  
  .form-group-modern {
    margin-bottom: 28px;
  }
  
  .form-label-modern {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
  }
  
  .form-input-modern {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(61, 89, 25, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--cream);
    color: var(--text-dark);
  }
  
  .form-input-modern:focus {
    outline: none;
    border-color: var(--primary-green);
    background: white;
    box-shadow: 0 0 0 4px rgba(61, 89, 25, 0.08);
  }
  
  .form-textarea-modern {
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
  }
  
  .btn-submit-modern {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
  }
  
  .btn-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  
  .btn-submit-modern:active {
    transform: translateY(0);
  }
  
  .btn-submit-modern:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }
  
  /* Memory Cards - Modern Grid */
  .memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
  }
  
  .memory-card-modern {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(61, 89, 25, 0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
  }
  
  .memory-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
  }
  
  .memory-card-modern:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
  }
  
  .memory-author-modern {
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
    font-size: 1.1rem;
  }
  
  .memory-relationship {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 16px;
  }
  
  .memory-text-modern {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 16px;
  }
  
  .memory-date-modern {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  /* Footer */
  .footer-modern {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    padding: 60px 0 30px;
    text-align: center;
  }
  
  .footer-content {
    max-width: 600px;
    margin: 0 auto 30px;
  }
  
  .footer-quote {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
    opacity: 0.95;
  }
  
  .footer-signature {
    font-size: 1rem;
    opacity: 0.85;
  }
  
  /* Back to Top - Modern Floating Button */
  .back-to-top-modern {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
  }
  
  .back-to-top-modern.visible {
    opacity: 1;
    visibility: visible;
  }
  
  .back-to-top-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(61, 89, 25, 0.3);
  }
  
  /* Loading State */
  .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Character Counter */
  .char-counter {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 4px;
  }
  
  .char-counter.warning {
    color: #f59e0b;
  }
  
  .char-counter.danger {
    color: #ef4444;
  }
  
  /* Responsive Design */
  @media (max-width: 968px) {
    .hero-container {
      grid-template-columns: 1fr;
      text-align: center;
      gap: 40px;
    }
  
    .hero-image-modern {
      margin: 0 auto;
    }
  
    .hero-name {
      font-size: 2.8rem;
    }
  
    .section-title {
      font-size: 2.2rem;
    }
  }
  
  @media (max-width: 768px) {
    .hero-name {
      font-size: 2.2rem;
    }
  
    .section-title {
      font-size: 1.8rem;
    }
  
    .memories-form-card {
      padding: 32px 24px;
    }
  
    .gallery-grid {
      grid-template-columns: 1fr;
    }
  
    .modal-nav-btn {
      width: 44px;
      height: 44px;
    }
  
    .modal-nav-btn.prev { left: 15px; }
    .modal-nav-btn.next { right: 15px; }
  }