/* GLOBAL STYLES & RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'nature1', sans-serif;
}

html {
    scroll-behavior: smooth;
    background-color: #2a4d8f; 
}

html, body {
    overscroll-behavior-y: none;
    height: 100%;
}

body {
    line-height: 1.6;
    background-color: #f7fbff; 
    color: #0e1f3b;
}
@font-face {
    font-family: 'pencil';
    src: url('pencil.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'begas';
    src: url('begas.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'designer';
    src: url('Designer.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'nature1';
    src: url('ZTNature-Medium.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'nature2';
    src: url('ZTNature-BlackItalic.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'outersans';
    src: url('outersans.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
/* Apply it to your name */
#titled {
    font-family: 'nature1';
}
/* STICKY NAVIGATION */
header {
    background: rgba(42, 77, 143, 1);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.4s ease;
}

header.scrolled {
    background: rgba(42, 77, 143, 0.7);
    backdrop-filter: blur(5px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

}
/* PRESS GRID LAYOUT */
.press-grid {
    background-color: #ffffff;
    padding: 6rem 10% !important;
}

.press-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left; /* Aligns text to the left for a professional look */
}

.press-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e3eaf5; /* Subtle line between quotes */
}

.press-item:last-child {
    border-bottom: none; /* Removes line from the last item */
}

.press-source {
    color: #2a4d8f;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.press-quote {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #334155;
    font-style: italic;
    position: relative;
    padding-left: 20px;
}

/* Adds a vertical blue accent line next to the quote */
.press-quote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background-color: #4891ad;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .press-grid {
        padding: 4rem 5% !important;
    }
    .press-source {
        font-size: 1.4rem;
    }
}
.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: #f7fbff;
}

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

.nav-links a {
        padding-left: 20px;

    text-decoration: none;
    color: #e3eaf5;
    font-weight: bold;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

/* HERO SECTION - THE SHRINKING FIX */
.hero {
    margin-top: 60px; 
    position: relative;
    display: flex;
    flex-direction: row; 
    align-items: center; /* Keeps name vertically centered */
    /* Padding-top/bottom creates the height; it will shrink as width shrinks */
    padding: 10% 0; 
    overflow: visible; 
    background: linear-gradient(0deg, rgb(45, 114, 141) 0%, rgb(72, 145, 173) 100%);
    z-index: 1;
}

.hero-text {
    flex: 1;
    padding-left: 8%; /* Gives your name some breathing room from the edge */
    position: relative;
    z-index: 3;
    color: white;
}

#titled {
    /* clamp() ensures the font stays readable on phones without breaking lines */
    font-size: clamp(2rem, 10vw, 5rem); 
    margin-bottom: 0.5rem;
}

/* STAGGERED FADE-IN */
.fade-in-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: glideUp 0.8s ease-out forwards;
    margin-right: 1.5rem;
    font-size: clamp(1rem, 3vw, 2rem);
}

@keyframes glideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-word:nth-child(1) { animation-delay: 1s; }
.fade-in-word:nth-child(2) { animation-delay: 2s; }
.fade-in-word:nth-child(3) { animation-delay: 3s; }

/* HERO IMAGE - POSITIONED TO SHRINK */
.hero-image {
    position: absolute;
    right: 0;
    /* Pinned to the edges of the hero box so it doesn't bleed */
    top: 0;
    bottom: 0;
    width: 42%; 
    height: 100%; /* Forces the image to stay exactly inside the blue box */
    object-fit: cover;
    object-position: center top; 
    z-index: 2;
}

/* MAIN CONTENT SECTIONS */
.content-section {
    padding: 1rem 2rem 3rem 2rem;
    text-align: center;
    position: relative;
    background: #f7fbff;
}
.smallheaders {
    color: #2a4d8f;
}
#work, .about, #press, .contact {
    z-index: 2;
    scroll-margin-top: 80px;
}

.content-section h2 {
    color: #2a4d8f;
    margin-bottom: 2rem;
    font-size: 2.2rem;
}
#press {
    background-color: white;
}
/* WORK CARDS */
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.card {
    background: #ffffff;
    border: 2px solid #aac6f5;
    border-radius: 8px;
    padding: 1.5rem;
    width: 250px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
}

/* FOOTER */
footer {
    background: #2a4d8f;
    color: #f0f5ff;
    text-align: center;
    padding: 2rem;
}
.hero-subtitle {
    display: flex;
    gap: 15px; /* Keeps your 3 words spaced out horizontally */
}
/* SECTION SEPARATORS */
.separator {
    height: 14px;
    background: linear-gradient(90deg, #2a4d8f, #4891ad);
    width: 60%;
    margin: .5rem auto;
    border-radius: 50px;
    opacity: 0.6;
}

/* ABOUT SPLIT SECTION */
.about-split {
    background-color: #ffffff; /* Contrast background */
    padding: 6rem 10% !important;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 15px 15px 0px #aac6f5; /* Artistic offset border */
}

.about-text {
    flex: 1.2;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #334155;
}

/* Adjustments for Mobile */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-image {
        width: 80%;
        margin: 0 auto;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-text h2 {
        text-align: center;
    }
    
    .separator {
        width: 40%;
    }
}

/* SMALL DEVICE ADJUSTMENTS - FORCING SIDE-BY-SIDE */
@media (max-width: 768px) {
    .hero {
        padding: 8% 0; /* Slightly more vertical padding on small screens */
    }
    .hero-text {
        padding-left: 5%;
    }
    .hero-image {
        width: 28%; /* Shrinks photo slightly to give text room */
        bottom: -40px; /* Reduces bleed so it doesn't cover content */
        top: -2px;
    }
}
/* CONTAINER SETUP */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 2rem 0 4rem 0; /* Space between the line and Featured Works */
    height: 60px; /* Gives the balls room to bounce up */
    margin-bottom: 0px;
    padding-bottom: 0px;
}
/* THE BALLS *//* THE BALLS */
.loader-ball {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    /* 6s total: Hops happen at the start, followed by a long pause */
    animation: kahootBounce 6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* THE STAGGERED TIMING (2 seconds apart) */
.ball-1 { background: #45728a; animation-delay: 0s; }
.ball-2 { background: #4891ad; animation-delay: 2s; }
.ball-3 { background: #2d728d; animation-delay: 4s; }

/* THE DOUBLE-BOUNCE ANIMATION */
@keyframes kahootBounce {
    0% { transform: translateY(0); }
    
    /* First Big Hop (High and slower) */
    5% { transform: translateY(-30px); }
    10% { transform: translateY(0); }
    
    /* Second Small Hop (Short and fast) */
    13% { transform: translateY(-10px); }
    16% { transform: translateY(0); }
    
    /* Remaining time: Staying still for the 2-second gap effect */
    100% { transform: translateY(0); }
}
/* Responsive tweaks specifically for phone sizes */
@media (max-width: 600px) {

    .fade-in-word {
        font-size: 0.9rem; /* Shrinks 'Writer', 'Storyteller', etc. */
    }
    .logo {
        font-size: smaller;
    }
    .nav-links {
        padding: 0px;
    }
}
/* LAPTOP & DESKTOP ONLY STYLES */
@media (min-width: 1025px) {
    .hero {
        height: 5ovh; /* Make the blue section taller on laptops */
        max-height: 890px;
    }
    .hero-image {
        width: 35%;         /* Make the face and photo much larger */
        object-fit: cover;  /* Crops the shirt/edges instead of stretching */
        z-index: 0;         /* Ensures it stays behind the text and header */
    }

    .hero-text {
        padding-left: 12%;  /* Shift text slightly more for the larger photo */
    }
}<div class="hero-text">
    <h1 id="titled"><span class="name-wrap">Keri Griggs</span></h1>
    <p class="hero-subtitle">
        <span class="fade-in-word">Writer</span>
        <span class="fade-in-word">Storyteller</span>
        <span class="fade-in-word">Actor</span>
    </p>
</div>
