/* ===== IMPROVED PORTFOLIO FILTER STYLES ===== */

/* Work section header improvements */
#work .content header {
    margin-bottom: 0;
    padding-bottom: 0;
}

#work .content header h2 {
    margin-bottom: 0.5em;
    line-height: 1.2;
}

#work .content header p {
    margin-bottom: 1.5em;
    opacity: 0.8;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Filter controls - clean minimal style like the image */
.filter-controls {
    text-align: center;
    margin: 0 0 2.5em 0;
    padding: 0;
    position: relative;
}

/* Clean minimal filter buttons - tight padding around text */
.filter-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 4px 12px;
    margin: 0 4px;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.2s ease;
    font-size: 0.6em;
    font-weight: 400;
    letter-spacing: 0.4px;
    display: inline-block;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    line-height: 2.0;
}

/* Hover state - subtle */
.filter-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #444;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Active state - keep your current active color */
.filter-btn.active {
    background: #98c593;
    color: #ffffff;
    border-color: #98c593;
    box-shadow: 0 2px 8px rgba(152, 197, 147, 0.3);
}

.filter-btn.active:hover {
    background: #8bb885;
    border-color: #8bb885;
}

/* Tighter spacing for the entire work section */
#work .content {
    padding-top: 3em;
    padding-bottom: 2em;
}

/* Gallery integration - reduce gap */
.gallery {
    margin-top: 1em;
}

/* Professional spacing adjustments */
@media screen and (min-width: 1681px) {
    .filter-controls {
        margin: 0 0 3em 0;
    }
    
    #work .content {
        padding-top: 4em;
    }
}

@media screen and (max-width: 1680px) {
    .filter-controls {
        margin: 0 0 2em 0;
    }
    
    .filter-btn {
        padding: 7px 18px;
        font-size: 0.7em;
        min-height: 32px;
    }
}

@media screen and (max-width: 1280px) {
    #work .content header h2 {
        margin-bottom: 0.4em;
    }
    
    #work .content header p {
        margin-bottom: 1.2em;
        font-size: 0.85em;
    }
    
    .filter-controls {
        margin: 0 0 1.8em 0;
    }
}

@media screen and (max-width: 980px) {
    .filter-controls {
        margin: 0 0 1.5em 0;
    }
    
    .filter-btn {
        padding: 3px 10px;
        margin: 0 3px 5px 3px;
        border-radius: 12px;
    }
}

@media screen and (max-width: 736px) {
    #work .content header h2 {
        font-size: 2em;
        margin-bottom: 0.3em;
    }
    
    #work .content header p {
        margin-bottom: 1em;
        font-size: 0.8em;
    }
    
    .filter-controls {
        margin: 0 0 1.2em 0;
    }
    
    .filter-btn {
        padding: 3px 8px;
        margin: 0 2px 4px 2px;
        border-radius: 10px;
    }
}

@media screen and (max-width: 480px) {
    .filter-btn {
        padding: 2px 8px;
        margin: 0 2px 4px 2px;
        border-radius: 8px;
    }
    
    .filter-controls {
        margin: 0 0 1em 0;
    }
}

/* Smooth transitions for gallery items */
.gallery article {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery article.filtered-out {
    display: none !important;
}
/* === Word-by-Word Lighting (black -> white) === */
.light-words .word {
  display: inline-block;
  color: #000000;
  opacity: 0;
  animation: light-word 300ms ease-out forwards;
  animation-delay: calc(var(--i) * 80ms);
}

@keyframes light-word {
  0%   { color: #000000; opacity: 0; }
  100% { color: #ffffff; opacity: 1; }
}

/* === Word-by-Word Reverse Lighting (white -> black) === */
.light-words-dark .word {
  display: inline-block;
  color: #ffffff;              /* start white */
  opacity: 1;
  animation: light-word-dark 300ms ease-out forwards;
  animation-delay: calc(var(--i) * 80ms);
  animation-play-state: paused; /* paused until visible */
}
.light-words-dark.is-active .word {
  animation-play-state: running;
}
@keyframes light-word-dark {
  0%   { color: #ffffff; }
  100% { color: #000000; }     /* end black; switch to #222 for dark gray */
}

/* === Custom Lightbox === */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.lightbox.hidden { display: none; }

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;   /* 👈 arrow size */
  color: #fff;
  cursor: pointer;
  padding: 20px;
  user-select: none;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: #fff;
  cursor: pointer;
  padding: 20px;
  user-select: none;
}
.lightbox .nav.prev { left: 20px; }
.lightbox .nav.next { right: 20px; }

/* === Force larger columns across breakpoints === */

/* Replace this entire section */

@media screen and (min-width: 1600px) {
    body #work .content .gallery { 
        grid-template-columns: repeat(5, 1fr) !important; /* 3 instead of 5 */
    }
}

@media screen and (min-width: 1281px) and (max-width: 1400px) {
    body #work .content .gallery { 
        grid-template-columns: repeat(4, 1fr) !important; /* 3 instead of 5 */
    }
}

@media screen and (min-width: 1001px) and (max-width: 1280px) {
    #work .gallery { 
        grid-template-columns: repeat(3, 1fr) !important; /* 2 instead of 4 */
    }
}

@media screen and (min-width: 737px) and (max-width: 1000px) {
    #work .gallery { 
        grid-template-columns: repeat(2, 1fr) !important; /* Keep 2 */
    }
}

@media screen and (max-width: 736px) {
    #work .gallery { 
        grid-template-columns: repeat(1, 1fr) !important; /* Keep 1 */
    }
}
/* === SMOOTH STICKY FILTER BAR === */
.filter-controls.sticky {
    position: fixed;
    top: 3em; /* Directly under header, no gap */
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    /* Keep original styling - no visual changes */
    background: inherit;
    backdrop-filter: inherit;
    -webkit-backdrop-filter: inherit;
}

/* Mobile header adjustment */
@media screen and (max-width: 736px) {
    .filter-controls.sticky {
        top: 2.5em; /* Mobile header height */
    }
}

/* Smooth transition placeholder - prevents jump */
.filter-controls-placeholder {
    visibility: hidden;
    pointer-events: none;
}    

.filter-controls.sticky .filter-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    border-color: rgba(0, 0, 0, 0.15);
}

.filter-controls.sticky .filter-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #222;
}

.filter-controls.sticky .filter-btn.active {
    background: #98c593;
    color: #ffffff;
    border-color: #98c593;
}

/* Mobile header adjustment */
@media screen and (max-width: 736px) {
    .filter-controls.sticky {
        top: 2.5em; /* Mobile header height */
        padding: 8px 0;
    }
}

/* Add spacing when filter is sticky to prevent content jump */
#work .content.filter-sticky-spacer {
    padding-top: 80px; /* Adjust based on filter height */
}

@media screen and (max-width: 736px) {
    #work .content.filter-sticky-spacer {
        padding-top: 60px;
    }
}

.back-to-categories-btn {
    background: #98c593;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s ease;
}

.back-to-categories-btn:hover {
    background: #8bb885;
}

/* Gallery image hover zoom effect */
.gallery article .image {
    overflow: hidden; /* Important: keeps zoomed image within bounds */
    position: relative;
}

.gallery article .image img {
    transition: transform 0.4s ease;
    transform: scale(1);
}

.gallery article:hover .image img {
    transform: scale(1.1); /* Zoom to 110% on hover */
}

/* Fix gallery hover - disable article movement, focus on image zoom */
.gallery article:hover {
    transform: none !important; /* Remove the translateY movement */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important; /* Keep subtle shadow */
}

.gallery article .image {
    overflow: hidden !important;
    border-radius: 4px; /* Optional: adds slight rounded corners */
}

.gallery article .image img {
    transition: transform 0.3s ease !important;
    transform: scale(1) !important;
}

.gallery article:hover .image img {
    transform: scale(1.08) !important; /* Slightly stronger zoom */
}

/* Reduce gallery gaps */
.gallery {
    gap: 12px !important; /* Reduce from 16px to 8px */
    row-gap: 12px !important;
    column-gap: 12px !important;
}

/* Ensure consistent spacing in main CSS too */
#work .gallery {
    row-gap: 12px !important;
    column-gap: 12px !important;
}



/* ===== DARK GREY THEME ===== */

/* Main background and body */
body {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

/* Header */
#header {
    background: rgba(42, 42, 42, 0.95) !important;
    color: #e0e0e0 !important;
}

#header h1 a {
    color: #e0e0e0 !important;
}

#header nav ul li a {
    color: #e0e0e0 !important;
}

#header nav ul li a:hover {
    color: #98c593 !important;
}

/* Main sections */
.main.style3.primary {
    background: #333333 !important;
    color: #e0e0e0 !important;
}

.main.style3.secondary {
    background: #3a3a3a !important;
    color: #e0e0e0 !important;
}

/* Content boxes */
.box {
    background: #404040 !important;
    color: #e0e0e0 !important;
}

/* Form elements */
input[type="text"],
input[type="email"],
textarea {
    background: #505050 !important;
    color: #e0e0e0 !important;
    border: solid 2px #606060 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #98c593 !important;
}

/* Filter buttons */
.filter-btn {
    background: rgba(64, 64, 64, 0.9) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.filter-btn:hover {
    background: rgba(80, 80, 80, 1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.filter-btn.active {
    background: #98c593 !important;
    color: #ffffff !important;
}

/* Footer */
#footer {
    background: #1a1a1a !important;
    color: rgba(224, 224, 224, 0.7) !important;
}

#footer a {
    color: rgba(224, 224, 224, 0.7) !important;
}

#footer a:hover {
    color: #98c593 !important;
}

/* Back to categories button */
.back-to-categories-btn {
    background: #98c593 !important;
    color: #ffffff !important;
}

.back-to-categories-btn:hover {
    background: #8bb885 !important;
}

/* Lightbox */
.lightbox {
    background: rgba(0, 0, 0, 0.95) !important;
}

/* Gallery hover effects - adjust for dark theme */
.gallery article:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

/* Contact lightbox styling */
.contact-form-container {
  background: #404040;
  padding: 2em;
  border-radius: 8px;
  max-width: 500px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

.contact-form-container h2 {
  color: #e0e0e0;
  margin-bottom: 0.5em;
}

.contact-form-container p {
  color: #c0c0c0;
  margin-bottom: 1.5em;
}

/* ===== LIGHT GREY CONTENT BOXES: What I Do & Who I Am ===== */

/* Only change the content boxes, not the section backgrounds */
#one .box, #two .box {
    background: #f5f5f5 !important; /* Light grey background for content box */
    color: #333333 !important; /* Dark text */
}

/* Ensure headers are dark in these content boxes */
#one .box h2, #two .box h2 {
    color: #222222 !important;
}

/* Ensure paragraph text is dark */
#one .box p, #two .box p {
    color: #444444 !important;
}

/* Ensure strong/bold text is properly dark */
#one .box strong, #two .box strong {
    color: #222222 !important;
}

/* Mobile responsiveness - maintain light grey on mobile */
@media screen and (max-width: 736px) {
    #one .box, #two .box {
        background: rgba(245, 245, 245, 0.95) !important; /* Slightly transparent for mobile */
        color: #333333 !important;
    }
}

/* Mobile hamburger menu styles */
.hamburger-menu {
    display: none;
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #e0e0e0;
    margin: 2px 0;
    transition: all 0.3s ease;
    display: block;
}

/* Mobile styles */
@media screen and (max-width: 736px) {
    /* Show hamburger button */
    .hamburger-menu {
        display: flex !important;
    }
    
    /* Hide navigation by default on mobile */
    #header nav {
        display: none !important;
        position: fixed;
        top: 2.5em;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95) !important; /* White background with slight transparency */
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 10000;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Show navigation when mobile-open class is added */
    #header nav.mobile-open {
        display: block !important;
    }
    
    /* Style mobile navigation list */
    #header nav ul {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    
    #header nav ul li {
        display: block !important;
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(224, 224, 224, 0.1);
        background: white !important;
    }
    
    #header nav ul li:last-child {
        border-bottom: none;
    }
    
    #header nav ul li a {
        display: block !important;
        padding: 15px 20px;
        color: #1a1a1a !important; /* Much darker text for better readability */
        text-decoration: none;
        font-size: 0.9em;
        font-weight: 600; /* Slightly bolder for better contrast */
        line-height: 1;
        height: auto !important;
        border: none;
        transition: all 0.2s ease;
        text-shadow: 0 1px 2px rgba(255,255,255,0.1); /* Subtle text shadow for definition */
    }
    
    #header nav ul li a:hover,
    #header nav ul li a:focus {
        background: rgba(255, 255, 255, 1) !important;
        color: #000000 !important; /* Pure black on hover for maximum contrast */
    }
    
    /* Animate hamburger lines when active */
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Prevent body scroll when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }
}

/* Mobile lightbox X button */
.mobile-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-close-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.9);
}

@media screen and (max-width: 768px) {
    .mobile-close-btn {
        display: flex !important;
    }
}

/* Mobile lightbox full-width image */
@media screen and (max-width: 768px) {
    .lightbox {
        padding: 0 !important;
    }
    
    .lightbox-img {
        max-width: 100vw !important;
        max-height: 100vh !important;
        width: 100vw !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Landscape orientation - fill height instead */
    @media screen and (orientation: landscape) {
        .lightbox-img {
            width: auto !important;
            height: 100vh !important;
            max-width: 100vw !important;
        }
    }
}

/* Make sure mobile close button stays visible over full-width image */
@media screen and (max-width: 768px) {
    .mobile-close-btn {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        z-index: 10002 !important;
    }
}

/* Intro navigation text styling */
.intro-navigation {
    text-align: center;
    color: #ffffff;
    font-size: 1.1em;
    margin: 2em 0;
    line-height: 1.4;
}

.intro-navigation a {
    color: #98c593; /* Your theme green */
    text-decoration: none;
    transition: color 0.2s ease;
}

.intro-navigation a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Hide the "More" text in the button, keep just the arrow */
.button.style2.down {
    text-indent: -9999px;
    overflow: hidden;
}

@media screen and (max-width: 736px) {
    .intro-navigation {
        font-size: 1em;
        margin: 1.5em 0;
    }
        
}

/* Larger main tagline */
.main-tagline {
    font-size: 1.4em !important;
    line-height: 1.6em !important;
    margin-bottom: 1.5em !important;
}

/* Smaller scroll instruction text */
.scroll-instruction {
    text-align: center;
    color: #ffffff;
    font-size: 0.9em;
    margin: 1em 0 0 0;
    line-height: 1.4;
    opacity: 0.9;
}

.scroll-instruction a {
    color: #98c593;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scroll-instruction a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Mobile adjustments */
@media screen and (max-width: 736px) {
    .main-tagline {
        font-size: 1.2em !important;
        line-height: 1.5em !important;
    }
    
    .scroll-instruction {
        font-size: 0.8em;
        margin: 0.8em 0 0 0;
    }
        
}

/* Bottom navigation positioning */
.bottom-navigation {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

/* Make sure the arrow points to work section */
.bottom-navigation .button {
    margin-left: 0;
}

/* Bottom navigation positioning - anchored at bottom of section */
.bottom-navigation {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1;
}

/* Main tagline larger text */
.main-tagline {
    font-size: 1.4em !important;
    line-height: 1.6em !important;
    margin-bottom: 1.5em !important;
}

/* Scroll instruction text */
.scroll-instruction {
    text-align: center;
    color: #ffffff;
    font-size: 0.9em;
    margin: 1em 0 0 0;
    line-height: 1.4;
    opacity: 0.9;
}

.scroll-instruction a {
    color: #98c593;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scroll-instruction a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Bottom navigation positioning */
.bottom-navigation {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1;
}

/* Mobile adjustments */
@media screen and (max-width: 736px) {
    .main-tagline {
        font-size: 1.2em !important;
        line-height: 1.5em !important;
    }
    
    .scroll-instruction {
        font-size: 0.8em;
        margin: 0.8em 0 0 0;
    }
        
}

/* Intro section text styling */
.main-tagline {
    font-size: 1.4em !important;
    line-height: 1.6em !important;
    margin-bottom: 1.5em !important;
}

.scroll-instruction {
    text-align: center;
    color: #ffffff;
    font-size: 1em !important; /* Changed from 0.9em to match back-to-works */
    font-weight: 700 !important; /* Make it bold to match */
    margin: 1em 0 0 0;
    line-height: 1.4;
    opacity: 0.9;
}

.scroll-instruction a {
    color: #98c593;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scroll-instruction a:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media screen and (max-width: 736px) {
    .main-tagline {
        font-size: 1.2em !important;
        line-height: 1.5em !important;
    }
    
    .scroll-instruction {
        font-size: 0.8em;
        margin: 0.8em 0 0 0;
    }
        
}

.scroll-instruction {
    text-align: center;
    color: #ffffff;
    font-size: 1em !important;
    font-weight: normal !important; /* Change to normal, not 700 */
    margin: 1em 0 0 0;
    line-height: 1.4;
    opacity: 0.9;
}

/* Make sure strong tags work inside scroll-instruction */
.scroll-instruction strong {
    font-weight: 700 !important; /* Only bold the strong tags */
}

@media screen and (max-width: 736px) {
    .scroll-instruction {
        font-size: 0.9em !important;
        font-weight: normal !important; /* Change to normal */
        margin: 0.8em 0 0 0;
    }
    
    .scroll-instruction strong {
        font-weight: 700 !important; /* Only bold the strong tags */
    }
}
.main-tagline {
       font-size: 1.1em !important;  /* Changed from 1.4em to 1.1em */
       line-height: 1.5em !important;  /* Slightly tighter line height */
       margin-bottom: 1.5em !important;
   }

   @media screen and (max-width: 736px) {
       .main-tagline {
           font-size: 1em !important;  /* Changed from 1.2em to 1em */
           line-height: 1.4em !important;
       }
   }

   /* Add more space between "Hello." and tagline */
.main.style1 h2 {
    margin-bottom: 1.0em !important; /* Increase space below "Hello." */
}

@media screen and (max-width: 736px) {
    .main.style1 h2 {
        margin-bottom: 1.2em !important; /* Slightly less space on mobile */
    }
}

/* Inter font implementation */
body, input, textarea, select {
    font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Professional typography hierarchy */
.main.style1 h2 {
    font-size: 3.5em !important;
    font-weight: 700 !important; 
    letter-spacing: -0.02em !important;
    margin-bottom: 1.8em !important;
    line-height: 0.9em !important;
}

.main-tagline {
    font-size: 1.2em !important;
    font-weight: 400 !important;
    line-height: 1.6em !important;
    letter-spacing: 0.01em !important;
    text-align: center !important;
    max-width: 600px !important;
    margin: 0 auto 2em auto !important;
}

/* Mobile adjustments */
@media screen and (max-width: 736px) {
    .main.style1 h2 {
        font-size: 2.8em !important;
        margin-bottom: 1.4em !important;
    }
    
    .main-tagline {
        font-size: 1.1em !important;
        line-height: 1.5em !important;
    }
}

/* Professional intro section typography */
.main.style1 .content {
    max-width: 800px !important; /* Constrain content width for better readability */
    padding: 0 2rem !important;
}

.main.style1 h2 {
    font-size: 3.5em !important;
    font-weight: 700 !important; /* Lighter than 900 for more refinement */
    letter-spacing: -0.03em !important; /* Tighter letter spacing */
    margin-bottom: 2.2em !important; /* More generous spacing below */
    line-height: 0.95em !important;
}

.main-tagline {
    font-size: 1.3em !important;
    font-weight: 400 !important;
    line-height: 1.7em !important; /* More breathing room between lines */
    letter-spacing: 0.02em !important; /* Slight letter spacing for clarity */
    margin: 0 auto 3em auto !important; /* Center and add bottom margin */
    max-width: 650px !important; /* Constrain for optimal reading */
    text-align: center !important;
}

.main-tagline strong {
    font-weight: 600 !important; /* Moderate emphasis, not too heavy */
}

.scroll-instruction {
    font-size: 1em !important;
    font-weight: 400 !important;
    line-height: 1.5em !important;
    margin: 2.5em auto 0 auto !important; /* Generous top margin */
    max-width: 500px !important;
    letter-spacing: 0.01em !important;
}

/* Mobile typography refinements */
@media screen and (max-width: 736px) {
    .main.style1 .content {
        padding: 0 1.5rem !important;
    }
    
    .main.style1 h2 {
        font-size: 2.8em !important;
        margin-bottom: 1.8em !important;
    }
    
    .main-tagline {
        font-size: 1.1em !important;
        line-height: 1.6em !important;
        margin-bottom: 2.5em !important;
    }
    
    .scroll-instruction {
        font-size: 0.9em !important;
        margin-top: 2em !important;
    }
}

/* Improve vertical rhythm and hierarchy */
.main.style1 {
    padding: 4em 0 4em 0 !important; /* More generous section padding */
}

@media screen and (max-width: 736px) {
    .main.style1 {
        padding: 3em 0 3em 0 !important;
    }
}

/* Equal spacing for intro section elements */
.main.style1 h2 {
    margin-bottom: 1.0em !important; /* Increase space below "Hello." */
}

.main-tagline {
    margin-bottom: 2.5em !important; /* Match the space below tagline to space above */
}

.scroll-instruction {
    margin-top: 0 !important; /* Remove any extra top margin */
}