/* Base Reset & Variables */
:root {
    --clr-bg: #ffffff;
    --clr-bg-light: #f8f9fa;
    --clr-text: #2d3436;
    --clr-text-muted: #636e72;
    --clr-accent: #e987ad;
    --clr-accent-light: rgba(74, 111, 100, 0.1);
    --clr-border: #dfe6e9;
    --clr-card-bg: #ffffff;
    --clr-nav-bg: rgba(255, 255, 255, 0.85);
    --clr-glass-bg: rgba(255, 255, 255, 0.65);
    --clr-glass-border: rgba(255, 255, 255, 0.8);
    --clr-modal-overlay: rgba(0, 0, 0, 0.5);
    --clr-footer-bg: #2d3436;
    --clr-footer-text: #ffffff;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
    --radius: 8px;
}

[data-theme="dark"] {
    --clr-bg: #121212;
    --clr-bg-light: #1e1e1e;
    --clr-text: #f5f5f5;
    --clr-text-muted: #a0aec0;
    --clr-accent: #e987ad;
    --clr-accent-shape: rgba(233, 135, 173, 0.15);
    --clr-accent-light: rgba(167, 38, 92, 0.15);
    --clr-border: #2d3748;
    --clr-card-bg: #1a202c;
    --clr-nav-bg: rgba(18, 18, 18, 0.85);
    --clr-glass-bg: rgba(30, 30, 30, 0.65);
    --clr-glass-border: rgba(255, 255, 255, 0.05);
    --clr-modal-overlay: rgba(0, 0, 0, 0.8);
    --clr-footer-bg: #0a0a0a;
    --clr-footer-text: #f5f5f5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Typography */
h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    color: var(--clr-text);
    font-weight: 700;
    transition: color 0.3s;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 8rem 0;
}

.bg-light {
    background-color: var(--clr-bg-light);
    transition: background-color 0.3s;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--clr-nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--clr-border);
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--clr-accent);
    transition: color 0.3s;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--clr-text-muted);
    transition: color var(--transition-fast);
    font-family: var(--font-heading);
}

.nav-links a:hover {
    color: var(--clr-accent);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--clr-text);
}

.theme-toggle {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--clr-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--clr-accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--clr-accent);
    color: var(--clr-bg);
    box-shadow: 0 4px 15px var(--clr-accent-light);
    border: 1px solid var(--clr-accent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--clr-accent-light);
    filter: brightness(1.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--clr-text);
    border: 1px solid var(--clr-border);
    transition: border-color 0.3s, color 0.3s;
}

.btn-secondary:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
    transform: translateY(-2px);
}

/* Hero Section Refactoring */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14vw;
    font-family: var(--font-heading);
    font-weight: 900;
    z-index: -2;
    white-space: nowrap;
    opacity: 0.10;
    letter-spacing: -2px;
    transition: color 0.3s;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: -1;
    animation: drift 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--clr-accent-shape);
    top: -100px;
    right: -100px;
    transition: background 0.3s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(0, 0, 0, 0.03);
    bottom: -50px;
    left: -100px;
    transition: background 0.3s;
}

[data-theme="dark"] .shape-2 {
    background: rgba(255, 255, 255, 0.02);
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background-color: var(--clr-bg-light);
    color: var(--clr-text-muted);
    font-size: 0.85rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--clr-border);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.hero-title span {
    color: var(--clr-accent);
    transition: color 0.3s;
}

.intro {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.8;
    transition: color 0.3s;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Visual Hero Side (Glass Cards) */
.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    align-items: flex-end;
}

.glass-card {
    background: var(--clr-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--clr-glass-border);
    padding: 1.25rem 2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    animation: float 6s ease-in-out infinite;
    min-width: 280px;
    transition: transform var(--transition-fast), background 0.3s, border-color 0.3s;
}

.glass-card:hover {
    transform: scale(1.03) !important;
    z-index: 10;
    cursor: pointer;
}

.card-top {
    transform: translateX(-40px);
}

.card-middle {
    transform: translateX(20px);
    animation-delay: 1s;
}

.card-bottom {
    transform: translateX(-20px);
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateX(var(--tx, 0)) translateY(0);
    }

    50% {
        transform: translateX(var(--tx, 0)) translateY(-15px);
    }
}

.card-top {
    --tx: -40px;
}

.card-middle {
    --tx: 20px;
}

.card-bottom {
    --tx: -20px;
}

.glass-icon {
    width: 50px;
    height: 50px;
    background: var(--clr-bg);
    color: var(--clr-accent);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.glass-title {
    font-weight: 700;
    color: var(--clr-text);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.glass-subtitle {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    font-weight: 500;
    font-family: var(--font-body);
    transition: color 0.3s;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-inline: auto;
}

.section-header p {
    color: var(--clr-text-muted);
    font-size: 1.125rem;
    transition: color 0.3s;
}

/* Portfolio Section */
.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    flex: 0 1 340px;
    max-width: 100%;
    background: var(--clr-card-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), background 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
    border-color: var(--clr-accent);
}

.project-header {
    margin-bottom: 1.5rem;
}

.project-type {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: var(--clr-bg-light);
    color: var(--clr-text-muted);
    font-size: 0.8rem;
    border-radius: 50px;
    margin-bottom: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    border: 1px solid var(--clr-border);
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.language-pair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--clr-accent);
    margin-top: 0.75rem;
    transition: color 0.3s;
}

.lang {
    font-family: monospace;
    font-size: 1rem;
    background: var(--clr-accent-light);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: var(--clr-text);
    transition: color 0.3s, background 0.3s;
}

.project-preview {
    color: var(--clr-text-muted);
    flex-grow: 1;
    margin-bottom: 2rem;
    line-height: 1.7;
    transition: color 0.3s;
}

.project-footer {
    border-top: 1px solid var(--clr-border);
    padding-top: 1.5rem;
    transition: border-color 0.3s;
}

.btn-detalhes {
    background: none;
    border: none;
    color: var(--clr-text);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition-fast);
}

.btn-detalhes:hover {
    color: var(--clr-accent);
}

template.modal-payload {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--clr-modal-overlay);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--clr-bg);
    width: 98%;
    max-width: 1400px;
    max-height: 95vh;
    border-radius: 16px;
    padding: 4rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--clr-bg-light);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--clr-text);
    transition: all 0.2s;
    z-index: 10;
}

.close-modal:hover {
    background: var(--clr-text);
    color: var(--clr-bg);
    transform: rotate(90deg);
}

#modal-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

#modal-body .modal-badge {
    align-self: flex-start;
    padding: 0.4rem 1.2rem;
    background-color: var(--clr-accent-light);
    color: var(--clr-accent);
    font-size: 0.85rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s, background 0.3s;
    flex-shrink: 0;
}

#modal-body .modal-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    font-family: var(--font-heading);
    color: var(--clr-text);
    line-height: 1.2;
    transition: color 0.3s;
    flex-shrink: 0;
}

.mobile-tabs {
    display: none;
}

#modal-body .excerpt-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
    overflow-y: auto;
    padding-right: 1.5rem;
    padding-bottom: 1rem;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--clr-border) transparent;
}

#modal-body .excerpt-comparison::-webkit-scrollbar {
    width: 6px;
}

#modal-body .excerpt-comparison::-webkit-scrollbar-track {
    background: transparent;
}

#modal-body .excerpt-comparison::-webkit-scrollbar-thumb {
    background-color: var(--clr-border);
    border-radius: 10px;
}

#modal-body .excerpt {
    padding-left: 1.5rem;
    border-left: 2px solid var(--clr-border);
    transition: border-color 0.3s;
}

#modal-body .excerpt h4 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-text-muted);
    margin-bottom: 1rem;
    transition: color 0.3s;
    position: sticky;
    top: 0;
    background-color: var(--clr-bg);
    padding-bottom: 10px;
    z-index: 5;
    margin-top: 0;
}

#modal-body .excerpt p {
    font-size: 1.05rem;
    color: var(--clr-text);
    line-height: 1.7;
    opacity: 0.9;
    transition: color 0.3s;
}

#modal-body .excerpt .indent {
    display: inline-block;
    width: 2.5rem;
}

#modal-body .reflection {
    background: var(--clr-bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--clr-accent);
    transition: background 0.3s;
    flex-shrink: 0;
}

#modal-body .reflection h4 {
    font-size: 1.25rem;
    color: var(--clr-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    transition: color 0.3s;
}

#modal-body .reflection p {
    color: var(--clr-text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
    transition: color 0.3s;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: color 0.3s;
}

.skill-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--clr-text);
    transition: color 0.3s;
}

.skill-name i {
    color: var(--clr-accent);
    font-size: 1.25rem;
    transition: color 0.3s;
}

.skill-bar {
    height: 6px;
    background-color: var(--clr-border);
    border-radius: 4px;
    overflow: hidden;
    transition: background 0.3s;
}

.skill-progress {
    height: 100%;
    background-color: var(--clr-accent);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.tool-card {
    background: var(--clr-card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--clr-border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), background 0.3s, border-color 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--clr-accent);
}

.tool-card i {
    font-size: 2.5rem;
    color: var(--clr-accent);
    margin-bottom: 1.25rem;
    transition: color 0.3s;
}

.tool-card p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
    line-height: 1.6;
    transition: color 0.3s;
}

/* Footer & Contact */
.footer {
    background-color: var(--clr-footer-bg);
    color: var(--clr-footer-text);
    padding: 6rem 0 2rem;
    text-align: center;
    transition: background 0.3s, color 0.3s;
}

.footer h2 {
    color: var(--clr-footer-text);
    transition: color 0.3s;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.contact-link:hover {
    background-color: var(--clr-accent);
    transform: translateY(-3px);
    color: var(--clr-bg);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    padding-top: 2rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero {
        padding-top: 120px;
    }

    .intro {
        margin: 0 auto 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-bg-text {
        display: none;
    }

    .hero-visual {
        align-items: center;
    }

    .glass-card {
        transform: none !important;
        animation: none !important;
        width: 100%;
        max-width: 400px;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    h1 {
        font-size: 2.5rem;
    }

    .contact-methods {
        flex-direction: column;
        gap: 1rem;
    }

    /* Modal Mobile Optimizations */
    .modal-content {
        padding: 4.5rem 1.25rem 1.25rem 1.25rem;
        width: 95%;
        max-height: 95vh;
    }

    .close-modal {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    #modal-body .modal-title {
        font-size: 1.7rem;
        margin-bottom: 1.5rem;
    }

    #modal-body .modal-badge {
        margin-bottom: 1rem;
    }

    #modal-body {
        display: block;
        overflow-y: auto;
        padding-right: 0.5rem;
        /* space for scrollbar */
    }

    #modal-body::-webkit-scrollbar {
        width: 4px;
    }

    #modal-body::-webkit-scrollbar-thumb {
        background-color: var(--clr-border);
        border-radius: 10px;
    }

    /* Modal Mobile Tabs System */
    .mobile-tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        background: var(--clr-bg-light);
        padding: 0.5rem;
        border-radius: 12px;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .tab-btn {
        flex: 1;
        padding: 0.75rem;
        border: none;
        background: transparent;
        color: var(--clr-text-muted);
        font-family: var(--font-heading);
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .tab-btn.active {
        background: var(--clr-bg);
        color: var(--clr-accent);
        box-shadow: var(--shadow-sm);
    }

    #modal-body .excerpt-comparison {
        display: block;
        /* Override grid */
        gap: 0;
        padding-right: 0;
        overflow-y: visible;
        /* Scroll is handled by modal-body now */
    }

    #modal-body .excerpt-comparison .excerpt {
        padding-left: 0;
        border-left: none;
    }

    /* Tab visibility toggles */
    #modal-body .excerpt-comparison .target {
        display: none;
    }

    #modal-body .excerpt-comparison.show-target .source {
        display: none;
    }

    #modal-body .excerpt-comparison.show-target .target {
        display: block;
        animation: fadeIn 0.3s ease-out;
    }

    #modal-body .excerpt-comparison:not(.show-target) .source {
        animation: fadeIn 0.3s ease-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

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

    #modal-body .reflection {
        padding: 1.25rem;
        border-radius: 8px;
        margin-top: 1rem;
    }

    #modal-body .reflection h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    #modal-body .reflection p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 4.5rem 1rem 1rem 1rem;
    }
    
    .close-modal {
        top: 0.75rem;
        right: 0.75rem;
    }

    #modal-body .modal-title {
        font-size: 1.4rem;
    }

    #modal-body .modal-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    #modal-body .excerpt-comparison {
        gap: 1.5rem;
    }

    #modal-body .excerpt h4 {
        font-size: 0.8rem;
    }

    #modal-body .reflection {
        padding: 1rem;
    }

    #modal-body .reflection h4 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }

    #modal-body .reflection p {
        font-size: 0.9rem;
    }
}