@font-face {
    font-family: "IBM Plex Sans";
    src: url("fonts/ibm-plex-sans.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 700;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/ibm-plex-mono.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("fonts/ibm-plex-mono-medium.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

* { box-sizing: border-box; }
body { margin: 0; background: #1b1d20; }
html:has([data-theme="light"]) { background: #fafbfc; color-scheme: light; }
html:has([data-theme="dark"]) { color-scheme: dark; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul { margin: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--selected); color: var(--text); }

.portfolio {
    --bg: #1b1d20;
    --side: #15171a;
    --panel: #23262a;
    --raised: #2c3035;
    --line: #383d43;
    --text: #eef0f2;
    --muted: #a9afb7;
    --accent: #adbed0;
    --selected: #2c3743;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    background: var(--bg);
    color: var(--text);
    font: 400 15px/22px "IBM Plex Sans", sans-serif;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}
.portfolio[data-theme="light"] {
    --bg: #fafbfc;
    --side: #eff1f3;
    --panel: #fff;
    --raised: #e8ecf0;
    --line: #d4dae0;
    --text: #252b32;
    --muted: #5e6b79;
    --accent: #486987;
    --selected: #e2ebf3;
}
.muted { color: var(--muted); }
.mono { font: 400 12px/20px "IBM Plex Mono", monospace; }
.label { font-size: 11px; font-weight: 500; line-height: 18px; }
.content-width { width: min(900px, 100%); }
.mobile-only, .theme-toggle.mobile-theme { display: none; }
.icon { --icon-size: 18px; display: inline-flex; align-items: center; justify-content: center; width: var(--icon-size); height: var(--icon-size); flex: 0 0 auto; }
.icon-12 { --icon-size: 12px; }
.icon-15 { --icon-size: 15px; }
.icon-16 { --icon-size: 16px; }
.icon-20 { --icon-size: 20px; }
.icon picture { display: contents; }
.icon img { display: block; flex: none; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 8px; }
.icon-button:hover { background: var(--raised); }
.welcome-canvas { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px; }
.welcome-composition { display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: center; gap: 48px; }
.welcome-copy { display: flex; flex-direction: column; min-width: 0; gap: 32px; }
.identity-and-theme { display: flex; align-items: flex-start; justify-content: space-between; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 16px; object-fit: cover; }
.hero-name { min-width: 0; font-size: 64px; line-height: 68px; letter-spacing: -1.5px; font-weight: 500; }
.hero-name > span { display: block; }
.hero-name > span:last-child { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.personal-cursor { display: inline-block; flex: 0 0 auto; width: 6px; height: 48px; background: var(--accent); }
.welcome-description { font-size: 18px; line-height: 28px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.shortcut { display: flex; align-items: center; justify-content: center; min-width: 0; height: 64px; padding: 20px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; background: var(--panel); font: 400 14px/24px "IBM Plex Mono", monospace; }
.shortcut:hover, .project:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.contact-email:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-canvas { display: flex; flex: 1; justify-content: center; min-width: 0; }
.page-content { display: flex; flex-direction: column; gap: 32px; width: min(900px, calc(100% - 64px)); margin: 64px 32px 48px; }
.page-introduction { display: flex; flex-direction: column; gap: 16px; }
.page-controls { display: none; }
.page-meta { display: flex; align-items: center; justify-content: space-between; color: var(--accent); }
.page-introduction h1 { font-size: 40px; line-height: 48px; letter-spacing: -.8px; font-weight: 500; }
.page-description { font-size: 18px; line-height: 28px; }
.project { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 206px; padding: 24px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; background: var(--panel); }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-top h2 { min-width: 0; font-size: 22px; line-height: 28px; font-weight: 500; }
.project-stack { margin-top: auto; padding-top: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.featured-project { flex-direction: row; align-items: center; gap: 32px; padding: 32px; border-radius: 16px; }
.featured-copy { display: flex; flex: 0 0 328px; flex-direction: column; align-items: flex-start; gap: 16px; }
.featured-copy > .label { color: var(--accent); }
.featured-copy h2 { font-size: 32px; line-height: 40px; font-weight: 500; }
.open-project { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.launcher-preview { display: flex; flex: 1; flex-direction: column; gap: 16px; min-width: 0; padding: 24px; border-radius: 12px; background: var(--side); }
.launcher-heading { display: flex; justify-content: space-between; align-items: center; }
.launcher-query { display: flex; height: 44px; align-items: center; gap: 10px; padding: 0 12px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 8px; background: var(--panel); }
.query-cursor { width: 2px; height: 18px; background: var(--accent); }
.launcher-result { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; background: var(--selected); }
.launcher-result > div { flex: 1; min-width: 0; }
.result-title { font-weight: 500; }
.result-description { font-size: 13px; line-height: 20px; }
.launcher-hints { display: flex; gap: 20px; }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 0; min-height: 206px; padding: 24px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; background: var(--side); }
.contact-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.contact-card h2 { font-size: 24px; line-height: 32px; font-weight: 500; }
.contact-email { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.profile-panel { display: flex; flex-direction: column; gap: 24px; padding: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 18px; line-height: 28px; }
.profile-panel h2 { font-size: 24px; line-height: 32px; font-weight: 500; }
.stack-list { display: flex; flex-wrap: wrap; gap: 12px 20px; list-style: none; padding: 0; color: var(--accent); }
.text-link { color: var(--accent); }

@media (min-width: 720px) and (max-width: 999px) {
    .welcome-composition { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; }
    .hero-name { font-size: 48px; line-height: 54px; }
    .featured-project { gap: 24px; padding: 24px; }
    .featured-copy { flex-basis: 42%; }
    .launcher-preview { padding: 16px; }
    .launcher-hints { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 719px) {
    .desktop-only { display: none; }
    .mobile-only { display: inline; }
    .theme-toggle.mobile-theme { display: inline-flex; }
    .welcome-canvas { justify-content: flex-start; padding: 32px 24px 40px; }
    .welcome-composition { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .welcome-copy { gap: 24px; container-type: inline-size; }
    .identity-and-theme { width: 100%; justify-content: space-between; gap: 12px; }
    .portrait { height: clamp(280px, calc(100vw - 110px), 420px); aspect-ratio: auto; }
    .hero-name { font-size: 40px; line-height: 44px; letter-spacing: -.7px; }
    .hero-name > span:last-child { gap: 6px; }
    .personal-cursor { width: 4px; height: 28px; }
    .welcome-description { font-size: 15px; line-height: 22px; }
    .page-content { gap: 24px; width: calc(100% - 48px); margin: 40px 24px 32px; }
    .page-controls { display: flex; justify-content: space-between; align-items: center; height: 44px; }
    .back-link { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; color: var(--accent); }
    .page-meta { display: none; }
    .page-introduction h1 { font-size: 32px; line-height: 40px; letter-spacing: 0; }
    .page-description { font-size: 15px; line-height: 22px; }
    .featured-project { flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; border-radius: 12px; }
    .featured-copy { flex-basis: auto; }
    .launcher-preview { flex: none; padding: 16px; }
    .launcher-heading, .launcher-hints, .result-description { display: none; }
    .launcher-query { height: 32px; padding: 0; box-shadow: none; border-radius: 0; background: transparent; }
    .project-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .project-grid .project { min-height: 206px; }
    .profile-panel { padding: 24px; font-size: 15px; line-height: 24px; }
}

@container (max-width: 319px) {
    .hero-name { font-size: 32px; line-height: 38px; }
}

@container (max-width: 267px) {
    .hero-name { font-size: 30px; line-height: 36px; }
}

@media (max-width: 359px) {
    .portrait { height: 240px; }
}
