@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; gap: 32px; padding: 80px 24px 48px; }
.welcome-identity { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.identity-and-theme { display: flex; align-items: center; justify-content: center; }
.greeting { display: flex; align-items: center; gap: 12px; min-width: 0; }
.portrait { display: block; width: 56px; height: 56px; flex: 0 0 auto; border-radius: 16px; object-fit: cover; }
.greeting-title { font-weight: 500; }
.greeting-role { margin-top: 4px; }
.hero-name { font-size: 64px; line-height: 68px; letter-spacing: -1.5px; font-weight: 500; text-align: center; }
.hero-name > span { display: block; }
.hero-name > span:last-child { display: flex; align-items: center; justify-content: center; gap: 10px; }
.personal-cursor { display: inline-block; width: 6px; height: 48px; background: var(--accent); }
.welcome-description { max-width: 660px; font-size: 18px; line-height: 28px; text-align: center; }
.shortcuts { display: flex; flex-direction: column; gap: 16px; }
.section-label { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 11px; font-weight: 500; line-height: 18px; }
.section-label h2 { font: inherit; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shortcut { display: flex; flex-direction: column; gap: 12px; padding: 24px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; background: var(--panel); }
.shortcut-top { display: flex; align-items: center; justify-content: space-between; }
.shortcut-index, .shortcut-chevron { display: none; }
.shortcut-copy { display: flex; flex-direction: column; gap: 12px; }
.shortcut h3 { font-size: 15px; line-height: 22px; font-weight: 500; }
.shortcut-copy p { font-size: 13px; line-height: 20px; }
.shortcut:hover, .project:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.pinned-project { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 16px; align-items: center; column-gap: 20px; padding: 16px 20px; border-radius: 10px; background: var(--side); }
.pinned-title { font-weight: 500; }
.pinned-description { margin-top: 4px; font-size: 13px; line-height: 20px; }
.pinned-action { color: var(--accent); }
.pinned-project:hover { background: var(--raised); }
.site-footer { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 13px; line-height: 20px; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-links { display: flex; align-items: center; gap: 24px; }
.footer-links a:hover, .contact-email:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.home-footer { margin-top: auto; border: 0; padding: 0; }
.home-footer .footer-links { display: none; }
.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) {
    .hero-name { font-size: 56px; line-height: 62px; }
    .shortcut-grid { gap: 16px; }
    .shortcut { padding: 20px; }
    .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 { flex: 1; align-items: stretch; padding: 40px 24px 32px; }
    .welcome-identity { gap: 24px; }
    .identity-and-theme { width: 100%; justify-content: space-between; gap: 12px; }
    .greeting { flex: 1; }
    .greeting > div { min-width: 0; }
    .portrait { width: 48px; height: 48px; border-radius: 12px; }
    .hero-name { font-size: 34px; line-height: 40px; letter-spacing: -.7px; }
    .hero-name > span:last-child { gap: 6px; }
    .personal-cursor { width: 4px; height: 28px; }
    .welcome-description { font-size: 15px; line-height: 22px; }
    .shortcuts { gap: 12px; }
    .section-label { padding: 0; }
    .shortcut-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .shortcut { flex-direction: row; align-items: center; gap: 12px; padding: 20px; }
    .shortcut-top { display: none; }
    .shortcut-index, .shortcut-chevron { display: inline-flex; }
    .shortcut-index { color: var(--accent); }
    .shortcut-copy { flex: 1; min-width: 0; gap: 4px; }
    .pinned-project { grid-template-columns: 16px minmax(0, 1fr) 16px; gap: 12px 10px; padding: 20px; border-radius: 12px; }
    .pinned-project > .icon:first-child { --icon-size: 16px; }
    .pinned-copy { display: contents; }
    .pinned-title { grid-column: 2; grid-row: 1; }
    .pinned-project > .icon:last-child { grid-column: 3; grid-row: 1; }
    .pinned-description { grid-column: 1 / -1; grid-row: 2; margin: 0; }
    .pinned-action, .footer-summary { display: none; }
    .home-footer { margin-top: 0; border-top: 1px solid var(--line); padding-top: 24px; }
    .home-footer .footer-links { display: flex; }
    .footer-links { gap: 16px; }
    .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; }
    .footer-name { display: none; }
    .profile-panel { padding: 24px; font-size: 15px; line-height: 24px; }
}

@media (max-width: 359px) {
    .hero-name { font-size: 32px; }
    .footer-main { gap: 8px; }
    .footer-links { gap: 12px; }
}
