/* abstracted.tech: black and white, built around the 4/o glyph */

:root {
    --bg: #ffffff;
    --tile: #f5f5f7;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --rule: #d2d2d7;
    --bar: rgba(255, 255, 255, 0.72);

    --width: 61.25rem;
    --measure: 40rem;
    --gutter: clamp(1rem, 4vw, 2rem);

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --tile: #161617;
        --ink: #f5f5f7;
        --muted: #a1a1a6;
        --rule: #333336;
        --bar: rgba(0, 0, 0, 0.72);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 4rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
    transition: text-decoration-color 0.15s;
}

a:hover {
    text-decoration-color: currentColor;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
    border-radius: 4px;
}

p {
    margin: 0 0 1em;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

/* Site bar */

.bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule);
}

.bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 2rem;
    max-width: var(--width);
    margin: 0 auto;
    padding: 0.7rem var(--gutter);
    font-size: 0.875rem;
}

.bar__home {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    text-decoration: none;
}

.bar__home svg {
    width: 1.25rem;
    height: 1.25rem;
}

.bar nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bar nav a {
    color: var(--muted);
    text-decoration: none;
}

.bar nav a:hover,
.bar nav a[aria-current="page"] {
    color: var(--ink);
}

/* Glyph drawing */

.glyph {
    overflow: visible;
    stroke: var(--ink);
    fill: none;
}

.glyph .stroke {
    stroke-width: 24;
    stroke-linejoin: miter;
}

.bar__home .glyph .stroke {
    stroke-width: 60;
}

@media (prefers-reduced-motion: no-preference) {
    .glyph--draw .stroke {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        animation: plot 1.4s cubic-bezier(0.6, 0, 0.3, 1) forwards;
    }

    .glyph--draw .stroke--ring {
        animation-delay: 0.9s;
        animation-duration: 0.8s;
    }

    .rise {
        opacity: 0;
        transform: translateY(12px);
        animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.1s forwards;
    }

    .rise--late {
        animation-delay: 1.35s;
    }
}

@keyframes plot {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Hero */

.hero {
    max-width: var(--width);
    margin: 0 auto;
    padding: clamp(4rem, 12vw, 8rem) var(--gutter) clamp(4rem, 10vw, 7rem);
    text-align: center;
}

.hero .glyph {
    display: block;
    width: clamp(5.5rem, 14vw, 8.5rem);
    height: auto;
    margin: 0 auto clamp(2rem, 5vw, 3rem);
}

.hero h1 {
    font-size: clamp(2.75rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.hero p {
    max-width: 36rem;
    margin: 1.5rem auto 0;
    font-size: clamp(1.1875rem, 2.2vw, 1.5rem);
    line-height: 1.4;
    color: var(--muted);
}

/* Sections */

.section {
    max-width: var(--width);
    margin: 0 auto;
    padding: clamp(3.5rem, 9vw, 6.5rem) var(--gutter);
}

.section > h2 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin-bottom: 1.25rem;
}

.prose {
    max-width: var(--measure);
}

.lead {
    font-size: clamp(1.1875rem, 2vw, 1.375rem);
    line-height: 1.45;
    color: var(--muted);
    max-width: var(--measure);
}

.more {
    font-weight: 500;
}

.page-title {
    max-width: var(--width);
    margin: 0 auto;
    padding: clamp(4rem, 10vw, 7rem) var(--gutter) clamp(1rem, 3vw, 2rem);
}

.page-title h1 {
    font-size: clamp(2.75rem, 7vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
}

/* Tiles: C2Society programs */

.tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.tiles li {
    background: var(--tile);
    border-radius: 1.125rem;
    padding: 1.75rem;
}

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

.tiles h3 a {
    text-decoration: none;
}

.tiles h3 a:hover {
    text-decoration: underline;
}

.tiles p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9875rem;
}

.c2-links {
    margin-top: 2rem;
}

/* Entries: projects and talks */

.entries {
    list-style: none;
    margin: 0;
    padding: 0;
}

.entry {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 0.5rem 2.5rem;
    padding: 2.25rem 0;
    border-top: 1px solid var(--rule);
}

.entry:first-child {
    border-top: 0;
}

.entry h3 {
    font-size: 1.375rem;
}

.entry h3 a {
    text-decoration: none;
}

.entry h3 a:hover {
    text-decoration: underline;
}

.entry__meta {
    margin-top: 0.4rem;
    font-size: 0.9375rem;
    color: var(--muted);
}

.entry__body {
    max-width: var(--measure);
}

.entry__body p:last-child {
    margin-bottom: 0;
}

.entry__status {
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--muted);
}

.entry__status strong {
    color: var(--ink);
    font-weight: 600;
}

@media (max-width: 46rem) {
    .tiles {
        grid-template-columns: 1fr;
    }

    .entry {
        grid-template-columns: 1fr;
    }

    .entry__meta {
        margin-bottom: 0.5rem;
    }
}

/* Contact */

.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.contact a {
    display: inline-block;
    padding: 0.6rem 1.15rem;
    border: 1px solid var(--rule);
    border-radius: 980px;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.contact a:hover {
    border-color: var(--ink);
}

.contact li:first-child a {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

/* Footer */

.foot {
    background: var(--tile);
    color: var(--muted);
    font-size: 0.8125rem;
}

.foot__inner {
    max-width: var(--width);
    margin: 0 auto;
    padding: 1.5rem var(--gutter);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.foot a {
    text-decoration: none;
}

.foot a:hover {
    color: var(--ink);
}

/* Puzzle */

.puzzle {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 2.5rem;
    padding: var(--gutter);
}

.puzzle .glyph {
    width: 6rem;
    height: 6rem;
}

.puzzle ul {
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 1.25rem;
    font-weight: 500;
}
