/* ArthurOS: typography, wallpaper and layout refinements. */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans.ttf') format('truetype');
  font-display: swap;
  font-style: normal;
  font-weight: 100 700;
}
:root { --retro-font: 'IBM Plex Sans', Tahoma, sans-serif; }
:root[data-background="xp"] .wallpaper {
  background: #247cce url('assets/xp-hills.png') center center / cover no-repeat;
}
.desktop-icon > span {
  font-family: var(--retro-font);
  font-size: 17px;
  line-height: 1.05;
  color: #fff;
  text-shadow: 1px 1px 2px #132c49, -1px -1px 1px #132c4966;
}
.desktop-icon { min-height: 84px; }
.desktop-tip { color: #fff; text-shadow: 1px 1px 3px #213d33; }
.desktop-corner {
  position: absolute;
  top: 27px;
  right: 28px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  z-index: 1;
}
.desktop-corner .desktop-note {
  display: block;
  position: relative;
  inset: auto;
  margin: 0;
  width: 193px;
}
.desktop-corner .desktop-signature {
  position: static;
  margin-top: 4px;
  color: #fff;
  font: 26px/1 var(--retro-font);
  letter-spacing: 0;
  white-space: nowrap;
  gap: 7px;
  text-shadow: 1px 2px 2px #23446c;
}
.desktop-signature .tiny-spark {
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 22px;
}
.welcome-content h1 {
  font-family: var(--retro-font);
  font-size: 98px;
  line-height: .8;
  font-weight: 400;
  letter-spacing: -1px;
}
.welcome-intro { font: 24px/1.1 var(--retro-font); }
.welcome-description { font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.65; }
.window-title { font: 19px/1 var(--retro-font); }
.window-menu button { font: 17px/1 var(--retro-font); }
.app-button { font: 18px/1 var(--retro-font); }
.task-button { font: 16px/1 var(--retro-font); }
.start-brand { font-family: var(--retro-font); font-size: 29px; font-weight: 400; }
.start-content button { font: 18px/1 var(--retro-font); }
.start-profile strong { font: 19px/1 var(--retro-font); }
#start-button { font-family: var(--retro-font); font-size: 21px; }
#start-button strong { font-weight: 400; }
.notepad h2, .appearance h2 { font: 30px/1.1 var(--retro-font); letter-spacing: 0; }
.detail-header h2 { font: 34px/1 var(--retro-font); }
.empty-state h2 { font: 30px/1 var(--retro-font); }
.project-folder .project-name { font: 17px/1.05 var(--retro-font); }
.project-folder small { font-family: var(--retro-font); font-size: 14px; padding: 1px 5px; }
.project-note { line-height: 1.55; }
.contact-line { align-items: baseline; }
.contact-line > span:first-child { flex-shrink: 0; }
.contact-line a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* The scrolling container and its growing content both keep the dark surface. */
[data-window="terminal"] .window-body {
  background: #222c3b;
  color-scheme: dark;
  scrollbar-color: #718199 #222c3b;
}
.terminal-body {
  height: auto;
  min-height: 100%;
  background: #222c3b;
  color: #e0eadf;
  font-family: var(--retro-font);
  font-size: 19px;
  line-height: 1.25;
}
.terminal-prompt label, .terminal-prompt input { font-size: inherit; }
.terminal-answer { color: #c1cede; }
.terminal-welcome { color: #b3cfdd; }
.swatches { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; }
.swatch { font: 16px/1.1 var(--retro-font); padding: 5px 3px; }
.swatch-color { width: 100%; max-width: 80px; height: 48px; }
.swatch-color.is-wallpaper { background: url('assets/xp-hills.png') center / cover; }
@media(min-width:701px) and (max-height:820px) {
  .welcome-content h1 { font-size: 90px; }
  .welcome-content { padding-top: 20px; padding-bottom: 17px; }
  .welcome-topline { margin-bottom: 12px; }
  .welcome-bottom { margin-top: 17px; }
  .welcome-description { margin-bottom: 18px; }
}
@media(max-width:1100px) and (min-width:701px) {
  .desktop-corner { right: 20px; top: 20px; gap: 15px; }
  .desktop-corner .desktop-note { width: 180px; }
}
@media(max-width:700px) {
  .desktop-corner { inset: 0; display: block; pointer-events: none; }
  .desktop-corner .desktop-signature { position: absolute; right: 19px; top: 12px; margin: 0; font-size: 25px; }
  .desktop-corner .desktop-note { position: absolute; right: 27px; bottom: 76px; top: auto; width: 183px; }
  .desktop-icon { min-height: 88px; }
  .desktop-icon > span { font-size: 17px; }
  .welcome-content h1 { font-size: 92px; letter-spacing: -1px; }
  .welcome-intro { font-size: 23px; }
  .welcome-description { font-size: 12px; }
  .hero-art { top: 130px; }
  .window-title { font-size: 18px; }
  .window-menu button { padding: 6px 8px; font-size: 17px; }
  .window-status { gap: 3px; font-size: 8px; }
  .window-status .status-right { padding-left: 7px; font-size: 8px; }
  #start-button { font-size: 20px; }
  .notepad h2 { font-size: 28px; }
  .project-folder .project-name { font-size: 20px; }
  .terminal-body { font-size: 19px; }
  .terminal-prompt label { font-size: 17px; }
}
@media(max-width:360px) { .welcome-content h1 { font-size: 82px; } }
@media(max-height:600px) { .desktop-corner .desktop-note { display: none; } }

/* Softer, screen-friendly type inspired by classic desktop interfaces. */
.desktop-icon > span { font-size: 13px; line-height: 1.25; font-weight: 500; }
.desktop-corner .desktop-signature { font-size: 20px; font-weight: 600; }
.welcome-content h1 { font-size: 64px; line-height: 1; letter-spacing: -1.5px; font-weight: 600; }
.welcome-intro { font-size: 19px; line-height: 1.3; }
.welcome-description { font-family: var(--retro-font); font-size: 14px; line-height: 1.6; }
.window-title { font-size: 13px; font-weight: 600; }
.window-menu button { font-size: 13px; }
.app-button { font-size: 14px; font-weight: 500; }
.task-button { font-size: 13px; }
.start-brand { font-size: 23px; font-weight: 600; }
.start-content button { font-size: 14px; }
.start-profile strong { font-size: 14px; font-weight: 600; }
#start-button { font-size: 16px; }
#start-button strong { font-weight: 600; }
.notepad h2, .appearance h2 { font-size: 23px; font-weight: 600; }
.detail-header h2 { font-size: 25px; font-weight: 600; }
.empty-state h2 { font-size: 23px; font-weight: 600; }
.project-folder .project-name { font-size: 14px; line-height: 1.25; }
.project-folder small { font-size: 12px; }
.terminal-body { font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.5; }
.swatch { font-size: 13px; }
@media(max-width:700px) {
  .desktop-corner .desktop-signature { font-size: 20px; }
  .desktop-icon > span { font-size: 13px; }
  .welcome-content h1 { font-size: 58px; letter-spacing: -1px; }
  .welcome-intro { font-size: 18px; }
  .welcome-description { font-size: 14px; }
  .window-title { font-size: 13px; }
  .window-menu button { font-size: 13px; }
  #start-button { font-size: 16px; }
  .notepad h2 { font-size: 22px; }
  .project-folder .project-name { font-size: 14px; }
  .terminal-body, .terminal-prompt label { font-size: 14px; }
}
@media(max-width:360px) { .welcome-content h1 { font-size: 52px; } }

/* Lower corners resize desktop windows. */
.resize-handle { position:absolute; bottom:0; width:16px; height:16px; z-index:5; touch-action:none; }
.resize-left { left:0; cursor:nesw-resize; }
.resize-right { right:0; cursor:nwse-resize; }
.resize-handle::after { content:''; position:absolute; bottom:3px; width:9px; height:9px; opacity:.5; background:repeating-linear-gradient(135deg, transparent 0 2px, #70777a 2px 3px, transparent 3px 5px); }
.resize-left::after { left:3px; transform:scaleX(-1); }
.resize-right::after { right:3px; }
.window.is-maximized .resize-handle { display:none; }
@media(max-width:700px) { .resize-handle { display:none; } }

/* Thumbnail view and project sheets inside the desktop windows. */
.project-gallery {
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(78px, 100%), 1fr));
  grid-auto-rows: max-content;
  align-items: stretch;
}
.project-tile {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  gap: 5px;
}
.project-tile img, .project-folder-preview {
  width: 100%;
  max-width: 145px;
  aspect-ratio: 16 / 10;
  background: #e7e8e2;
  border: 1px solid #a5a9a2;
}
.project-tile img { display: block; object-fit: cover; }
.project-folder-preview { display: grid; place-items: center; }
.compact .project-folder-preview svg { width: 34px; height: 34px; }
.portfolio-detail { height: auto; min-height: 100%; overflow-wrap: anywhere; }
.portfolio-detail p { font-size: 1rem; line-height: 1.5; }
.project-technologies { margin-block: 10px; }
.project-technologies .tech-tag { margin-inline: 0 5px; font-size: 12px; }
.project-preview { margin: 14px 0 16px; }
.project-preview img, .project-preview video {
  display: block;
  width: 100%;
  max-height: 420px;
  border: 1px solid #a5a9a2;
  object-fit: contain;
  background: #222c3b;
}
.project-preview figcaption { margin-top: 5px; color: #5b6370; font-size: 13px; }
.contribution-list { list-style: none; margin: 14px 0 20px; padding: 0; }
.contribution-list li { border-top: 1px solid #cbd0d6; padding-block: 12px; }
.contribution-list h3 { margin: 0; font-size: 1rem; }
.contribution-list p { margin-block: 5px; }
.contribution-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.contribution-meta a { color: #234987; }
.contribution-meta span { color: #5b6370; }

@media (max-width: 700px) {
  .project-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-tile img, .project-folder-preview { max-width: 180px; }
}

.compact .project-tile .project-name { font-size: 13px; }
.portfolio-detail .detail-header > svg { width: 48px; height: 48px; flex: none; }
.project-preview video { max-height: 245px; }
@media (max-width: 700px) {
  .compact .project-tile .project-name { font-size: 14px; }
}
