:root {
  --sans: "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 1rem/1.55 var(--sans); color: var(--ink); background: var(--paper); }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #1e6480; outline-offset: 4px; }
.site-header { border-bottom: 1px solid var(--line); }
.shell { width: min(1192px, calc(100% - 88px)); margin-inline: auto; }
.header-inner { min-height: 77px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; font-weight: 700; letter-spacing: -.025em; text-decoration: none; }
.monogram { display: grid; place-items: center; width: 34px; aspect-ratio: 1; border-radius: 8px; color: #fff; background: var(--accent); font: 700 .8rem var(--mono); letter-spacing: -.04em; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { min-height: 44px; display: inline-flex; align-items: center; color: #454039; text-decoration: none; font-weight: 600; font-size: .94rem; }
nav a:hover, .text-link:hover { color: var(--accent-deep); text-decoration: underline; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; padding: 9px 17px; font-size: .91rem; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.button-outline { color: var(--ink); border-color: #c8c0b7; background: transparent; }
.button-outline:hover { background: #ebe5dd; border-color: #ae9e90; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-deep); }
.header-github { justify-self: end; padding-inline: 14px; }
.hero { display: grid; grid-template-columns: 1.04fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: 56px 70px; }
.hero-copy { padding-block: 15px; }
.eyebrow, .card-category { margin: 0; font: 700 .79rem/1.45 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--accent-deep); }
.hero-role { display: inline-flex; gap: 11px; align-items: center; }
.hero-role::before { content: ""; width: 25px; height: 1px; background: var(--accent); }
h1, h2, h3, p { overflow-wrap: break-word; }
.hero h1 { margin: 18px 0 19px -5px; font-size: clamp(4.25rem, 8.2vw, 8rem); line-height: .855; letter-spacing: -.094em; font-weight: 800; }
.hero h1 > span { color: var(--accent); }
.name-period { color: var(--accent); }
.hero-lede { max-width: 26rem; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.19rem); line-height: 1.55; margin: 25px 0 27px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .button { min-height: 49px; padding-inline: 19px; }
.hero-visual { position: relative; height: clamp(395px, 41vw, 518px); overflow: hidden; border-radius: 13px; background: #30271f; isolation: isolate; }
.hero-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 57%; }
.hero-visual::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(0deg, #170e08a6, transparent); pointer-events: none; }
.hero-location { z-index: 1; position: absolute; bottom: 18px; right: 18px; display: flex; align-items: center; gap: 7px; color: #fff8ef; background: #241b16e8; border: 1px solid #fff3; border-radius: 5px; padding: 8px 10px; font-size: .86rem; font-weight: 600; }
.projects { border-top: 1px solid var(--line); padding-block: 38px 68px; scroll-margin-top: 18px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px 27px; flex-wrap: wrap; margin-bottom: 23px; }
h2 { font-size: clamp(2.38rem, 4.4vw, 4.15rem); letter-spacing: -.075em; line-height: 1; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button { min-height: 43px; padding: 7px 13px; border-radius: 6px; background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: .88rem; font-weight: 700; }
.filters button:hover { border-color: #988c80; color: var(--ink); }
.filters [aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.project-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--white); border-radius: 11px; overflow: hidden; transition: border-color .18s ease; }
.project-card:hover { border-color: #ab9f91; }
.project-art { display: grid; place-items: center; min-height: 220px; position: relative; overflow: hidden; isolation: isolate; }
.project-body { padding: 23px 25px 25px; flex: 1; display: flex; flex-direction: column; align-items: start; }
.project-body h3 { margin: 4px 0 7px; font-size: clamp(1.55rem, 2.9vw, 2.19rem); letter-spacing: -.062em; line-height: 1.1; }
.project-body > p:not(.card-category) { margin: 0 0 14px; color: var(--muted); }
.tags { padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tags li { background: #f1ede7; border-radius: 5px; padding: 3px 7px; font-size: .81rem; color: #4c443d; }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.button-card { background: #f1e6dc; color: #7d301e; min-height: 41px; }
.button-card:hover { background: #ead5c8; }
.text-link { font-weight: 700; font-size: .9rem; text-underline-offset: 4px; text-decoration-color: #95887e; padding-block: 10px; }
.elevator-art { color: #ddf3e9; background: radial-gradient(ellipse at 52% 105%, #307463, transparent 68%), #10322e; }
.elevator-art::before, .game-art::before { content: ""; position: absolute; inset: 0; opacity: .34; z-index: -1; background: radial-gradient(circle at 1px 1px, #bae9d38c 1px, transparent 1.5px) 0 0 / 16px 16px; mask-image: linear-gradient(110deg, #000, transparent 78%); }
.elevator-display { width: min(62%, 290px); display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 10px; border: 1px solid #7eb3a178; border-radius: 12px; background: #132f2cef; box-shadow: 0 16px 32px #041b187c; transform: rotate(-4deg); }
.elevator-display > div:not(.elevator-art-buttons) { display: grid; place-items: center; background: #24453f; border: 1px solid #81a99e3d; border-radius: 6px; padding: 9px 0; }
.elevator-display span { font: 700 clamp(.46rem, 1.1vw, .67rem) var(--mono); letter-spacing: .04em; }
.elevator-display strong { color: #a0e6b5; font: 750 clamp(2rem, 5vw, 3.65rem)/1.05 var(--mono); }
.elevator-art-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.elevator-art-buttons i { border-radius: 3px; background: #2d514a; display: grid; place-items: center; min-height: 27px; font: 700 .62rem var(--mono); }
.elevator-art-buttons i:nth-child(4) { background: #a0e6b5; color: #15312b; }
.numbers-art { background: #f4d5c2; background-image: radial-gradient(#ba634950 1px, transparent 1px); background-size: 15px 15px; }
.art-number-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; transform: rotate(-5deg) scale(1.02); }
.art-number-grid i { display: grid; place-items: center; width: clamp(24px, 5vw, 54px); aspect-ratio: 1; background: #9f3d2a; color: #fff1d7; border-radius: 7px; font: 700 clamp(.85rem, 2.6vw, 2rem) var(--mono); box-shadow: 0 3px 5px #a0402828; }
.art-number-grid i:nth-child(3n) { background: #fef4e6; color: #5a3536; }
.art-number-grid i:nth-child(4n + 2) { background: #542927; color: #f9d3bc; }
.art-number-grid i:nth-child(5n) { background: #e49253; color: #452116; }
.os-art { background: radial-gradient(ellipse at 50% 20%, #dae5f3, #a6bfdc); }
.art-dashboard { width: min(70%, 340px); border-radius: 8px; background: #f6f8fd; border: 1px solid #849bb7; box-shadow: 0 12px 27px #19345350; color: #283d5e; transform: rotate(-4deg); overflow: hidden; }
.dash-title { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; color: #f2f6ff; background: #294265; font-size: .85rem; }
.dash-title span { font: 600 .59rem var(--mono); }
.dash-body { display: grid; grid-template-columns: 24% 1fr; min-height: 105px; font-size: .68rem; }
.dash-nav { display: flex; flex-direction: column; gap: 10px; padding: 14px 10px; background: #e1e9f1; }
.dash-nav i { background: #b3c2d4; height: 5px; border-radius: 3px; }
.dash-nav i:first-child { background: #738cad; }
.dash-main { padding: 11px 12px; }
.dash-main > b { font-size: .82rem; }
.dash-task { display: flex; gap: 6px; align-items: center; margin-top: 5px; white-space: nowrap; }
.dash-task span { display: grid; place-items: center; border: 1px solid #7e90ad; width: 11px; height: 11px; line-height: 1; border-radius: 2px; }
.dash-track { background: #d4dfed; height: 5px; margin-top: 9px; border-radius: 4px; }
.dash-track i { display: block; width: 56%; height: 100%; background: #6083b7; border-radius: inherit; }
.game-art { background: #211928 url("assets/control-room.webp") center 55% / cover no-repeat; color: #ffdda5; }
.game-art::before { opacity: .25; }
.art-timer { position: absolute; top: 14px; right: 14px; background: #25190ef0; border: 1px solid #c18050; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 4px; font: 700 .96rem var(--mono); }
.game-art-text { position: absolute; bottom: 0; padding: 14px 17px; width: 100%; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(0deg, #170d13, #170d1300); font: 700 .72rem var(--mono); letter-spacing: .09em; }
.game-art-lights { display: flex; gap: 5px; }
.game-art-lights i { background: #7aa7f5; width: 6px; height: 6px; border-radius: 1px; }
.game-art-lights i + i { background: #86d19f; }
.game-art-lights i + i + i { background: #ef7858; }
.calendar-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.calendar-art { background: radial-gradient(ellipse at 30% 90%, #c2c6a0, #dfe0cc); }
.art-calendar { transform: rotate(-5deg); display: grid; gap: 6px; width: min(54%, 230px); background: #f9f8e9; color: #465134; padding: 11px 13px 13px; border: 1px solid #8f9875; border-radius: 8px; box-shadow: 0 10px 22px #3540283a; }
.art-calendar > span { font-size: 1.3rem; font-weight: 800; }
.art-cal-dots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.art-cal-dots i { aspect-ratio: 1.3; border-radius: 3px; background: radial-gradient(circle, #87926a 1px, transparent 1px) center / 6px 6px, #e6e6cc; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 80px; border-top: 1px solid var(--line); padding-block: 62px; }
.about-copy p { max-width: 31rem; color: var(--muted); margin: 18px 0 0; font-size: 1.04rem; }
.about-copy .graduation { font-size: .94rem; }
.graduation strong { color: var(--ink); margin-left: 5px; }
.skills h3 { font-size: 1.53rem; line-height: 1.2; letter-spacing: -.042em; margin: 0 0 10px; }
.skills dl { margin: 0; }
.skills dl div { display: grid; grid-template-columns: minmax(8rem, .85fr) 1.15fr; gap: 6px 13px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.skills dt { font-weight: 700; }
.skills dd { margin: 0; color: var(--muted); }
.contact-inner { padding: clamp(25px, 5vw, 55px); background: #251e1a; color: #fbf4ed; border-radius: 11px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 17px 30px; }
.contact-inner p { margin: 12px 0 0; color: #e3d5c9; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.contact-actions .button-primary { background: #ecaa87; color: #341a11; }
.contact-actions .button-primary:hover { background: #ffd0b4; }
.button-contact { color: #fff8ef; border-color: #a89384; }
.button-contact:hover { background: #49372e; }
.contact :focus-visible { outline-color: #e9a67c; }
.site-footer { padding-block: 23px 31px; display: flex; gap: 18px; align-items: center; justify-content: space-between; font-size: .87rem; color: var(--muted); }
.site-footer a { text-underline-offset: 4px; font-weight: 700; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 8px 12px; color: #fff; background: var(--accent-deep); }
dialog { width: min(650px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid #b4a89b; border-radius: 12px; background: var(--white); color: var(--ink); box-shadow: 0 22px 110px #130b0866; }
dialog::backdrop { background: #241d19a8; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-content { position: relative; padding: clamp(20px, 5vw, 37px); }
.close { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; top: 13px; right: 13px; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; font-size: 1.65rem; color: var(--ink); line-height: 1; }
.close:hover { background: #eae3da; }
.dialog-content > .card-category { margin: 0 48px 6px 0; }
.dialog-content h2 { font-size: clamp(2.1rem, 7vw, 3.45rem); margin-right: 38px; }
.dialog-description { color: var(--muted); margin: 12px 0 19px; }
.demo { border: 1px solid #e0d7cb; border-radius: 8px; background: #f6f1e9; padding: clamp(13px, 4vw, 21px); }
.demo h3 { font-size: 1.22rem; line-height: 1.23; letter-spacing: -.035em; margin: 0 0 7px; }
.demo p { color: var(--muted); margin: 0 0 12px; }
.demo button:not(.button), .demo select, .demo input[type="number"] { color: var(--ink); background: var(--white); border: 1px solid #b9a99b; border-radius: 5px; min-height: 44px; }
.demo button:not(.button):hover, .demo select:hover { border-color: var(--accent); }
.demo button:not(.button)[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo select, .demo input[type="number"] { padding: 5px 9px; max-width: 100%; }
.demo-lede { font-size: .94rem; }
.dialog-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; margin-top: 15px; }
.floor-pad { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.floor-pad button { padding: 3px; font-family: var(--mono); font-weight: 700; }
.demo .demo-status { margin: 9px 0 0; color: #2b3d32; font-weight: 700; }
.generator-form { display: grid; align-items: start; gap: 3px; }
.generator-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.generator-form label { font-weight: 700; font-size: .89rem; }
.generator-form input { width: 108px; }
.generation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 4px; padding-top: 8px; }
.generation-grid span { display: grid; place-items: center; border-radius: 4px; min-height: 32px; background: #963b27; color: #ffeedc; font: 700 1.02rem var(--mono); }
.generation-grid .tile-1 { background: #edb681; color: #512f29; }
.generation-grid .tile-2 { background: #523436; color: #f8ded3; }
.generation-grid .tile-3 { background: #e5d6cc; color: #57392f; }
.task-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.task-list label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 5px; background: var(--white); cursor: pointer; }
.task-list input { width: 18px; height: 18px; accent-color: #376344; flex: 0 0 auto; }
.task-list label:has(input:checked) span { text-decoration: line-through; }
.preview-progress { display: block; height: 10px; width: 100%; margin-top: 11px; appearance: none; accent-color: #376344; }
.preview-progress::-webkit-progress-bar { background: #e0dacf; border-radius: 7px; }
.preview-progress::-webkit-progress-value { background: #376344; border-radius: 7px; }
.preview-progress::-moz-progress-bar { background: #376344; border-radius: 7px; }
.map-controls { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.map-controls button { min-width: 42px; padding-inline: 8px; font: 700 .93rem var(--mono); }
.map-info { min-height: 91px; padding: 12px; border-radius: 5px; background: var(--white); }
.map-info b { display: block; margin-bottom: 3px; }
.map-info p { margin-bottom: 0; }
.month-control { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; font-weight: 700; }
.month-table { table-layout: fixed; width: 100%; margin-top: 10px; border-collapse: separate; border-spacing: 3px; text-align: center; font-size: .88rem; }
.month-table th { color: #52493f; }
.month-table td { background: var(--white); border-radius: 3px; padding: 3px 2px; }
.month-table td:empty { background: transparent; }
.month-table .weekend { color: #7d301e; font-weight: 700; background: #efe1d6; }
@media (max-width: 880px) {
  .shell { width: calc(100% - 56px); }
  .hero { gap: 30px; padding-block: 45px 51px; }
  .hero h1 { font-size: clamp(3.75rem, 10.05vw, 6.9rem); }
  .hero-visual { height: clamp(350px, 48vw, 410px); }
  .project-body { padding: 19px; }
  .about { gap: 27px 39px; }
  .skills dl div { grid-template-columns: 1fr; gap: 1px; }
}
@media (max-width: 630px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { grid-template-columns: 1fr auto; gap: 0 12px; padding-top: 9px; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; gap: 23px; padding-top: 2px; margin-bottom: 1px; }
  .header-github { grid-column: 2; grid-row: 1; min-height: 40px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 35px 40px; }
  .hero-copy { padding-block: 0; }
  .hero h1 { font-size: clamp(3.65rem, 14vw, 5.8rem); margin-left: -3px; }
  .hero-lede { margin-block: 19px 21px; }
  .hero-visual { height: clamp(248px, 67vw, 380px); }
  .hero-visual img { object-position: 50% 61%; }
  .hero-location { right: 12px; bottom: 12px; }
  .projects { padding-block: 28px 43px; }
  .section-heading { margin-bottom: 14px; gap: 14px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .calendar-card { grid-column: auto; display: flex; }
  .project-art { min-height: 169px; }
  .art-number-grid i { width: clamp(26px, 10vw, 48px); font-size: clamp(1rem, 4vw, 1.6rem); }
  .about { grid-template-columns: 1fr; padding-block: 36px; }
  .skills dl div { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .brand { gap: 8px; font-size: .875rem; white-space: nowrap; }
  .monogram { width: 30px; }
  .header-github { padding-inline: 10px; }
  .hero-actions .button { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Site surfaces and interactive controls share the selected appearance. */
:root {
  color-scheme: dark;
  --paper: #090a0c;
  --white: #121418;
  --ink: #f4f5f7;
  --muted: #b8bec8;
  --line: #2b3038;
  --strong-line: #626b79;
  --accent: #edb193;
  --accent-deep: #ffd0b8;
  --on-accent: #28180f;
  --soft: #20242b;
  --soft-hover: #2d333d;
  --header: #0d0f12;
  --glow: #27171048;
  --glow-alt: transparent;
  --grid: #eaf0ff06;
  --highlight: #edb19345;
  --secondary-accent: #e6c17d;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #fbf7ef;
  --white: #fffdf9;
  --ink: #26201b;
  --muted: #5e5148;
  --line: #ddcfc1;
  --strong-line: #987c69;
  --accent: #98452c;
  --accent-deep: #76311d;
  --on-accent: #fffaf4;
  --soft: #f4e6db;
  --soft-hover: #eed6c6;
  --header: #fffaf3;
  --glow: #e8ab7c38;
  --glow-alt: transparent;
  --grid: #754d2d0c;
  --highlight: #92412635;
  --secondary-accent: #8c5b21;
}
:root[data-theme="colorful"] {
  color-scheme: dark;
  --paper: #251525;
  --white: #352138;
  --ink: #fff4ec;
  --muted: #e2c7dd;
  --line: #62445e;
  --strong-line: #a47597;
  --accent: #ffb27f;
  --accent-deep: #ffd1a5;
  --on-accent: #2c1724;
  --soft: #482c47;
  --soft-hover: #633951;
  --header: #2e1a30;
  --glow: #cf5f7163;
  --glow-alt: #8950b367;
  --grid: #ffbdd21a;
  --highlight: #ffb27f70;
  --secondary-accent: #eb9fdb;
}
body {
  background:
    radial-gradient(ellipse at 84% 7%, var(--glow) 0%, transparent 32rem),
    radial-gradient(ellipse at 5% 30%, var(--glow-alt) 0%, transparent 36rem),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px), var(--paper);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
}
:focus-visible, .contact :focus-visible { outline-color: var(--accent); }
.site-header { background: var(--header); }
nav a { color: var(--muted); }
.monogram, .button-primary, .skip-link:focus { color: var(--on-accent); }
.button-outline, .button-contact { color: var(--ink); border-color: var(--strong-line); }
.button-outline:hover, .button-contact:hover, .close:hover { background: var(--soft-hover); border-color: var(--accent); }
.hero { padding-block: clamp(42px, 7vw, 92px); }
.hero h1 { font-size: clamp(3.75rem, 8.5vw, 8.4rem); letter-spacing: -.085em; }
.hero h1 > span { text-shadow: 0 0 28px var(--highlight); }
.hero-visual { border: 1px solid var(--strong-line); box-shadow: 0 0 52px var(--highlight); }
.hero-visual img { filter: saturate(.76); }
.hero-visual::after { inset: 0; background: linear-gradient(140deg, var(--highlight), transparent 55%, #1c1211dc); }
.hero-location { background: #241915ef; }
.project-card:hover { border-color: var(--accent); }
.project-art { min-height: 200px; }
.filters [aria-pressed="true"], .demo button:not(.button)[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tags li, .button-card { color: var(--ink); background: var(--soft); }
.button-card:hover { background: var(--soft-hover); }
.text-link { text-decoration-color: var(--strong-line); }
.system-art { background: radial-gradient(ellipse at 65% 86%, #6f5540, #2b231d 75%); }
.system-game { background: radial-gradient(ellipse at 75% 15%, #584b76, #191426 75%); }
.system-web { background: radial-gradient(ellipse at 65% 70%, #4c655b, #1e312c 75%); }
.system-window { width: min(72%, 340px); padding: 15px 20px 18px; border: 1px solid #eac7ae5c; border-radius: 11px; background: #241e1af2; box-shadow: 0 18px 32px #0007; transform: rotate(-4deg); }
.system-window span { color: #cdbfb4; font: .79rem var(--mono); }
.system-window strong { display: block; color: #f4d0ae; font: 700 clamp(.95rem, 3vw, 1.55rem)/1.25 var(--mono); margin-block: 9px 14px; }
.system-window i { display: block; height: 4px; width: 77%; background: #9c7760; margin: 6px 0; border-radius: 10px; }
.system-window i:nth-last-child(2) { width: 56%; }
.system-window i:last-child { width: 66%; }
.source-status { color: var(--muted); font-size: .9rem; }
.about { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; }
.about .eyebrow { margin: 0 0 10px; color: var(--accent); }
.about-copy p { max-width: 38rem; }
.about-actions { margin-top: 22px; }
.about-facts { display: grid; gap: 12px; }
.about-facts article, .stack-grid article { padding: clamp(16px, 3vw, 26px); border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.about-facts h3, .stack-grid h3 { margin: 0 0 8px; font-size: 1.28rem; line-height: 1.25; }
.about-facts p { margin: 5px 0 0; color: var(--muted); }
.stack { border-top: 1px solid var(--line); padding-block: 54px; }
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.tech-links { display: flex; gap: 7px; flex-wrap: wrap; }
.tech-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
.tech-links a:hover { background: var(--soft); text-decoration: underline; }
.contact-inner { border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 110%, var(--glow), transparent 65%), var(--white); color: var(--ink); }
.contact-inner p { color: var(--muted); }
.contact-actions .button-primary { background: var(--accent); color: var(--on-accent); }
.contact-actions .button-primary:hover { background: var(--accent-deep); }
.social-row { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: clamp(9px, 2vw, 21px); padding-top: 17px; }
.social-tile { display: grid; place-items: center; width: clamp(48px, 8vw, 63px); aspect-ratio: 1; color: var(--accent); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; transition: border-color .18s, box-shadow .18s; }
.social-tile svg { display: block; width: 53%; height: 53%; }
a.social-tile:hover { border-color: var(--accent); box-shadow: 0 0 19px var(--highlight); }
.social-request:hover { border-color: var(--accent); box-shadow: 0 0 19px var(--highlight); }
dialog, .demo { border-color: var(--strong-line); }
dialog::backdrop { background: #151013c9; }
.demo { background: var(--paper); }
.demo .demo-status { color: var(--accent-deep); }
.month-table td.weekend { color: var(--accent-deep); background: var(--soft); }
.map-info { background: var(--soft); color: var(--ink); }
@media (max-width: 760px) {
  .stack-grid, .about { grid-template-columns: 1fr; }
}

.hero-portrait img { object-position: 50% 31%; filter: none; }
.hero-portrait::after { background: linear-gradient(0deg, #211716aa, transparent 30%); }
.contact-profile { display: flex; gap: clamp(14px, 3vw, 28px); align-items: center; }
.contact-profile img {
  display: block;
  flex: 0 0 auto;
  width: clamp(74px, 13vw, 135px);
  height: auto;
  border-radius: 13px;
  border: 1px solid var(--strong-line);
}
.social-request { position: relative; padding: 0; }
.social-request::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--secondary-accent);
  border-radius: 2px;
  background: var(--soft);
}
.social-dialog-label { margin: 0 45px 9px 0; }

.hero-copy { border-left: 1px solid var(--line); padding-left: clamp(15px, 3vw, 38px); }
.hero-role::before { background: var(--secondary-accent); }
.hero h1 > span { color: var(--accent-deep); }
.name-period { color: var(--secondary-accent); }
.hero-visual { border-radius: 20px; }
.project-card, .about-facts article, .stack-grid article { border-radius: 15px; }
.project-art { border-bottom: 1px solid var(--line); }

.resume-page { padding-block: clamp(36px, 8vw, 100px); }
.resume-panel { max-width: 42rem; margin-inline: auto; padding: clamp(20px, 5vw, 42px); border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.resume-panel h1 { margin: 12px 0; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.05em; line-height: 1.05; }
.resume-panel p { color: var(--muted); }
.resume-form { display: grid; justify-items: start; gap: 12px; padding-block: 10px; }
.resume-form label { font-weight: 700; }
.resume-form input { max-width: 100%; }
#resume-status:empty { display: none; }
@media (max-width: 460px) {
  .hero-copy { padding-left: 0; border-left: 0; }
}

.header-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.theme-picker { position: relative; z-index: 5; }
.theme-picker summary {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--strong-line);
  border-radius: 8px;
}
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary:hover, .theme-picker[open] summary { color: var(--accent-deep); border-color: var(--accent); }
.theme-options {
  position: absolute;
  inset: calc(100% + 8px) 0 auto auto;
  min-width: 144px;
  margin: 0;
  padding: 5px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--strong-line);
  border-radius: 10px;
  box-shadow: 0 8px 26px #0004;
}
.theme-options label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding-inline: 9px; border-radius: 6px; cursor: pointer; }
.theme-options label:hover, .theme-options label:has(:checked) { background: var(--soft); }
.theme-options input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: end; }
.resume-download, .resume-panel :is(h1, label, button, a) { font-family: Arial, sans-serif; letter-spacing: normal; }
.month-table th { color: var(--muted); }
:root[data-theme="light"] .hero h1 > span { text-shadow: none; }
:root[data-theme="colorful"] .contact-inner {
  background: radial-gradient(ellipse at 95% 30%, var(--glow-alt), transparent 65%), radial-gradient(ellipse at 1% 90%, var(--glow), transparent 70%), var(--white);
}
@media (max-width: 630px) {
  .header-actions { grid-column: 2; grid-row: 1; }
  .header-inner nav { gap: clamp(12px, 4vw, 23px); flex-wrap: wrap; }
  .hero h1 { font-size: clamp(3.4rem, 14vw, 5.8rem); }
  .hero { padding-block: 35px 40px; }
}

#resume-editor { display: inline-flex; align-items: center; gap: 5px; }

.header-linkedin { width: 44px; padding-inline: 0; }
.stack-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}
.stack-details summary::-webkit-details-marker { display: none; }
.stack-details summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid var(--strong-line);
  border-radius: 8px;
  font-size: 1.35rem;
}
.stack-details[open] summary::after { content: "−"; }
.resume-form #upload-pin {
  width: 8rem;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--strong-line);
  border-radius: 8px;
}
:root[data-theme="colorful"] {
  --vibrant-lilac: #cbb0ff;
  --vibrant-mint: #8aebcc;
  --vibrant-gold: #ffd37d;
  --vibrant-pink: #ffa8d2;
  --vibrant-sky: #9fe1ff;
}
:root[data-theme="colorful"] body {
  background:
    radial-gradient(ellipse at 85% 5%, #be4e7d70, transparent 35rem),
    radial-gradient(ellipse at 5% 34%, #654eaa59, transparent 32rem),
    radial-gradient(ellipse at 90% 69%, #247c7452, transparent 42rem),
    radial-gradient(ellipse at 4% 94%, #ac643d60, transparent 37rem),
    var(--paper);
}
:root[data-theme="colorful"] .hero h1 > span {
  color: var(--vibrant-pink);
  background: linear-gradient(105deg, var(--vibrant-gold), var(--vibrant-pink) 47%, var(--vibrant-lilac) 87%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
:root[data-theme="colorful"] .hero-role { color: var(--vibrant-mint); }
:root[data-theme="colorful"] .hero-visual { border-color: var(--vibrant-lilac); }
:root[data-theme="colorful"] .project-card[data-category="design"] { --category-color: var(--vibrant-mint); }
:root[data-theme="colorful"] .project-card[data-category="web"] { --category-color: var(--vibrant-sky); }
:root[data-theme="colorful"] .project-card[data-category="java"] { --category-color: var(--vibrant-gold); }
:root[data-theme="colorful"] .project-card[data-category="game"] { --category-color: var(--vibrant-pink); }
:root[data-theme="colorful"] .project-card {
  border-top: 3px solid var(--category-color);
  background: color-mix(in srgb, var(--white) 93%, var(--category-color));
}
:root[data-theme="colorful"] .project-card .card-category { color: var(--category-color); }
:root[data-theme="colorful"] .stack-details summary { color: var(--vibrant-mint); }
:root[data-theme="colorful"] .social-tile:nth-child(3n+1) { color: var(--vibrant-mint); }
:root[data-theme="colorful"] .social-tile:nth-child(3n+2) { color: var(--vibrant-sky); }
:root[data-theme="colorful"] .social-tile:nth-child(3n) { color: var(--vibrant-pink); }
@media (max-width: 760px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 0 10px; padding-top: 9px; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; }
  .header-actions { grid-column: 2; grid-row: 1; }
}
@media (max-width: 440px) {
  .header-actions { gap: 5px; }
  .header-github { width: 44px; min-height: 44px; padding-inline: 0; }
  .header-github span { display: none; }
}

.repository-card .project-body { min-height: 150px; }
.repository-card .project-body h3 { font-size: clamp(1.2rem, 2.3vw, 1.7rem); }
:root[data-theme="colorful"] {
  --paper: #fff6eb;
  --white: #fffcf7;
  --ink: #301b38;
  --muted: #5d425e;
  --line: #d9b7c8;
  --strong-line: #98728f;
  --accent: #7740a1;
  --accent-deep: #602d88;
  --on-accent: #fff8ff;
  --soft: #f2e3fd;
  --soft-hover: #e9d1fb;
  --header: #fff4fd;
  --highlight: #b969c548;
  --secondary-accent: #9a3926;
  --vibrant-lilac: #7540a3;
  --vibrant-mint: #176451;
  --vibrant-gold: #865300;
  --vibrant-pink: #a72a62;
  --vibrant-sky: #1a608c;
  color-scheme: light;
}
:root[data-theme="colorful"] body {
  background:
    radial-gradient(ellipse at 94% 3%, #ffabc6 0, transparent 39rem),
    radial-gradient(ellipse at 4% 12%, #ffe09d 0, transparent 36rem),
    radial-gradient(ellipse at 4% 42%, #cbb4fd 0, transparent 48%),
    radial-gradient(ellipse at 96% 58%, #abecd6 0, transparent 46%),
    radial-gradient(ellipse at 15% 90%, #ffcab0 0, transparent 44%),
    var(--paper);
}
:root[data-theme="colorful"] .hero h1 > span {
  background-image: linear-gradient(105deg, #96334e, #732691 55%, #285d8b 95%);
}
:root[data-theme="colorful"] .project-card { background: var(--category-surface, #f8eafa); }
:root[data-theme="colorful"] .project-card[data-category="design"] { --category-surface: #e3f7ed; }
:root[data-theme="colorful"] .project-card[data-category="web"] { --category-surface: #e5f3ff; }
:root[data-theme="colorful"] .project-card[data-category="java"] { --category-surface: #fff0cc; }
:root[data-theme="colorful"] .project-card[data-category="game"] { --category-surface: #ffe7f1; }
:root[data-theme="colorful"] .project-card[data-category="repository"] { --category-color: var(--vibrant-lilac); }
:root[data-theme="colorful"] .about-facts article:first-child { background: #f0e5ff; }
:root[data-theme="colorful"] .about-facts article:last-child { background: #dff5ea; }
:root[data-theme="colorful"] .contact-inner {
  background: linear-gradient(112deg, #ffe1b0, #f8d7ee 48%, #daf7e7);
}

.palette-picker { border-top: 1px solid var(--line); padding: 6px 8px 8px; }
.palette-picker label { min-height: 25px; padding: 0; font-size: .85rem; font-weight: 700; }
.palette-picker select { width: 100%; min-height: 39px; padding: 5px 8px; color: var(--ink); background: var(--paper); border: 1px solid var(--strong-line); border-radius: 6px; }
:root[data-theme="colorful"] {
  --palette-one: #ffabc6;
  --palette-two: #ffe09d;
  --palette-three: #cbb4fd;
  --palette-four: #abecd6;
  --palette-five: #ffcab0;
  --palette-ink-one: #96334e;
  --palette-ink-three: #732691;
  --palette-ink-four: #285d8b;
}
:root[data-theme="colorful"][data-palette="sunset"] {
  --paper: #fff4e7; --header: #fff5ef; --accent: #a2394c; --accent-deep: #80253a; --soft: #ffe2d5;
  --palette-one: #ffa299; --palette-two: #ffd074; --palette-three: #f3a8b8; --palette-four: #ffc184; --palette-five: #efacd1;
  --palette-ink-one: #942d49; --palette-ink-three: #a13d11; --palette-ink-four: #7d385d;
}
:root[data-theme="colorful"][data-palette="ocean"] {
  --paper: #effcff; --header: #effbff; --accent: #16617c; --accent-deep: #0a4a65; --soft: #ddf4fc;
  --palette-one: #9bd9ff; --palette-two: #b7f6de; --palette-three: #aabcf5; --palette-four: #86e6dc; --palette-five: #9fdafb;
  --palette-ink-one: #176d86; --palette-ink-three: #3d4e9c; --palette-ink-four: #176a5d;
}
:root[data-theme="colorful"][data-palette="orchid"] {
  --paper: #faf1ff; --header: #fbf1ff; --accent: #783990; --accent-deep: #5d2775; --soft: #f2dcfb;
  --palette-one: #dda1f5; --palette-two: #ffb7d2; --palette-three: #c1a9fa; --palette-four: #e7aedf; --palette-five: #bbc0ff;
  --palette-ink-one: #8f357a; --palette-ink-three: #673798; --palette-ink-four: #454d98;
}
:root[data-theme="colorful"][data-palette="citrus"] {
  --paper: #feffed; --header: #ffffef; --accent: #4f6728; --accent-deep: #3e551b; --soft: #edf5d4;
  --palette-one: #fce27b; --palette-two: #d9ee95; --palette-three: #ffc373; --palette-four: #b7ebad; --palette-five: #ffe7a1;
  --palette-ink-one: #746114; --palette-ink-three: #99501d; --palette-ink-four: #3f7143;
}
:root[data-theme="colorful"][data-palette="aurora"] {
  --paper: #edfaff; --header: #eff9ff; --accent: #3c5489; --accent-deep: #2c3e73; --soft: #dff6ec;
  --palette-one: #a7aefa; --palette-two: #a4f3d2; --palette-three: #ebb2f4; --palette-four: #a8e1ff; --palette-five: #d2ecac;
  --palette-ink-one: #5651a3; --palette-ink-three: #813686; --palette-ink-four: #286777;
}
:root[data-theme="colorful"] body {
  background:
    radial-gradient(ellipse at 94% 3%, var(--palette-one) 0, transparent 39rem),
    radial-gradient(ellipse at 4% 12%, var(--palette-two) 0, transparent 36rem),
    radial-gradient(ellipse at 4% 42%, var(--palette-three) 0, transparent 48%),
    radial-gradient(ellipse at 96% 58%, var(--palette-four) 0, transparent 46%),
    radial-gradient(ellipse at 15% 90%, var(--palette-five) 0, transparent 44%), var(--paper);
}
:root[data-theme="colorful"] .hero h1 > span {
  background-image: linear-gradient(105deg, var(--palette-ink-one), var(--palette-ink-three) 55%, var(--palette-ink-four) 95%);
}
:root[data-theme="colorful"] .project-card[data-category="design"] { --category-surface: color-mix(in srgb, var(--white) 60%, var(--palette-four)); }
:root[data-theme="colorful"] .project-card[data-category="web"] { --category-surface: color-mix(in srgb, var(--white) 66%, var(--palette-three)); }
:root[data-theme="colorful"] .project-card[data-category="java"] { --category-surface: color-mix(in srgb, var(--white) 60%, var(--palette-two)); }
:root[data-theme="colorful"] .project-card[data-category="game"] { --category-surface: color-mix(in srgb, var(--white) 62%, var(--palette-one)); }
:root[data-theme="colorful"] .contact-inner {
  background: linear-gradient(112deg, var(--palette-two), var(--palette-one) 50%, var(--palette-four));
}

.project-cover { display: block; min-height: 0; aspect-ratio: 2; }
.project-cover img, .dialog-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2; object-fit: cover; }
.dialog-cover { overflow: hidden; margin-block: 17px; border: 1px solid var(--line); border-radius: 10px; }
.dialog-links { margin-bottom: 15px; }

:root[data-theme="colorful"][data-palette^="night-"] {
  color-scheme: dark;
  --ink: #f7f3fa;
  --muted: #c3c0ce;
  --on-accent: #100e17;
  --category-surface: var(--white);
  --vibrant-lilac: #d6baff;
  --vibrant-mint: #8ceac5;
  --vibrant-gold: #ffda94;
  --vibrant-pink: #ffb2d8;
  --vibrant-sky: #a9e5ff;
  --secondary-accent: var(--vibrant-gold);
}
:root[data-theme="colorful"][data-palette="night-neon"] {
  --paper: #090813; --white: #171326; --header: #100d1d;
  --line: #382e4b; --strong-line: #78638d; --soft: #2a203c; --soft-hover: #3b2c52;
  --accent: #d8b5ff; --accent-deep: #efd9ff; --highlight: #b377e445;
  --palette-one: #35123d; --palette-two: #191c39; --palette-three: #251643;
  --palette-four: #10323f; --palette-five: #231433;
  --palette-ink-one: #ff9edb; --palette-ink-three: #d8b5ff; --palette-ink-four: #96f1ff;
}
:root[data-theme="colorful"][data-palette="night-forest"] {
  --paper: #070f0d; --white: #101f1a; --header: #0b1713;
  --line: #254539; --strong-line: #5d877a; --soft: #1b3229; --soft-hover: #294539;
  --accent: #91ebba; --accent-deep: #b3ffd0; --highlight: #629d7945;
  --palette-one: #163d30; --palette-two: #2b2c15; --palette-three: #132d30;
  --palette-four: #173937; --palette-five: #302718;
  --palette-ink-one: #b7ef93; --palette-ink-three: #84edc5; --palette-ink-four: #b3e8ff;
}
:root[data-theme="colorful"][data-palette="night-ember"] {
  --paper: #10090b; --white: #211518; --header: #170e11;
  --line: #442d34; --strong-line: #98717a; --soft: #382127; --soft-hover: #4f2c36;
  --accent: #ffb18f; --accent-deep: #ffd2ac; --highlight: #d27a5845;
  --palette-one: #41222a; --palette-two: #332013; --palette-three: #382039;
  --palette-four: #2f1824; --palette-five: #3c231c;
  --palette-ink-one: #ffd18a; --palette-ink-three: #ff9d88; --palette-ink-four: #ffb1d5;
}
:root[data-theme="colorful"][data-palette^="night-"] .about-facts article:first-child {
  background: var(--palette-three);
}
:root[data-theme="colorful"][data-palette^="night-"] .about-facts article:last-child {
  background: var(--palette-four);
}

/* Project list expansion controls */
.project-view-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:0 0 18px; }
.project-view-controls #filter-status { margin:0; color:var(--muted); font-size:.9rem; }
.project-view-footer { display:flex; justify-content:center; margin-top:24px; }
.project-view-controls .button, .project-view-footer .button { cursor:pointer; min-height:44px; }
@media(max-width:600px){ .project-view-controls .button,.project-view-footer .button{width:100%;} }
