:root { color-scheme: dark; }
* { box-sizing: border-box; }
a, button, summary, [role="button"] { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
html { scroll-behavior: smooth; }
body.portfolio {
  --background: #080b0d;
  --foreground: #f3f6f6;
  --card: #0c1012e8;
  --border: #394247;
  --muted: #afbec2;
  --accent: #f3f6f6;
  margin: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pixel-background { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.portfolio a { color: inherit; }
.portfolio a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.portfolio-shell { width: min(calc(100% - 40px), 880px); margin: auto; position: relative; z-index: 1; }
.portfolio-header { position: sticky; top: 0; z-index: 10; min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 16px; background: #000; }
.portfolio-mark { display: inline-block; text-decoration: none; font-size: .94rem; font-weight: 700; letter-spacing: -.02em; }
.portfolio-header nav { display: flex; flex-wrap: wrap; gap: 20px; }
.portfolio-header nav a { color: #b8c5c9; text-decoration: none; font: .7rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.portfolio-header nav a:hover, .portfolio-header nav a[aria-current] { color: var(--accent); }
.project-tags, .app-state { font: .7rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.portfolio-hero { margin: 30px 0; padding: 54px 0 58px; }
.portfolio-hero h1 { margin: 0 0 19px; font-size: clamp(3rem, 7vw, 4.8rem); line-height: 1; letter-spacing: -.07em; font-weight: 650; }
.portfolio-lead { max-width: 590px; margin: 0; color: #c5d0d3; font-size: clamp(1rem, 2vw, 1.17rem); line-height: 1.55; }
.portfolio-actions, .contact-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.portfolio-actions .ui-button { width: 140px; }
/* Compact button/card primitives keep the shadcn/ui feel without a JS bundle. */
.ui-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; height: 36px; padding: 0 13px; border: 0; border-radius: 0; font-size: .78rem; line-height: 1; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.ui-button-primary { background: #edf2f3; color: #081014 !important; }
.ui-button-primary:hover { background: #000; color: #fff !important; }
.ui-button-outline { background: #000; color: #edf3f4 !important; }
.ui-button-outline:hover { background: #fff; color: #000 !important; }
.ui-card { background: var(--card); border: 0; border-radius: 2px; }
.portfolio-section { border-top: 1px solid var(--border); padding: 33px 0 64px; scroll-margin-top: 80px; }
.portfolio-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.portfolio-section h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 600; letter-spacing: -.035em; }
.project-list { display: grid; gap: 8px; }
.project-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; padding: 17px 20px; text-decoration: none; transition: background .15s; }
.project-card img { width: 72px; height: 72px; object-fit: cover; border-radius: 22.4%; }
.project-card { background: #000; }
.project-card:hover { background: #fff; color: #000; }
.project-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.project-copy strong { font-size: .97rem; font-weight: 600; letter-spacing: -.015em; }
.project-copy > span:nth-child(2) { color: #bdc9cc; font-size: .81rem; line-height: 1.45; }
.project-card:hover .project-copy > span:nth-child(2), .project-card:hover .project-tags { color: #30383b; }
.project-tags { margin-top: 8px; color: #aab5b9; font-size: .66rem; letter-spacing: .02em; }
.project-tags i { font-style: normal; padding: 0 3px; }
.portfolio-about, .portfolio-contact { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 35px; align-items: start; }
.portfolio-about > p { margin: 0; max-width: 510px; color: #bdc9cc; font-size: .87rem; line-height: 1.7; }
.portfolio-contact { align-items: center; padding-bottom: 60px; }
.portfolio-contact .contact-links { margin: 0; }
.portfolio-contact .ui-button { width: 90px; }
.portfolio-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--border); padding: 19px 0 34px; color: #95a6ab; font-size: .72rem; }
/* /apps/ uses the same site shell; individual app pages use their own CSS. */
.directory-intro { padding: 58px 0 30px; }
.directory-intro h1 { margin: 0 0 12px; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.065em; font-weight: 650; }
.directory-intro p:last-child { max-width: 540px; margin: 0; color: #bdc9cc; font-size: .96rem; }
.directory-list { display: grid; gap: 8px; }
.directory-card { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 18px; text-decoration: none; transition: background .15s; }
.directory-card { background: #000; }
.directory-card:hover { background: #fff; color: #000; }
.directory-card img { width: 80px; height: 80px; object-fit: cover; border: 0; border-radius: 22.4%; filter: none; }
.directory-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.directory-copy strong { font-size: .98rem; font-weight: 600; }
.directory-copy > span:nth-child(2) { color: #bdc9cc; font-size: .8rem; line-height: 1.4; }
.directory-card:hover .directory-copy > span:nth-child(2), .directory-card:hover .app-state { color: #30383b; }
.app-state { margin-top: 5px; color: #91a4aa; font-size: .64rem; }
.directory-main { min-height: calc(100vh - 120px); }
@media (max-width: 650px) {
  .portfolio-shell { width: min(calc(100% - 32px), 880px); }
  .portfolio-header { display: block; min-height: 0; padding: 10px 16px 11px; }
  .portfolio-mark { display: block; margin-bottom: 7px; }
  .portfolio-header nav { justify-content: space-between; gap: 7px; }
  .portfolio-header nav a { font-size: .62rem; }
  .portfolio-hero { margin: 24px 0; padding: 43px 0 47px; }
  .portfolio-section { padding: 29px 0 52px; }
  .portfolio-about, .portfolio-contact { grid-template-columns: 1fr; gap: 16px; }
  .portfolio-contact { padding-bottom: 54px; }
  .project-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 15px 13px; }
  .project-card img { width: 64px; height: 64px; }
  .project-tags { font-size: .61rem; }
  .directory-intro { padding: 48px 0 28px; }
  .directory-card { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .directory-card img { width: 64px; height: 64px; }
}
