/* ==========================================================
   Rodrigo Tripa
   Research Entry
   Individual Research Publication Styles
========================================================== */


/* ==========================================================
   Research Entry Page
========================================================== */

.research-entry-page {

    min-height: 100vh;

}


/* ==========================================================
   Research Hero
========================================================== */

.research-entry-hero {

    position: relative;

    padding: 6rem 0 4rem;

    overflow: hidden;

}


/* Subtle editorial light */

.research-entry-hero::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at top center,
            rgba(255, 255, 255, .055),
            transparent 42%
        );

    pointer-events: none;

}


.research-entry-hero .container {

    position: relative;

    z-index: 1;

}


/* ==========================================================
   Back To Archive
========================================================== */

.research-back-link {

    display: inline-flex;

    align-items: center;

    gap: .5rem;

    margin-bottom: 3rem;

    color: var(--text-secondary);

    font-size: .85rem;

    font-weight: var(--fw-medium);

    transition:
        color var(--transition),
        transform var(--transition);

}


.research-back-link:hover {

    color: var(--text);

    transform: translateX(-3px);

}


/* ==========================================================
   Research Heading
========================================================== */

.research-entry-heading {

    max-width: 900px;

}


.research-entry-id {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    margin-bottom: 1.25rem;

    padding: .45rem .8rem;

    border: 1px solid var(--border);

    border-radius: 999px;

    background: rgba(255, 255, 255, .02);

    color: var(--text-secondary);

    font-size: .78rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .12em;

    text-transform: uppercase;

}


.research-entry-heading h1 {

    max-width: 16ch;

    margin-bottom: 1rem;

    font-size: clamp(
        3rem,
        8vw,
        6rem
    );

    line-height: .95;

    letter-spacing: -.045em;

}


.research-entry-subtitle {

    max-width: 700px;

    color: var(--text-secondary);

    font-size: clamp(
        1.05rem,
        2vw,
        1.3rem
    );

    line-height: 1.7;

}


/* ==========================================================
   Research Metadata
========================================================== */

.research-entry-meta {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap: .65rem;

    margin-top: 2rem;

}


.research-entry-meta span {

    display: inline-flex;

    align-items: center;

    min-height: 34px;

    padding: .45rem .75rem;

    border: 1px solid rgba(255, 255, 255, .10);

    border-radius: 999px;

    background: rgba(255, 255, 255, .02);

    color: var(--text-secondary);

    font-size: .78rem;

    font-weight: var(--fw-medium);

    letter-spacing: .03em;

}


.research-entry-meta .research-entry-status {

    color: var(--text);

}


/* ==========================================================
   Research Abstract
========================================================== */

.research-entry-abstract {

    max-width: 780px;

    margin-top: 2rem;

    color: var(--text-secondary);

    font-size: 1.05rem;

    line-height: 1.9;

}


/* ==========================================================
   Research Body
========================================================== */

.research-entry-body {

    padding: 0 0 7rem;

}


.research-entry-body .container {

    position: relative;

}


/* ==========================================================
   Research Layout
========================================================== */

.research-entry-layout {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        230px;

    gap: 5rem;

    align-items: start;

}


/* ==========================================================
   Research Content
========================================================== */

.research-entry-content {

    min-width: 0;

    max-width: 820px;

}


/* ==========================================================
   Research Sections
========================================================== */

.research-section {

    position: relative;

    padding: 4rem 0;

    border-top: 1px solid var(--border);

    scroll-margin-top: 6rem;

}


.research-section:first-child {

    padding-top: 0;

    border-top: 0;

}


.research-section:last-child {

    padding-bottom: 0;

}


.research-section-number {

    display: block;

    margin-bottom: 1rem;

    color: var(--text-secondary);

    font-size: .72rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .14em;

    opacity: .7;

}


.research-section h2 {

    margin-bottom: 1.5rem;

    font-size: clamp(
        1.8rem,
        4vw,
        2.5rem
    );

    line-height: 1.15;

    letter-spacing: -.025em;

}


.research-section h3 {

    margin-bottom: .65rem;

    font-size: 1.15rem;

    line-height: 1.3;

}


.research-section p {

    max-width: 760px;

    margin-bottom: 1.15rem;

    color: var(--text-secondary);

    font-size: 1rem;

    line-height: 1.9;

}


.research-section p:last-child {

    margin-bottom: 0;

}


/* ==========================================================
   Research Lead
========================================================== */

.research-lead {

    max-width: 720px !important;

    color: var(--text) !important;

    font-size: clamp(
        1.15rem,
        2.2vw,
        1.35rem
    ) !important;

    line-height: 1.8 !important;

}


/* ==========================================================
   Research Sidebar
========================================================== */

.research-entry-sidebar {

    min-width: 0;

}


.research-entry-sidebar-inner {

    position: sticky;

    top: 6rem;

    display: flex;

    flex-direction: column;

    gap: 1rem;

    padding: 1.1rem;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 14px;

    background: rgba(255, 255, 255, .02);

    backdrop-filter: blur(10px);

    -webkit-backdrop-filter: blur(10px);

}


.research-sidebar-label {

    color: var(--text-secondary);

    font-size: .72rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .12em;

    text-transform: uppercase;

}


.research-entry-sidebar nav {

    display: grid;

    gap: .35rem;

}


.research-entry-sidebar nav a {

    display: block;

    padding: .35rem .5rem;

    border-left: 1px solid transparent;

    color: var(--text-secondary);

    font-size: .82rem;

    line-height: 1.5;

    transition:
        color var(--transition),
        border-color var(--transition),
        background-color var(--transition);

}


.research-entry-sidebar nav a:hover {

    color: var(--text);

    border-left-color: var(--text);

    background: rgba(255, 255, 255, .025);

}


/* ==========================================================
   Research Progression
========================================================== */

.research-progression {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    margin-top: 2rem;

    border-top: 1px solid var(--border);

    border-left: 1px solid var(--border);

}


.research-progression-item {

    display: flex;

    flex-direction: column;

    gap: .5rem;

    min-height: 105px;

    padding: 1.1rem;

    border-right: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    background: rgba(255, 255, 255, .012);

    transition:
        background var(--transition),
        border-color var(--transition);

}


.research-progression-item:hover {

    background: rgba(255, 255, 255, .025);

}


.research-progression-item span {

    color: var(--text-secondary);

    font-size: .68rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .1em;

}


.research-progression-item strong {

    color: var(--text);

    font-size: .88rem;

    font-weight: var(--fw-semibold);

    line-height: 1.4;

}


/* ==========================================================
   Research Findings
========================================================== */

.research-findings {

    display: grid;

    border-top: 1px solid var(--border);

}


.research-finding {

    display: grid;

    grid-template-columns: 45px minmax(0, 1fr);

    gap: 1rem;

    padding: 1.6rem 0;

    border-bottom: 1px solid var(--border);

}


.research-finding-index {

    color: var(--text-secondary);

    font-size: .7rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .08em;

    padding-top: .2rem;

}


.research-finding h3 {

    margin-bottom: .5rem;

    color: var(--text);

    font-size: 1.05rem;

}


.research-finding p {

    margin: 0;

    font-size: .95rem;

    line-height: 1.8;

}


/* ==========================================================
   Research Tables
========================================================== */

.research-os-table {

    width: 100%;

    margin-top: 2rem;

    overflow-x: auto;

    border: 1px solid var(--border);

    border-radius: 12px;

}


.research-os-row {

    display: grid;

    grid-template-columns:
        1.1fr
        1fr
        1fr
        1fr;

    min-width: 620px;

}


.research-os-row > span {

    padding: .9rem 1rem;

    border-right: 1px solid var(--border);

    border-bottom: 1px solid var(--border);

    color: var(--text-secondary);

    font-size: .82rem;

    line-height: 1.5;

}


.research-os-row > span:last-child {

    border-right: 0;

}


.research-os-row:last-child > span {

    border-bottom: 0;

}


.research-os-header > span {

    color: var(--text);

    background: rgba(255, 255, 255, .025);

    font-size: .7rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .08em;

    text-transform: uppercase;

}


/* ==========================================================
   Research State / Highlight
========================================================== */

.research-state {

    display: flex;

    flex-direction: column;

    gap: .6rem;

    margin-top: 2rem;

    padding: 1.35rem 1.5rem;

    border: 1px solid var(--border);

    border-left: 2px solid rgba(255, 255, 255, .22);

    border-radius: 10px;

    background: rgba(255, 255, 255, .02);

}


.research-state span {

    color: var(--text-secondary);

    font-size: .72rem;

    font-weight: var(--fw-semibold);

    letter-spacing: .1em;

    text-transform: uppercase;

}


.research-state strong {

    overflow-x: auto;

    color: var(--text);

    font-size: .95rem;

    font-weight: var(--fw-medium);

    line-height: 1.6;

}


/* ==========================================================
   Conclusion
========================================================== */

.research-section--conclusion {

    padding-top: 5rem;

}


.research-section--conclusion h2 {

    font-size: clamp(
        2rem,
        5vw,
        3rem
    );

}


.research-section--conclusion blockquote {

    max-width: 760px;

    margin: 2rem 0 0;

    padding: 1.35rem 1.5rem;

    border-left: 3px solid rgba(255, 255, 255, .22);

    border-radius: 0 10px 10px 0;

    background: rgba(255, 255, 255, .025);

    color: var(--text);

    font-size: clamp(
        1.05rem,
        2.5vw,
        1.25rem
    );

    font-weight: var(--fw-medium);

    line-height: 1.7;

}


/* ==========================================================
   Full Research / PDF Section
========================================================== */

.research-section--paper {

    padding-top: 4rem;

}


.research-pdf-link {

    margin-top: 1.25rem;

}


/* ==========================================================
   Research Buttons
========================================================== */

.research-entry-page .btn {

    min-height: 48px;

}


.research-entry-page .btn-primary {

    background: var(--text);

    color: var(--background);

}


.research-entry-page .btn-primary:hover {

    background: #ffffff;

}


.research-entry-page .btn-secondary {

    background: transparent;

    border: 1px solid var(--border);

    color: var(--text);

}


.research-entry-page .btn-secondary:hover {

    background: var(--surface);

    border-color: #333333;

}


/* ==========================================================
   Links Inside Research Content
========================================================== */

.research-entry-content a:not(.btn) {

    color: var(--text);

    text-decoration: underline;

    text-decoration-color: rgba(255, 255, 255, .25);

    text-underline-offset: 3px;

}


.research-entry-content a:not(.btn):hover {

    text-decoration-color: var(--text);

}


/* ==========================================================
   Lists
========================================================== */

.research-entry-content ul,
.research-entry-content ol {

    max-width: 760px;

    margin: 1.25rem 0;

    padding-left: 1.4rem;

}


.research-entry-content li {

    margin-bottom: .65rem;

    color: var(--text-secondary);

    line-height: 1.8;

}


/* ==========================================================
   Blockquotes
========================================================== */

.research-entry-content blockquote {

    max-width: 760px;

    margin: 1.75rem 0;

    padding: 1.15rem 1.35rem;

    border-left: 2px solid rgba(255, 255, 255, .18);

    background: rgba(255, 255, 255, .02);

    color: var(--text-secondary);

    line-height: 1.8;

}


/* ==========================================================
   Code
========================================================== */

.research-entry-content code {

    padding: .15rem .4rem;

    border: 1px solid rgba(255, 255, 255, .06);

    border-radius: 5px;

    background: rgba(255, 255, 255, .05);

    color: var(--text);

    font-size: .88em;

}


.research-entry-content pre {

    max-width: 100%;

    margin: 1.5rem 0;

    padding: 1.15rem;

    overflow-x: auto;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: rgba(0, 0, 0, .35);

}


.research-entry-content pre code {

    padding: 0;

    border: 0;

    background: transparent;

}


/* ==========================================================
   Horizontal Rule
========================================================== */

.research-entry-content hr {

    height: 1px;

    margin: 3rem 0;

    border: 0;

    background: var(--border);

}


/* ==========================================================
   Responsive — Large Tablets
========================================================== */

@media (max-width: 1100px) {

    .research-entry-layout {

        grid-template-columns:
            minmax(0, 1fr)
            200px;

        gap: 3rem;

    }

}


/* ==========================================================
   Responsive — Tablets
========================================================== */

@media (max-width: 900px) {

    .research-entry-hero {

        padding: 5rem 0 3.5rem;

    }

    .research-entry-layout {

        grid-template-columns: 1fr;

        gap: 2rem;

    }

    .research-entry-content {

        max-width: none;

    }

    .research-entry-sidebar {

        order: -1;

    }

    .research-entry-sidebar-inner {

        position: static;

    }

    .research-entry-sidebar nav {

        display: flex;

        flex-wrap: wrap;

        gap: .35rem;

    }

    .research-entry-sidebar nav a {

        border-left: 0;

        border-bottom: 1px solid transparent;

        padding: .4rem .5rem;

    }

    .research-entry-sidebar nav a:hover {

        border-left-color: transparent;

        border-bottom-color: var(--text);

    }

    .research-progression {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


/* ==========================================================
   Responsive — Mobile
========================================================== */

@media (max-width: 768px) {

    .research-entry-hero {

        padding: 4rem 0 3rem;

    }

    .research-back-link {

        margin-bottom: 2.25rem;

    }

    .research-entry-heading h1 {

        max-width: none;

        font-size: clamp(
            2.8rem,
            12vw,
            4.5rem
        );

    }

    .research-entry-meta {

        align-items: flex-start;

    }

    .research-entry-meta span {

        font-size: .74rem;

    }

    .research-entry-abstract {

        font-size: 1rem;

        line-height: 1.8;

    }

    .research-entry-body {

        padding-bottom: 5rem;

    }

    .research-section {

        padding: 3rem 0;

    }

    .research-section--conclusion {

        padding-top: 3.5rem;

    }

    .research-progression {

        grid-template-columns: 1fr;

    }

    .research-finding {

        grid-template-columns: 35px minmax(0, 1fr);

        gap: .75rem;

    }

    .research-state {

        padding: 1.15rem;

    }

    .research-entry-page .btn {

        width: 100%;

    }

    .research-pdf-link {

        justify-content: center;

    }

}


/* ==========================================================
   Responsive — Small Phones
========================================================== */

@media (max-width: 576px) {

    .research-entry-hero {

        padding-top: 3rem;

    }

    .research-entry-heading h1 {

        font-size: clamp(
            2.5rem,
            13vw,
            3.5rem
        );

    }

    .research-entry-subtitle {

        font-size: 1rem;

    }

    .research-entry-meta {

        flex-direction: column;

        align-items: stretch;

    }

    .research-entry-meta span {

        width: 100%;

        justify-content: flex-start;

    }

    .research-entry-sidebar-inner {

        padding: .9rem;

    }

    .research-entry-sidebar nav {

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

    .research-entry-sidebar nav a {

        font-size: .78rem;

    }

    .research-section h2 {

        font-size: 1.75rem;

    }

    .research-finding {

        padding: 1.35rem 0;

    }

    .research-finding h3 {

        font-size: 1rem;

    }

    .research-finding p {

        font-size: .9rem;

    }

}


/* ==========================================================
   Reduced Motion
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .research-back-link,
    .research-progression-item,
    .research-entry-sidebar nav a {

        transition: none;

    }

}