/* =========================================================
   ADA LOVELACE — THE POETRY OF COMPUTATION
   Marsharine A. Simpson
   ========================================================= */

:root {
    --ink: #171717;
    --ink-soft: #2d2d2d;
    --paper: #f4efe6;
    --paper-deep: #e7ded0;
    --cream: #fbf8f2;
    --white: #ffffff;

    --plum: #5c3049;
    --plum-dark: #3f2032;
    --rose: #a76f87;
    --gold: #b28a4f;
    --gold-soft: #d7bd92;

    --muted: #716b65;
    --line: rgba(23, 23, 23, 0.13);

    --shadow-sm: 0 12px 34px rgba(23, 23, 23, 0.07);
    --shadow-md: 0 28px 70px rgba(23, 23, 23, 0.12);

    --radius-sm: 14px;
    --radius-md: 24px;
    --radius-lg: 36px;

    --max-width: 1200px;
}


/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    color: var(--ink);
    background: var(--paper);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1.65;
}

img {
    display: block;

    max-width: 100%;
}

button,
a {
    font: inherit;

    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}


/* ACCESSIBILITY */

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;

    padding: 10px 14px;

    border-radius: 8px;

    color: var(--white);
    background: var(--plum-dark);

    font-weight: 800;
    text-decoration: none;

    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(178, 138, 79, 0.55);
    outline-offset: 4px;
}


/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    border-bottom: 1px solid var(--line);

    background: rgba(244, 239, 230, 0.91);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-container {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 28px;

    width: min(100% - 40px, var(--max-width));
    min-height: 78px;
    margin: 0 auto;
}

.brand {
    color: var(--ink);

    font-size: 1rem;
    font-weight: 900;

    letter-spacing: 0.12em;
    text-decoration: none;
}

.brand span {
    color: var(--plum);
}

.main-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 28px;
}

.main-navigation a,
.footer-links a {
    color: var(--muted);

    font-size: 0.84rem;
    font-weight: 750;

    text-decoration: none;
}

.main-navigation a:hover,
.footer-links a:hover {
    color: var(--plum);
}

.menu-button {
    display: none;

    width: 42px;
    height: 42px;

    padding: 9px;

    border: 1px solid var(--line);
    border-radius: 50%;

    background: transparent;
}

.menu-button span {
    display: block;

    width: 100%;
    height: 2px;
    margin: 4px 0;

    background: var(--ink);

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}


/* COMMON TYPOGRAPHY */

.eyebrow {
    margin: 0 0 13px;

    color: var(--plum);

    font-size: 0.73rem;
    font-weight: 900;

    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-number {
    color: var(--gold);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(4rem, 8vw, 7.5rem);
    font-weight: 500;

    line-height: 0.85;

    opacity: 0.5;
}

.story-heading h2,
.section-heading h2,
.notes-introduction h2,
.legacy-section h2,
.development-section h2,
.sources-section h2,
.closing-section h2 {
    margin: 0;

    color: var(--ink);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2.6rem, 5vw, 5rem);
    font-weight: 500;

    letter-spacing: -0.045em;
    line-height: 0.98;
}

.story-heading h2 span,
.section-heading h2 span,
.notes-introduction h2 span,
.legacy-section h2 span,
.development-section h2 span,
.closing-section h2 span {
    color: var(--plum);
}


/* HERO */

.hero {
    display: grid;
    grid-template-columns: 1fr 0.82fr;
    align-items: center;
    gap: clamp(45px, 8vw, 100px);

    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 90px 0 115px;
}

.hero-copy h1 {
    margin: 0;

    color: var(--ink);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(4.4rem, 8vw, 8rem);
    font-weight: 500;

    letter-spacing: -0.06em;
    line-height: 0.83;
}

.hero-copy h1 span {
    display: block;

    max-width: 650px;
    margin-top: 14px;

    color: var(--plum);

    font-size: 0.43em;
    line-height: 1.05;
}

.hero-introduction {
    max-width: 660px;
    margin: 30px 0 0;

    color: var(--muted);

    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 30px;
}

.primary-link,
.secondary-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    min-height: 48px;
    padding: 12px 22px;

    border-radius: 999px;

    font-weight: 800;
    text-decoration: none;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        color 0.18s ease;
}

.primary-link {
    border: 1px solid var(--plum-dark);

    color: var(--white);
    background: var(--plum-dark);
}

.primary-link:hover {
    transform: translateY(-2px);

    background: var(--gold);
}

.secondary-link {
    border: 1px solid var(--line);

    color: var(--ink);
    background: rgba(255, 255, 255, 0.36);
}

.secondary-link:hover {
    transform: translateY(-2px);

    border-color: var(--plum);

    color: var(--plum);
}


/* HERO PORTRAIT */

.hero-visual {
    display: flex;
    justify-content: flex-end;
}

.portrait-frame {
    position: relative;

    width: min(100%, 470px);
    overflow: hidden;

    border-radius: 220px 220px var(--radius-lg) var(--radius-lg);

    background: var(--paper-deep);

    box-shadow: var(--shadow-md);
}

.portrait-frame img {
    width: 100%;
    height: 610px;

    object-fit: cover;
    object-position: center top;

    filter:
        sepia(0.08)
        contrast(1.02);
}

.portrait-frame::after {
    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            transparent 55%,
            rgba(20, 12, 17, 0.72)
        );

    content: "";
}

.portrait-label {
    position: absolute;
    right: 26px;
    bottom: 26px;
    left: 26px;
    z-index: 2;

    color: var(--white);
}

.portrait-label span {
    display: block;

    margin-bottom: 4px;

    color: var(--gold-soft);

    font-size: 0.72rem;
    font-weight: 900;

    letter-spacing: 0.13em;
}

.portrait-label strong {
    display: block;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.15rem;
    font-weight: 500;
}


/* STORY */

.story-section {
    display: grid;
    grid-template-columns: 120px 0.85fr 1.15fr;
    gap: clamp(25px, 5vw, 65px);

    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 110px 0;
}

.story-copy {
    padding-top: 35px;
}

.story-copy p {
    margin: 0 0 18px;

    color: var(--muted);
}

.story-copy .lead {
    color: var(--ink);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.4rem;
    line-height: 1.45;
}


/* IDEAS */

.ideas-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;

    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 0 0 115px;
}

.idea-card {
    min-height: 300px;
    padding: 28px;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    background: rgba(255, 255, 255, 0.36);

    box-shadow: var(--shadow-sm);
}

.idea-card.featured {
    color: var(--white);
    background: var(--plum-dark);
}

.idea-card > span {
    display: block;

    margin-bottom: 70px;

    color: var(--gold);

    font-size: 0.75rem;
    font-weight: 900;

    letter-spacing: 0.12em;
}

.idea-card h3 {
    margin: 0 0 10px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.6rem;
    font-weight: 500;
}

.idea-card p {
    margin: 0;

    color: var(--muted);

    font-size: 0.92rem;
}

.idea-card.featured p {
    color: #e4d8df;
}


/* TIMELINE */

.timeline-section {
    padding: 110px max(20px, calc((100vw - var(--max-width)) / 2));

    color: var(--white);
    background: var(--ink);
}

.timeline-section .eyebrow {
    color: var(--gold-soft);
}

.timeline-section .section-heading h2 {
    color: var(--white);
}

.timeline-section .section-heading h2 span {
    color: var(--gold-soft);
}

.timeline-section .section-heading > p:last-child {
    max-width: 620px;
    margin-top: 20px;

    color: #c8c2bd;
}

.timeline-interface {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 50px;

    margin-top: 55px;
}

.timeline-buttons {
    display: grid;
}

.timeline-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    padding: 20px 0;

    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);

    color: #a9a39f;
    background: transparent;

    text-align: left;

    font-size: 0.88rem;
    font-weight: 750;
}

.timeline-button span {
    color: inherit;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.8rem;
}

.timeline-button:hover,
.timeline-button.active {
    color: var(--gold-soft);
}

.timeline-display {
    min-height: 340px;
    padding: clamp(30px, 5vw, 55px);

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(92, 48, 73, 0.95),
            rgba(63, 32, 50, 0.95)
        );
}

.timeline-year {
    margin: 0 0 40px;

    color: var(--gold-soft);

    font-size: 0.76rem;
    font-weight: 900;

    letter-spacing: 0.14em;
}

.timeline-display h3 {
    max-width: 580px;
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 500;

    line-height: 1.05;
}

.timeline-display p:last-child {
    max-width: 620px;
    margin: 24px 0 0;

    color: #e2d8de;
}


/* NOTES */

.notes-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(50px, 8vw, 100px);

    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 120px 0;
}

.notes-introduction > p:last-child {
    max-width: 600px;
    margin-top: 24px;

    color: var(--muted);
}

.notes-interface {
    padding: 28px;

    border: 1px solid var(--line);
    border-radius: var(--radius-lg);

    background: rgba(255, 255, 255, 0.42);

    box-shadow: var(--shadow-sm);
}

.note-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 28px;
}

.note-button {
    padding: 9px 14px;

    border: 1px solid var(--line);
    border-radius: 999px;

    color: var(--muted);
    background: transparent;

    font-size: 0.8rem;
    font-weight: 800;
}

.note-button.active,
.note-button:hover {
    border-color: var(--plum);

    color: var(--white);
    background: var(--plum);
}

.note-display {
    min-height: 350px;
    padding: clamp(28px, 5vw, 46px);

    border-radius: var(--radius-md);

    color: var(--white);

    background:
        linear-gradient(
            145deg,
            var(--plum-dark),
            var(--plum)
        );
}

.note-label {
    margin: 0 0 42px;

    color: var(--gold-soft);

    font-size: 0.72rem;
    font-weight: 900;

    letter-spacing: 0.13em;
}

.note-display h3 {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 500;

    line-height: 1.05;
}

.note-display > p:not(.note-label) {
    max-width: 620px;
    margin: 22px 0 0;

    color: #e6dce2;
}

.note-keyword {
    margin-top: 38px;
    padding-top: 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.note-keyword span {
    display: block;

    margin-bottom: 4px;

    color: #c9a97c;

    font-size: 0.68rem;
    font-weight: 900;

    letter-spacing: 0.12em;
}

.note-keyword strong {
    font-size: 1rem;
}


/* VISUAL BREAK */

.visual-break {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;

    background: var(--paper-deep);
}

.visual-break figure {
    margin: 0;
    overflow: hidden;
}

.visual-break img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.visual-break-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: clamp(45px, 8vw, 100px);
}

.visual-break-copy blockquote {
    margin: 0;

    color: var(--plum-dark);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2rem, 4.5vw, 4rem);
    font-weight: 500;

    line-height: 1.1;
}

.visual-break-copy > p:last-child {
    margin: 25px 0 0;

    color: var(--muted);

    font-size: 0.85rem;
}


/* LEGACY */

.legacy-section {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 55px;

    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 120px 0;
}

.legacy-grid {
    grid-column: 2;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;

    margin-top: 10px;
}

.legacy-grid article {
    padding: 28px;

    border-top: 3px solid var(--plum);
    border-radius: 0 0 var(--radius-md) var(--radius-md);

    background: rgba(255, 255, 255, 0.4);
}

.legacy-grid strong {
    display: block;

    margin-bottom: 40px;

    color: var(--gold);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.8rem;
}

.legacy-grid h3 {
    margin: 0 0 8px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.4rem;
    font-weight: 500;
}

.legacy-grid p {
    margin: 0;

    color: var(--muted);

    font-size: 0.9rem;
}


/* DEVELOPMENT */

.development-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;

    padding: 110px max(20px, calc((100vw - var(--max-width)) / 2));

    color: var(--white);
    background: var(--plum-dark);
}

.development-section .eyebrow {
    color: var(--gold-soft);
}

.development-section h2 {
    color: var(--white);
}

.development-section h2 span {
    color: var(--gold-soft);
}

.technology-list {
    display: grid;
}

.technology-list article {
    padding: 22px 0;

    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.technology-list article:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.technology-list strong {
    display: block;

    margin-bottom: 5px;

    color: var(--gold-soft);
}

.technology-list p {
    margin: 0;

    color: #ddd2d8;

    font-size: 0.9rem;
}


/* SOURCES */

.sources-section {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 70px;

    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 110px 0;
}

.sources-section > div:first-child > p:last-child {
    max-width: 520px;
    margin-top: 18px;

    color: var(--muted);
}

.source-links {
    border-top: 1px solid var(--line);
}

.source-links a {
    position: relative;

    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;

    padding: 22px 0;

    border-bottom: 1px solid var(--line);

    color: var(--ink);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.25rem;
    text-decoration: none;
}

.source-links a:hover {
    color: var(--plum);
}

.source-links span {
    grid-column: 1 / -1;

    margin-bottom: -10px;

    color: var(--muted);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 0.72rem;
    font-weight: 800;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.source-links strong {
    color: var(--gold);

    font-size: 1rem;
}


/* CLOSING */

.closing-section {
    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;

    padding: 70px 0 120px;

    text-align: center;
}

.closing-section h2 {
    max-width: 900px;
    margin: 0 auto 30px;
}

.closing-section .primary-link {
    margin-top: 5px;
}


/* FOOTER */

.site-footer {
    padding: 38px 20px;

    color: #d5cfca;
    background: var(--ink);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;

    width: min(100%, var(--max-width));
    margin: 0 auto;
}

.footer-inner p {
    margin: 0;
}

.footer-name {
    margin-bottom: 4px !important;

    color: var(--white);

    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}


/* TABLET */

@media (max-width: 960px) {

    .hero {
        grid-template-columns: 1fr;

        padding-top: 70px;
    }

    .hero-visual {
        justify-content: flex-start;
    }

    .portrait-frame {
        width: min(100%, 520px);
    }

    .story-section {
        grid-template-columns: 90px 1fr;
    }

    .story-copy {
        grid-column: 2;
    }

    .timeline-interface,
    .notes-section,
    .development-section,
    .sources-section {
        grid-template-columns: 1fr;
    }

    .legacy-section {
        grid-template-columns: 90px 1fr;
    }

    .legacy-grid {
        grid-template-columns: 1fr;
    }

}


/* MOBILE NAVIGATION */

@media (max-width: 760px) {

    .nav-container {
        grid-template-columns: auto auto;
    }

    .menu-button {
        display: block;

        justify-self: end;
    }

    .main-navigation {
        position: absolute;
        top: 78px;
        left: 0;

        display: none;
        flex-direction: column;
        gap: 0;

        width: 100%;

        border-bottom: 1px solid var(--line);

        background: var(--paper);

        box-shadow: var(--shadow-sm);
    }

    .main-navigation.open {
        display: flex;
    }

    .main-navigation a {
        padding: 16px 24px;

        border-bottom: 1px solid var(--line);
    }

}


/* SMALL MOBILE */

@media (max-width: 620px) {

    .nav-container,
    .hero,
    .story-section,
    .ideas-section,
    .notes-section,
    .legacy-section,
    .sources-section,
    .closing-section {
        width: min(100% - 28px, var(--max-width));
    }

    .hero {
        padding: 55px 0 80px;
    }

    .hero-copy h1 {
        font-size: clamp(4rem, 18vw, 6.4rem);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-link,
    .secondary-link {
        width: 100%;
    }

    .portrait-frame img {
        height: 500px;
    }

    .story-section {
        grid-template-columns: 1fr;

        padding: 80px 0;
    }

    .section-number {
        font-size: 4rem;
    }

    .story-copy {
        grid-column: auto;

        padding-top: 0;
    }

    .ideas-section {
        grid-template-columns: 1fr;

        padding-bottom: 80px;
    }

    .idea-card {
        min-height: auto;
    }

    .idea-card > span {
        margin-bottom: 35px;
    }

    .timeline-section {
        padding: 80px 20px;
    }

    .timeline-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .timeline-button {
        flex-direction: column;
        align-items: flex-start;

        padding: 14px;

        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: var(--radius-sm);
    }

    .timeline-display {
        min-height: auto;
    }

    .notes-section {
        padding: 80px 0;
    }

    .notes-interface {
        padding: 18px;
    }

    .note-selector {
        display: grid;
        grid-template-columns: 1fr;
    }

    .visual-break {
        grid-template-columns: 1fr;
    }

    .visual-break figure {
        min-height: 420px;
    }

    .visual-break img {
        height: 420px;
    }

    .visual-break-copy {
        padding: 55px 24px 70px;
    }

    .legacy-section {
        grid-template-columns: 1fr;

        padding: 80px 0;
    }

    .legacy-grid {
        grid-column: auto;
    }

    .development-section {
        padding: 80px 20px;
    }

    .sources-section {
        padding: 80px 0;
    }

    .source-links a {
        font-size: 1.05rem;
    }

    .closing-section {
        padding: 60px 0 90px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}
