:root {
    color-scheme: light;
    --bg: #f5f5ef;
    --surface: #fff;
    --surface-alt: #ebede5;
    --text: #20271e;
    --muted: #62695f;
    --line: #d7dbd0;
    --accent: #c1ed75;
    --accent-text: #354d19;
    --button-text: #20271e;
    --focus: #557f27;
    --error: #a32e30;
    --success: #336921;
    --shadow: 0 12px 32px #2030180b;
    --radius: 20px
}

:root[data-theme=dark] {
    color-scheme: dark;
    --bg: #141813;
    --surface: #1d231b;
    --surface-alt: #272f24;
    --text: #edf1e8;
    --muted: #acb6a5;
    --line: #384231;
    --accent: #c1ed75;
    --accent-text: #c1ed75;
    --button-text: #20271e;
    --focus: #c1ed75;
    --error: #ffa6a5;
    --success: #c1ed75;
    --shadow: 0 12px 32px #0002
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color .25s, color .25s
}

button,
input,
textarea {
    font: inherit
}

button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent
}

button,
a {
    touch-action: manipulation
}

button {
    cursor: pointer
}

a {
    color: inherit;
    text-underline-offset: 4px
}

button:disabled {
    cursor: wait;
    opacity: .65
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 5px
}

::selection {
    background: var(--accent);
    color: var(--button-text)
}

[hidden] {
    display: none !important
}

.shell {
    width: min(1120px, calc(100% - 36px));
    margin: auto
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 12px;
    background: var(--accent);
    color: var(--button-text);
    z-index: 10;
    transform: translateY(-160%)
}

.skip-link:focus {
    transform: translateY(0)
}

.topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line)
}

.wordmark {
    font-size: 32px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -3px;
    text-decoration: none
}

.wordmark span {
    color: var(--accent-text)
}

.page-nav {
    display: flex;
    gap: 22px;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600
}

.page-nav a {
    text-decoration: none
}

.page-nav a:hover {
    color: var(--accent-text)
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 24px
}

.hero {
    display: grid;
    gap: 36px;
    padding: 48px 0 58px
}

.eyebrow,
.section-note,
.portrait-top,
.art-label {
    font-family: "Courier New", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px
}

.eyebrow {
    color: var(--muted);
    margin: 0 0 18px
}

.tiny-cross {
    font-size: 20px;
    color: var(--accent-text);
    vertical-align: middle;
    margin-right: 6px
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: clamp(44px, 7vw, 80px);
    line-height: 1.02;
    letter-spacing: -.065em;
    margin-bottom: 22px
}

h2 {
    font-size: clamp(27px, 3.2vw, 36px);
    line-height: 1.2;
    letter-spacing: -1.3px;
    margin-bottom: 0
}

h2 span,
.accent {
    color: var(--accent-text)
}

h3 {
    font-size: 20px;
    letter-spacing: -.6px;
    line-height: 1.35
}

.hero-line {
    font-size: clamp(24px, 3.2vw, 37px);
    line-height: 1.2;
    letter-spacing: -1.2px;
    margin-bottom: 22px
}

.bio {
    max-width: 540px;
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 12px
}

.bio a {
    color: var(--text)
}

.aliases {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 26px
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform .2s, background .2s, box-shadow .2s
}

.primary {
    background: var(--accent);
    color: var(--button-text)
}

.secondary {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text)
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow)
}

.portrait-card {
    width: 100%;
    max-width: 380px;
    margin: auto;
    padding: 14px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transform: rotate(2deg)
}

.portrait-top {
    display: flex;
    justify-content: space-between;
    padding: 2px 3px 12px;
    color: var(--muted);
    font-size: 10px
}

.portrait {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center 35%;
    border-radius: 10px;
    filter: saturate(.8)
}

.presence {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 14px 3px 2px;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #81887c;
    flex: none
}

.presence[data-status=online] .status-dot {
    background: #369753
}

.presence[data-status=idle] .status-dot {
    background: #bd8514
}

.presence[data-status=dnd] .status-dot {
    background: #d14848
}

.section {
    padding: 38px 0;
    border-top: 1px solid var(--line)
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px
}

.section-note {
    color: var(--muted);
    font-size: 10px
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
}

.social-grid a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: transform .2s, border-color .2s, background .2s
}

.social-grid a:hover {
    transform: translateY(-3px);
    border-color: var(--accent-text);
    background: var(--surface-alt)
}

.social-grid img {
    object-fit: contain;
    flex: none;
    background: #fff;
    border-radius: 5px;
    padding: 2px
}

.social-grid a>span {
    margin-left: auto;
    color: var(--muted)
}

.email-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--muted)
}

.copy-email {
    display: flex;
    gap: 16px;
    align-items: center;
    min-height: 44px;
    background: transparent;
    color: var(--text);
    border: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600
}

.copy-message {
    color: var(--accent-text)
}

.skills-layout {
    display: grid;
    gap: 16px
}

.panel {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface)
}

.panel .eyebrow {
    font-size: 10px
}

.skill-list {
    margin: 24px 0 0
}

.skill-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 14px
}

.skill-list dd {
    margin: 0;
    background: var(--surface-alt);
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11px;
    color: var(--muted)
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 0;
    list-style: none;
    margin: 26px 0
}

.tags li {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 11px;
    font-size: 13px
}

.muted {
    color: var(--muted);
    margin-bottom: 5px
}

.small {
    font-size: 13px;
    color: var(--muted);
    margin: 0
}

.project-grid {
    display: grid;
    gap: 18px
}

.project-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: transform .2s, box-shadow .2s
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow)
}

.project-art {
    height: 205px;
    padding: 22px;
    position: relative;
    overflow: hidden
}

.art-label {
    font-size: 9px;
    display: block;
    letter-spacing: 1px
}

.student-art {
    background: #d9edc4;
    color: #2e472b
}

.student-art strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-top: 22px
}

.art-pill {
    position: absolute;
    bottom: 18px;
    left: 22px;
    font-size: 10px;
    border: 1px solid currentColor;
    border-radius: 20px;
    padding: 2px 9px
}

.puzzle-art {
    background: #e7def6;
    color: #514164
}

.tubes {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 24px 0
}

.tubes i {
    height: 82px;
    width: 27px;
    border: 3px solid #fff;
    border-top: 0;
    border-radius: 0 0 13px 13px;
    background: linear-gradient(to top, #a992d2 33%, #f1b082 33% 66%, #aacb8c 66%)
}

.tubes i:nth-child(2) {
    background: linear-gradient(to top, #f1b082 33%, #aacb8c 33% 66%, #a992d2 66%);
    transform: translateY(-10px) rotate(12deg)
}

.tubes i:nth-child(3) {
    background: linear-gradient(to top, #aacb8c 33%, #a992d2 33% 66%, #f1b082 66%)
}

.tubes i:last-child {
    background: transparent
}

.network-art {
    background: #dce8ea;
    color: #34535b
}

.network-drawing {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    height: 110px;
    background: linear-gradient(#78999d, #78999d) center/90% 1px no-repeat
}

.network-drawing span {
    font-size: 8px;
    background: #edf4f4;
    border: 1px solid #93b0b3;
    border-radius: 6px;
    padding: 15px 5px;
    transform: rotate(-5deg)
}

.network-drawing span:nth-child(2) {
    transform: rotate(5deg)
}

.project-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1
}

.project-card {
    display: flex;
    flex-direction: column
}

.project-body .eyebrow {
    font-size: 9px;
    margin-bottom: 12px
}

.project-body p:not(.eyebrow) {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px
}

.text-link,
.project-caption {
    font-size: 12px;
    margin-top: auto;
    font-weight: 600
}

.text-link {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    min-height: 44px;
    align-items: center
}

.project-caption {
    color: var(--muted);
    min-height: 44px;
    display: flex;
    align-items: center
}

.setup-section {
  padding: 2rem 0;
  margin-top: 2rem;
}

.setup-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.setup-card {
  background: var(--bg-card, #1e1e1e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 1.5rem;
  flex: 1 1 calc(50% - 1.5rem);
  min-width: 250px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.setup-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.setup-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.setup-card ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.setup-card li {
  color: var(--text-muted, #aaa);
  margin-bottom: 0.5rem;
}

.interests {
    display: grid;
    gap: 28px;
    border-radius: var(--radius);
    padding: 28px;
    background: var(--surface-alt);
    margin: 24px 0 48px
}

.interests p:not(.eyebrow) {
    font-size: 14px;
    color: var(--muted);
    margin: 16px 0 0
}

.interest-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    font-size: 14px
}

.contact-section {
    display: grid;
    gap: 28px;
    padding: 44px 0 60px
}

.contact-copy h2 {
    font-size: clamp(32px, 4vw, 45px);
    letter-spacing: -1.8px;
    margin-bottom: 20px
}

.contact-copy p:not(.eyebrow) {
    color: var(--muted);
    max-width: 330px
}

.contact-email {
    font-size: 14px;
    font-weight: 600
}

.contact-form {
    min-width: 0
}

.form-row {
    display: grid;
    gap: 16px
}

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 7px
}

input:not([type=hidden], [type=checkbox]),
textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 16px;
    margin-bottom: 16px
}

input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 1
}

textarea {
    resize: vertical;
    min-height: 130px
}

.form-note {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 18px
}

.submit-button {
    width: 100%;
    justify-content: space-between
}

.form-status {
    font-size: 13px;
    margin: 12px 0 0;
    min-height: 22px;
    color: var(--success)
}

.form-status[data-state=error] {
    color: var(--error)
}

.honeypot {
    display: none
}

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    padding: 25px 0;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted)
}

footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center
}

.reveal {
    transition: opacity .6s, transform .6s
}

.reveal.is-pending {
    opacity: 0;
    transform: translateY(20px)
}

@media(min-width:600px) {
    .shell {
        width: min(1120px, calc(100% - 64px))
    }

    .social-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .skills-layout {
        grid-template-columns: 1fr 1fr
    }

    .form-row {
        grid-template-columns: 1fr 1fr
    }

    .interests {
        padding: 36px
    }

    .portrait {
        height: 350px
    }
}

@media(min-width:900px) {
    .topbar {
        padding: 28px 0
    }

    .hero {
        grid-template-columns: 1.6fr 1fr;
        align-items: center;
        gap: 65px;
        padding: 68px 0 76px
    }

    .portrait-card {
        max-width: 330px
    }

    .portrait {
        height: 315px
    }

    .social-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr))
    }

    .social-grid a {
        padding: 15px
    }

    .section {
        padding: 46px 0
    }

    .panel {
        padding: 30px
    }

    .project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .interests {
        grid-template-columns: 1.3fr 1fr;
        align-items: center
    }

    .interest-list {
        justify-self: end
    }

    .contact-section {
        grid-template-columns: 1fr 1.2fr;
        gap: 70px;
        padding: 55px 0 70px
    }

    footer {
        align-items: center
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important
    }

    .reveal.is-pending {
        opacity: 1;
        transform: none
    }

    .button:hover,
    .project-card:hover,
    .social-grid a:hover {
        transform: none
    }
}