:root {
    --font-family-heading: 'Fredoka', cursive;
    --font-family-body: 'Nunito', sans-serif;
    --font-family-handwritten: 'Gloria Hallelujah', cursive;
    --bg-cream: #FFFDF5;
    --card-white: #FFFFFF;
    --text-dark: #2C2C2C;
    --text-subtle: #4A4A4A;
    --primary-teal: #006D77;
    --primary-teal-dark: #005057;
    --primary-teal-shadow: #004d55;
    --secondary-coral: #D64933;
    --accent-yellow: #FFD166;
    --accent-yellow-translucent: rgba(255, 209, 102, 0.6);
    --soft-purple: #E6E6FA;
    --radius-bubble: 50px;
    --radius-card: 20px;
    --radius-small: 8px;
    --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-button: 0 4px 0 #004d55;
    --shadow-button-hover: 0 6px 0 #004d55;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 400;
    src: local(''),
    url('/fonts/fredoka-v17-latin-regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 600;
    src: local(''),
    url('/fonts/fredoka-v17-latin-600.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400;
    src: local(''),
    url('/fonts/nunito-v32-latin-regular.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 700;
    src: local(''),
    url('/fonts/nunito-v32-latin-700.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Gloria Hallelujah';
    font-style: normal;
    font-weight: 400;
    src: local(''),
    url('/fonts/gloria-hallelujah-v24-latin-regular.woff2') format('woff2');
    font-display: swap;
}

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

body {
    font-family: var(--font-family-body);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-family-heading);
    color: var(--primary-teal);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary-teal);
    font-weight: 700;
}

a:focus-visible {
    outline: 4px solid var(--secondary-coral);
    outline-offset: 4px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--primary-teal);
    color: white;
    padding: 10px 15px;
    z-index: 100;
    transition: top var(--transition-normal);
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 var(--radius-small) 0;
}

.skip-link:focus {
    top: 0;
}

.hero {
    text-align: center;
    padding: 5rem 1rem 3rem 1rem;
    background: radial-gradient(circle at top, #fff5d6 0%, var(--bg-cream) 70%);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-coral);
    text-shadow: 2px 2px 0px var(--accent-yellow);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-subtle);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-teal);
    color: white;
    text-decoration: none;
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-bubble);
    box-shadow: var(--shadow-button);
    transition: transform 0.1s, box-shadow 0.1s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
    background-color: #007a85;
}

.cta-button:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 var(--primary-teal-shadow);
}

.cta-button:focus-visible {
    outline: 4px solid var(--secondary-coral);
    outline-offset: 4px;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-wrapper {
    column-count: 3;
    column-gap: 2rem;
}

.pet-card {
    background: var(--card-white);
    border-radius: var(--radius-card);
    margin-bottom: 2rem;
    break-inside: avoid;
    box-shadow: var(--shadow-card);
    border: 2px solid transparent;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
    overflow: hidden;
    position: relative;
}

.pet-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-yellow);
}

.pet-card::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 80px;
    height: 30px;
    background-color: var(--accent-yellow-translucent);
    z-index: 2;
}

.pet-photo {
    width: 100%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.h-tall {
    height: 350px;
    background: #ffdede;
}

.h-med {
    height: 250px;
    background: #e0f7fa;
}

.h-short {
    height: 200px;
    background: #f3e5f5;
}

.card-content {
    padding: 1.5rem;
}

.pet-name {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.pet-title {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--text-dark);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.pet-bio {
    font-size: 1rem;
    color: var(--text-subtle);
}

.species-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-header {
    background-color: var(--card-white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--accent-yellow);
}

.logo {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
}

.back-btn {
    background: var(--soft-purple);
    color: var(--text-dark);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-bubble);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}

.back-btn:hover {
    background: #dcdcfc;
}

header nav {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    background-color: var(--primary-teal);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-family-heading);
    font-size: 1.1rem;
    border-radius: var(--radius-bubble);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: translateY(-3px);
    background-color: var(--primary-teal-dark);
}

.nav-btn:focus-visible {
    outline: 4px solid var(--secondary-coral);
    outline-offset: 4px;
}

.tagline {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-subtle);
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-yellow);
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 0;
}

.timeline-block {
    position: relative;
    margin-bottom: 3rem;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.timeline-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-coral);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timeline-card {
    background: var(--card-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 600px;
    border: 2px solid #F0F0F0;
    margin-top: 4rem;
}

.category-tag {
    display: inline-block;
    background: var(--soft-purple);
    color: var(--text-dark);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pet-names {
    font-weight: 700;
    color: var(--secondary-coral);
    margin-bottom: 0.5rem;
    display: block;
}

.snack-rating {
    background-color: #FAFAFA;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    border: 2px dashed var(--accent-yellow);
}

.rating-bar-container {
    background-color: #E0E0E0;
    border-radius: 10px;
    height: 20px;
    width: 100%;
    margin-top: 0.5rem;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background-color: var(--primary-teal);
    border-radius: 10px;
}

.article-container {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-meta {
    display: inline-block;
    background: var(--accent-yellow);
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.post-title {
    font-size: 3rem;
    color: var(--secondary-coral);
    margin-bottom: 1rem;
}

.post-subtitle {
    font-size: 1.2rem;
    color: var(--text-subtle);
}

.featured-image-wrapper {
    position: relative;
    margin: 2rem 0 4rem 0;
    transform: rotate(-2deg);
}

.featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background-color: #ddd;
    border: 10px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.tape {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 35px;
    background-color: rgba(255, 209, 102, 0.7);
    z-index: 2;
}

.post-content {
    background: var(--card-white);
    padding: 3rem;
    border-radius: var(--radius-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    font-size: 1.125rem;
    line-height: 1.8;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.drop-cap {
    font-size: 3rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.5rem;
    font-family: var(--font-family-heading);
    color: var(--primary-teal);
}

.post-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.chaos-meter-box {
    background: #FAFAFA;
    border: 2px dashed var(--primary-teal);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.meter-label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.meter-bar {
    height: 25px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-yellow), var(--secondary-coral));
}

blockquote {
    background: var(--soft-purple);
    padding: 1.5rem;
    border-radius: 0 20px 20px 20px;
    margin: 2rem 0;
    position: relative;
    font-family: var(--font-family-handwritten);
    font-size: 1.2rem;
    color: var(--text-dark);
}

blockquote::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    width: 0;
    height: 0;
    border-top: 20px solid var(--soft-purple);
    border-left: 20px solid transparent;
}

blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--font-family-heading);
    font-size: 0.9rem;
    text-align: right;
    color: var(--primary-teal);
    font-style: normal;
}

.author-box {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--secondary-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.author-subtitle {
    font-size: 0.9rem;
    color: var(--text-subtle);
}

.comments-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.comment-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-card);
    margin-bottom: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: var(--radius-small);
    font-family: var(--font-family-body);
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.2);
}

.btn-submit {
    background-color: var(--primary-teal);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-family: var(--font-family-heading);
    font-size: 1.1rem;
    border-radius: var(--radius-bubble);
    cursor: pointer;
}

.btn-submit:hover {
    background-color: var(--primary-teal-dark);
}

.comment {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-card);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.comment-avatar {
    min-width: 50px;
    height: 50px;
    background: var(--accent-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-subtle);
    font-size: 0.9rem;
}

footer.footer-dark {
    background-color: var(--primary-teal);
    color: white;
    margin-top: 4rem;
}

footer.footer-dark p {
    font-weight: 600;
}

@media (max-width: 900px) {
    .masonry-wrapper {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .timeline-card {
        width: 45%;
        margin-top: 0;
    }

    .timeline-block:nth-child(odd) {
        justify-content: flex-start;
    }

    .timeline-block:nth-child(even) {
        justify-content: flex-end;
    }

    .timeline-card::before {
        content: '';
        position: absolute;
        top: 30px;
        width: 0;
        height: 0;
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
    }

    .timeline-block:nth-child(odd) .timeline-card::before {
        right: -10px;
        border-left: 10px solid var(--card-white);
    }

    .timeline-block:nth-child(even) .timeline-card::before {
        left: -10px;
        border-right: 10px solid var(--card-white);
    }
}

@media (max-width: 600px) {
    .masonry-wrapper {
        column-count: 1;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-content {
        padding: 1.5rem;
    }

    .featured-image {
        height: 250px;
    }

    .timeline-card {
        width: 100%;
        margin-top: 4rem;
    }

    .timeline-block:nth-child(odd),
    .timeline-block:nth-child(even) {
        justify-content: center;
    }

    .timeline-card::before {
        display: none;
    }
}
