:root {
    color-scheme: light;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
}

::selection {
    background: #f25f4b;
    color: #ffffff;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 9999;
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    box-shadow: 0 15px 40px rgba(18, 24, 38, 0.18);
}

.brand-symbol {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border-radius: 0.9rem;
    background: #121826;
    color: #ffffff;
    font-family: "Manrope", sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 12px 25px rgba(18, 24, 38, 0.18);
}

.brand-symbol-light {
    background: #ffffff;
    color: #121826;
}

.nav-link {
    color: #475569;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #f25f4b;
}

.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #46b69d;
}

.hero-section {
    position: relative;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(70, 182, 157, 0.18),
            transparent 27rem
        ),
        radial-gradient(
            circle at 15% 80%,
            rgba(242, 95, 75, 0.12),
            transparent 24rem
        ),
        #f5f7fb;
}

.hero-section::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(
            rgba(18, 24, 38, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(18, 24, 38, 0.035) 1px,
            transparent 1px
        );

    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, black, transparent);
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-visual::before {
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    width: 8rem;
    height: 8rem;
    border-radius: 2rem;
    background: #f25f4b;
    content: "";
    transform: rotate(9deg);
}

.hero-visual::after {
    position: absolute;
    bottom: -1.8rem;
    left: -1.8rem;
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    border: 1.4rem solid #46b69d;
    content: "";
}

.research-window {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 35px 80px rgba(18, 24, 38, 0.18);
    backdrop-filter: blur(18px);
}

.research-window-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

.research-window-top div span {
    display: block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
}

.research-window-top div span:nth-child(1) {
    background: #f25f4b;
}

.research-window-top div span:nth-child(2) {
    background: #f5b942;
}

.research-window-top div span:nth-child(3) {
    background: #46b69d;
}

.section-label {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f25f4b;
}

.section-title {
    margin-top: 0.75rem;
    font-family: "Manrope", sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-description {
    margin-top: 1.25rem;
    color: #64748b;
    font-size: 1.05rem;
    line-height: 1.8;
}

.form-label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}

.form-control {
    width: 100%;
    min-height: 3.25rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.85rem;
    background: #ffffff;
    padding: 0.75rem 0.95rem;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #f25f4b;
    box-shadow: 0 0 0 4px rgba(242, 95, 75, 0.11);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: #f25f4b;
    box-shadow: 0 0 0 4px rgba(242, 95, 75, 0.11);
}

.search-input-wrapper > span {
    padding-left: 1.25rem;
    color: #94a3b8;
    font-size: 1.6rem;
}

.search-input {
    width: 100%;
    min-height: 4rem;
    border: 0;
    padding: 0.9rem 1.25rem;
    outline: 0;
}

.category-card {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #ffffff;
    padding: 1.6rem;
    box-shadow: 0 10px 35px rgba(18, 24, 38, 0.04);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(242, 95, 75, 0.45);
    box-shadow: 0 22px 45px rgba(18, 24, 38, 0.09);
}

.category-icon {
    display: grid;
    width: 3.2rem;
    height: 3.2rem;
    place-items: center;
    border-radius: 1rem;
    background: rgba(70, 182, 157, 0.14);
    color: #167863;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
}

.feature-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.feature-line span {
    color: #46b69d;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
}

.feature-line p {
    color: #cbd5e1;
    font-weight: 600;
}

.code-output {
    min-height: 8rem;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border-radius: 1rem;
    background: #121826;
    padding: 1.25rem;
    color: #dbeafe;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    line-height: 1.8;
}

.process-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #ffffff;
    padding: 2rem;
}

.process-number {
    font-family: "Manrope", sans-serif;
    color: rgba(242, 95, 75, 0.24);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.process-card h3 {
    margin-top: 1.7rem;
    font-family: "Manrope", sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
}

.process-card p {
    margin-top: 0.8rem;
    color: #64748b;
    line-height: 1.75;
}

.paper-card {
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    background: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 10px 35px rgba(18, 24, 38, 0.04);
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.paper-card:hover {
    transform: translateY(-3px);
    border-color: rgba(242, 95, 75, 0.35);
    box-shadow: 0 18px 45px rgba(18, 24, 38, 0.08);
}

.paper-category {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(70, 182, 157, 0.12);
    padding: 0.35rem 0.7rem;
    color: #167863;
    font-size: 0.72rem;
    font-weight: 800;
}

.paper-title {
    margin-top: 1rem;
    font-family: "Manrope", sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.45;
}

.paper-summary {
    margin-top: 1rem;
    color: #64748b;
    line-height: 1.75;
}

.paper-meta {
    margin-top: 0.65rem;
    color: #64748b;
    font-size: 0.87rem;
}

.paper-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.65rem 1rem;
    font-size: 0.84rem;
    font-weight: 800;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.paper-action-primary {
    background: #121826;
    color: #ffffff;
}

.paper-action-primary:hover {
    background: #f25f4b;
}

.paper-action-secondary {
    border: 1px solid #cbd5e1;
    background: #ffffff;
}

.paper-action-secondary:hover {
    border-color: #f25f4b;
    color: #f25f4b;
}

.pagination-button {
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 800;
    transition:
        border-color 0.2s ease,
        color 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
    border-color: #f25f4b;
    color: #f25f4b;
}

.pagination-button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.skeleton {
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            #f1f5f9 25%,
            #e2e8f0 50%,
            #f1f5f9 75%
        );

    background-size: 200% 100%;
    animation: skeletonLoading 1.4s infinite;
}

@keyframes skeletonLoading {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(242, 95, 75, 0.3);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}