/* ==========================================================================
   apps.css - the Windows 8 app shell plus the individual apps.

   Every Modern app shared one silhouette: a 120px left margin, a large
   lowercase Segoe UI Light page title with a circular back chevron beside it,
   and content that scrolls horizontally as a panorama. That shell lives at
   the top of this file; the apps below only fill it in.
   ========================================================================== */

#appscreen { z-index: 40; }

.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--app-bg, #fff);
  color: var(--app-fg, #1a1a1a);
  overflow: hidden;
}

/* Launch: the app surface scales up out of the tile that spawned it. */
.app.is-entering { animation: app-in 300ms var(--ease-out) both; }
@keyframes app-in {
  from { opacity: 0; transform: scale(1.09); }
  to   { opacity: 1; transform: scale(1); }
}
.app.is-leaving { animation: app-out 240ms var(--ease-in) both; }
@keyframes app-out {
  to { opacity: 0; transform: scale(1.07); }
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.app-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 44px var(--app-edge, clamp(36px, 6vw, 118px)) 18px;
  animation: app-part-in 340ms 40ms var(--ease-out) both;
}

@keyframes app-part-in {
  from { opacity: 0; transform: translateX(56px); }
  to   { opacity: 1; transform: none; }
}

.app-title {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: clamp(34px, 3.6vw, 46px);
  line-height: 1;
  letter-spacing: -0.012em;
  text-transform: lowercase;
}

/* On light app backgrounds the back button needs dark strokes. */
.app.is-light .back-button { border-color: rgba(0, 0, 0, 0.42); color: rgba(0, 0, 0, 0.55); }
.app.is-light .back-button:hover { border-color: #1a1a1a; color: #1a1a1a; }
.app.is-light .back-button:active { background: #1a1a1a; color: #fff; }

/* --------------------------------------------------------------------------
   BODY - horizontal panorama
   -------------------------------------------------------------------------- */
.app-body {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 var(--app-edge, clamp(36px, 6vw, 118px)) 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.35) transparent;
}
.app-body::-webkit-scrollbar { height: 12px; }
.app-body::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.06); }
.app-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.3); }
.app-body::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.48); }

.app.is-dark .app-body { scrollbar-color: rgba(255, 255, 255, 0.4) transparent; }
.app.is-dark .app-body::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.08); }
.app.is-dark .app-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.36); }

/* Vertical variant, for apps that read as a single document. */
.app-body.is-vertical {
  overflow-x: hidden;
  overflow-y: auto;
}

.app-pano {
  display: flex;
  align-items: stretch;
  gap: 56px;
  height: 100%;
  width: max-content;
  padding-bottom: 8px;
}

.app-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 340px;
  flex: none;
  animation: app-part-in 380ms var(--ease-out) both;
  animation-delay: var(--col-delay, 0ms);
}
.app-col { min-height: 0; }
.app-col-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: inherit;
  /* Vertical only. Setting overflow-y alone makes the browser treat x as
     scrollable too, and a sideways trackpad swipe over a column would then
     bounce the column instead of moving the panorama. With x hidden, and
     sideways overscroll left to chain, the swipe reaches the page. */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-x: auto;
  overscroll-behavior-y: contain;
  /* Room for the scrollbar, so it doesn't sit on top of the text. */
  padding-right: 10px;
  margin-right: -10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}
.app.is-dark .app-col-body { scrollbar-color: rgba(255, 255, 255, 0.35) transparent; }
.app-col.is-wide { width: 480px; }
.app-col.is-narrow { width: 260px; }

.app-col-title {
  font-family: var(--font-semilight);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.1;
  padding-bottom: 4px;
}

.app-col-scroll {
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

.app-prose {
  font-size: 15px;
  line-height: 1.55;
  color: var(--app-fg-soft, rgba(0, 0, 0, 0.72));
}
.app-prose + .app-prose { margin-top: 14px; }
.app.is-dark .app-prose { color: rgba(255, 255, 255, 0.78); }

.app-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   ABOUT
   -------------------------------------------------------------------------- */
.about-hero {
  width: 300px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-portrait {
  width: 300px;
  height: 300px;
  background: linear-gradient(140deg, var(--accent), var(--accent-dark));
  display: grid;
  place-items: center;
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 104px;
  color: #fff;
}
.about-name { font-size: 27px; font-weight: 300; font-family: var(--font-semilight); }
.about-role { font-size: 15px; color: var(--accent); font-weight: 600; }

.fact-list { display: flex; flex-direction: column; gap: 11px; margin-top: 6px; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
}
.fact dt { color: rgba(0, 0, 0, 0.5); }
.fact dd { font-weight: 600; text-align: right; }
.app.is-dark .fact { border-color: rgba(255, 255, 255, 0.14); }
.app.is-dark .fact dt { color: rgba(255, 255, 255, 0.55); }

/* --------------------------------------------------------------------------
   PROJECTS
   -------------------------------------------------------------------------- */
/* Each project is a column of the panorama, not a card: the panorama already
   scrolls sideways, and nothing inside a project scrolls on its own. */
.app-col.is-project { width: 380px; gap: 14px; }

.project-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* A small tile in the project's colour, so each column still reads as its
   own thing without needing a box drawn around it. */
.project-mark {
  width: 58px;
  height: 58px;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--tile-color, var(--accent));
}
.project-meta { font-size: 12px; color: rgba(0, 0, 0, 0.5); }
.project-name {
  font-family: var(--font-semilight);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.1;
  margin-top: 2px;
}
.project-tagline { font-size: 14px; font-weight: 600; color: rgba(0, 0, 0, 0.82); }

.project-highlights { display: flex; flex-direction: column; gap: 7px; }
.project-highlights li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.42;
  color: rgba(0, 0, 0, 0.66);
}
.project-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--tile-color, var(--accent));
}

.stack-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.66);
}

/* Links sit right under the tagline, so they are always in view. */
.project-links { display: flex; flex-wrap: wrap; gap: 8px; }
.project-link {
  /* A fixed height, not padding around the text: line boxes vary by font
     and browser (Safari measures them differently from Chrome), so a
     padded button could come out taller for one label than another. */
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 28px;
  gap: 7px;
  padding: 0 12px 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--tile-color, var(--accent));
  text-decoration: none;
  transition: filter 120ms linear;
}
.project-link:hover { filter: brightness(1.12); }
.project-link svg { flex: none; display: block; }
.project-link span { display: block; }

/* --------------------------------------------------------------------------
   SKILLS
   -------------------------------------------------------------------------- */
.skill-group { display: flex; flex-direction: column; gap: 15px; }

.skill-row { display: flex; flex-direction: column; gap: 6px; }
.skill-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.skill-head b { font-weight: 600; }
.skill-head span { color: rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; }
.app.is-dark .skill-head span { color: rgba(255, 255, 255, 0.5); }

/* Skills render as a tag cloud rather than scored bars - the underlying data
   is endorsement counts, not proficiency. */
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; }
.skill-tag {
  font-size: 13px;
  line-height: 1.2;
  padding: 7px 11px;
  color: #fff;
  background: var(--tile-color, var(--accent));
}

.skill-track {
  height: 9px;
  background: rgba(0, 0, 0, 0.09);
  overflow: hidden;
}
.app.is-dark .skill-track { background: rgba(255, 255, 255, 0.14); }

/* Bars grow from zero once the app has mounted - `--w` is the target width. */
.skill-fill {
  height: 100%;
  width: 0;
  background: var(--tile-color, var(--accent));
  transition: width 780ms var(--ease-out);
  transition-delay: var(--bar-delay, 0ms);
}
.skills-ready .skill-fill { width: var(--w, 0%); }

/* --------------------------------------------------------------------------
   EXPERIENCE
   -------------------------------------------------------------------------- */
.xp-card {
  width: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border-top: 5px solid var(--tile-color, var(--accent));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
  overflow-y: auto;
  max-height: 100%;
}
.xp-period {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tile-color, var(--accent));
}
.xp-role { font-family: var(--font-semilight); font-weight: 300; font-size: 23px; line-height: 1.12; }
.xp-company { font-size: 14px; font-weight: 600; color: rgba(0, 0, 0, 0.72); }
.xp-company small { font-weight: 400; color: rgba(0, 0, 0, 0.45); }
.xp-body { font-size: 14px; line-height: 1.5; color: rgba(0, 0, 0, 0.66); }
.xp-bullets { display: flex; flex-direction: column; gap: 7px; }
.xp-bullets li {
  position: relative;
  padding-left: 15px;
  font-size: 13px;
  line-height: 1.42;
  color: rgba(0, 0, 0, 0.66);
}
.xp-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  background: var(--tile-color, var(--accent));
}

.award-list { display: flex; flex-direction: column; gap: 13px; }
.award-list li { padding-bottom: 11px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.award-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.award-meta { font-size: 12px; color: rgba(0, 0, 0, 0.5); margin-top: 3px; }
.app.is-dark .award-list li { border-color: rgba(255, 255, 255, 0.14); }
.app.is-dark .award-meta { color: rgba(255, 255, 255, 0.55); }

.edu-card {
  padding: 18px;
  background: rgba(0, 0, 0, 0.045);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.edu-school { font-size: 17px; font-weight: 600; }
.edu-degree { font-size: 14px; color: rgba(0, 0, 0, 0.66); }
.edu-note { font-size: 13px; color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------------------
   CONTACT
   -------------------------------------------------------------------------- */
.contact-tiles {
  display: grid;
  grid-template-columns: repeat(2, 190px);
  gap: 10px;
}
.contact-tile {
  height: 130px;
  padding: 15px;
  background: var(--tile-color, var(--accent));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms var(--ease-out);
}
.contact-tile:hover { transform: scale(1.035); }
.contact-tile:active { transform: scale(0.97); }
.contact-tile svg { width: 30px; height: 30px; }
.contact-tile-label { font-size: 13px; opacity: 0.85; }
.contact-tile-value { font-size: 15px; font-weight: 600; word-break: break-word; }

/* --------------------------------------------------------------------------
   PHOTOS
   -------------------------------------------------------------------------- */
.photo-grid {
  display: grid;
  grid-template-rows: repeat(2, 190px);
  grid-auto-columns: 190px;
  grid-auto-flow: column dense;
  gap: 10px;
  height: max-content;
}
.photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tile-color, var(--accent)), rgba(0, 0, 0, 0.62));
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: #fff;
  transition: transform 200ms var(--ease-out);
}
.photo:hover { transform: scale(1.02); }
.photo.is-wide { grid-column: span 2; }
.photo.is-tall { grid-row: span 2; }
.photo-caption { font-size: 13px; position: relative; z-index: 1; }
.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.5));
}

/* --------------------------------------------------------------------------
   WEATHER
   -------------------------------------------------------------------------- */
.weather-app { --app-bg: linear-gradient(160deg, #2a8fd4, #1a5f96); }
.weather-now { display: flex; flex-direction: column; gap: 6px; color: #fff; }
.weather-city { font-family: var(--font-light); font-weight: 200; font-size: 40px; }
.weather-temp {
  font-family: var(--font-light);
  font-weight: 100;
  font-size: 118px;
  line-height: 0.92;
  position: relative;
}
.weather-temp sup { font-size: 34px; vertical-align: super; font-weight: 300; }
.weather-cond { font-size: 20px; font-weight: 300; }
.weather-hilo { font-size: 15px; opacity: 0.82; }

/* Provenance line: green dot when the reading came from the API, amber when
   we're showing the fallback. */
.weather-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}
.weather-dot {
  width: 8px;
  height: 8px;
  flex: none;
  background: #6fdc6f;
  border-radius: 50%;
}
.weather-source.is-stale .weather-dot { background: var(--c-amber); }

.forecast-row { display: flex; gap: 10px; }
.forecast-day {
  width: 118px;
  height: 168px;
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.forecast-day svg { width: 38px; height: 38px; }
.forecast-name { font-size: 14px; font-weight: 600; }
.forecast-temps { font-size: 14px; }
.forecast-temps small { opacity: 0.7; }

/* --------------------------------------------------------------------------
   CLOCK
   -------------------------------------------------------------------------- */
.clock-app { --app-bg: #101010; }
.clock-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: #fff;
}
.clock-digits {
  font-family: var(--font-light);
  font-weight: 100;
  font-size: clamp(80px, 15vw, 210px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.clock-digits .sec { color: var(--accent); font-size: 0.4em; vertical-align: super; }
.clock-day { font-family: var(--font-light); font-weight: 300; font-size: clamp(18px, 2.2vw, 30px); }

/* --------------------------------------------------------------------------
   CALCULATOR
   -------------------------------------------------------------------------- */
.calc-app { --app-bg: #1b1b1b; }
.calc {
  width: 336px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.calc-display {
  height: 96px;
  background: #262626;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px 16px;
  margin-bottom: 6px;
}
.calc-expr { font-size: 14px; color: rgba(255, 255, 255, 0.45); min-height: 19px; }
.calc-value {
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 46px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.calc-key {
  height: 62px;
  background: #333;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  transition: background-color 90ms linear;
}
.calc-key:hover { background: #414141; }
.calc-key:active { background: var(--accent); }
.calc-key.is-op { background: #2a2a2a; color: var(--accent-light); }
.calc-key.is-op:hover { background: #363636; }
.calc-key.is-eq { background: var(--accent); }
.calc-key.is-eq:hover { background: var(--accent-light); }
.calc-key.is-wide { grid-column: span 2; }

/* --------------------------------------------------------------------------
   INTERNET EXPLORER
   IE10's Modern-mode chrome lived at the bottom of the screen, not the top.
   -------------------------------------------------------------------------- */
.ie-app { --app-bg: #f4f4f4; display: flex; flex-direction: column; }
.ie-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #fff;
  padding: 46px clamp(28px, 8vw, 130px);
}
.ie-page { max-width: 720px; margin: 0 auto; color: #1a1a1a; }
.ie-page h1 {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 40px;
  margin-bottom: 14px;
}
.ie-page h2 { font-size: 21px; font-weight: 600; margin: 26px 0 9px; }
.ie-page p { font-size: 15px; line-height: 1.62; color: rgba(0, 0, 0, 0.74); margin-bottom: 13px; }
.ie-page ul { margin: 0 0 13px 18px; }
.ie-page li { list-style: disc; font-size: 15px; line-height: 1.6; color: rgba(0, 0, 0, 0.74); margin-bottom: 5px; }
.ie-page a { color: #1a6fb5; text-decoration: underline; cursor: pointer; }

.ie-bar {
  flex: none;
  height: 62px;
  background: #1f1f1f;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}
.ie-nav-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  flex: none;
  transition: background-color var(--dur-fast) var(--ease-std);
}
.ie-nav-button:hover { background: rgba(255, 255, 255, 0.16); }
.ie-nav-button:disabled { opacity: 0.3; pointer-events: none; }
.ie-nav-button svg { width: 16px; height: 16px; }
.ie-address {
  flex: 1;
  height: 38px;
  background: #fff;
  color: #1a1a1a;
  font-size: 14px;
  padding: 0 12px;
  border: 0;
  min-width: 0;
}
.ie-tabs { display: flex; gap: 6px; }
.ie-tab {
  height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ie-tab.is-active { background: #fff; color: #1a1a1a; }

/* --------------------------------------------------------------------------
   PC SETTINGS
   -------------------------------------------------------------------------- */
.settings-app { --app-bg: #f0f0f0; }
.settings-layout { display: flex; height: 100%; min-height: 0; }
.settings-nav {
  width: 268px;
  flex: none;
  background: var(--accent);
  padding: 26px 0;
  overflow-y: auto;
}
.settings-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 26px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  transition: background-color var(--dur-fast) var(--ease-std);
}
.settings-nav-item:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.settings-nav-item.is-active { background: #fff; color: #1a1a1a; font-weight: 600; }

.settings-pane {
  flex: 1;
  min-width: 0;
  padding: 30px 44px;
  overflow-y: auto;
  color: #1a1a1a;
}
.settings-pane h2 {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 32px;
  margin-bottom: 20px;
}
.settings-field { margin-bottom: 26px; max-width: 460px; }
.settings-label { font-size: 14px; font-weight: 600; margin-bottom: 9px; display: block; }
.settings-help { font-size: 13px; color: rgba(0, 0, 0, 0.55); margin-top: 8px; line-height: 1.45; }

.settings-swatches {
  display: grid;
  grid-template-columns: repeat(10, 34px);
  gap: 7px;
}
.settings-swatches .swatch { width: 34px; height: 34px; box-shadow: inset 0 0 0 0 #1a1a1a; }
.settings-swatches .swatch.is-active { box-shadow: inset 0 0 0 3px #1a1a1a; }

/* Windows 8's slider: square thumb, flat track, no rounding anywhere. */
.metro-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 320px;
  height: 4px;
  background: rgba(0, 0, 0, 0.28);
  outline: none;
}
.metro-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 26px;
  background: var(--accent);
  cursor: pointer;
  border: 0;
}
.metro-slider::-moz-range-thumb {
  width: 11px;
  height: 26px;
  background: var(--accent);
  cursor: pointer;
  border: 0;
  border-radius: 0;
}

/* Metro toggle switch. */
.metro-toggle {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  font-size: 14px;
}
.metro-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.metro-toggle-track {
  width: 44px;
  height: 20px;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.55);
  position: relative;
  transition: background-color var(--dur-fast) var(--ease-std);
}
.metro-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 14px;
  background: rgba(0, 0, 0, 0.72);
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-std);
}
.metro-toggle input:checked + .metro-toggle-track { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.metro-toggle input:checked + .metro-toggle-track::after { transform: translateX(24px); background: #fff; }

/* --------------------------------------------------------------------------
   STORE / GAMES / MUSIC - light-weight placeholder apps
   -------------------------------------------------------------------------- */
.placeholder-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  height: 100%;
  max-width: 480px;
}
.placeholder-body p { font-size: 16px; line-height: 1.55; opacity: 0.78; }

/* --------------------------------------------------------------------------
   BUTTONS
   Windows 8's standard button: square, 2px border, fills on press.
   -------------------------------------------------------------------------- */
.metro-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  border: 2px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-std),
              transform var(--dur-fast) var(--ease-out);
}
.metro-button:hover { background: var(--accent-light); }
.metro-button:active { transform: scale(0.97); }
.metro-button svg { width: 16px; height: 16px; }
.metro-button.is-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  align-self: flex-start;
}
.metro-button.is-ghost:hover { background: rgba(255, 255, 255, 0.16); }

/* --------------------------------------------------------------------------
   RÉSUMÉ
   -------------------------------------------------------------------------- */
.resume-actions { padding: 0 0 18px; }

.resume-doc {
  max-width: 820px;
  margin: 0 auto 40px;
  padding: 46px 54px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.16);
  user-select: text;
}
.resume-head { border-bottom: 3px solid var(--accent); padding-bottom: 14px; margin-bottom: 24px; }
.resume-head h2 {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 38px;
  line-height: 1.05;
}
.resume-head p { font-size: 14px; color: rgba(0, 0, 0, 0.6); margin-top: 6px; }

.resume-doc section { margin-bottom: 26px; }
.resume-doc h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 11px;
}
.resume-doc p { font-size: 14px; line-height: 1.6; color: rgba(0, 0, 0, 0.76); margin-bottom: 8px; }

.resume-entry { margin-bottom: 15px; }
.resume-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  margin-bottom: 5px;
}
.resume-entry-head span { color: rgba(0, 0, 0, 0.5); white-space: nowrap; }
.resume-entry ul { margin-left: 17px; }
.resume-entry li {
  list-style: disc;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 3px;
}

/* Printing yields just the résumé sheet - no OS chrome. */
@media print {
  html, body { overflow: visible; height: auto; background: #fff; }
  #shell > *:not(#appscreen),
  .app-header, .resume-actions, .taskbar, .charms, .appbar { display: none !important; }
  #appscreen, .app, .app-body { position: static !important; overflow: visible !important; }
  .app { background: #fff !important; }
  .resume-doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}

/* --------------------------------------------------------------------------
   MAIL
   -------------------------------------------------------------------------- */
.mail-layout { display: flex; height: 100%; min-height: 0; }

.mail-sidebar {
  width: 210px;
  flex: none;
  background: var(--accent);
  color: #fff;
  padding: 22px 0;
}
.mail-account { padding: 0 20px 16px; font-size: 13px; opacity: 0.85; word-break: break-all; }
.mail-folder { padding: 9px 20px; font-size: 15px; }
.mail-folder.is-active { background: rgba(255, 255, 255, 0.22); font-weight: 600; }

.mail-list {
  width: 300px;
  flex: none;
  border-right: 1px solid #e4e4e4;
  overflow-y: auto;
}
.mail-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid #efefef;
  transition: background-color var(--dur-fast) var(--ease-std);
}
.mail-item:hover { background: #f6f6f6; }
.mail-item.is-active { background: #eaf4fb; box-shadow: inset 3px 0 0 var(--accent); }
.mail-item-from { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.mail-item-subject {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-item-time { font-size: 12px; color: rgba(0, 0, 0, 0.42); margin-top: 4px; }

.mail-body { flex: 1; min-width: 0; padding: 30px 38px; overflow-y: auto; user-select: text; }
.mail-subject { font-family: var(--font-light); font-weight: 200; font-size: 32px; line-height: 1.1; }
.mail-meta { font-size: 13px; color: rgba(0, 0, 0, 0.5); margin: 8px 0 22px; }
.mail-text { font-size: 15px; line-height: 1.65; color: rgba(0, 0, 0, 0.78); max-width: 620px; }

/* --------------------------------------------------------------------------
   MINESWEEPER (Games)
   -------------------------------------------------------------------------- */
.mine-app { --app-bg: #1b1b1b; }
.mine-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.mine-status {
  display: flex;
  gap: 26px;
  align-items: center;
  color: #fff;
  font-size: 15px;
}
.mine-status b { font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 300; font-family: var(--font-light); }
.mine-reset {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}
.mine-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 12), 30px);
  gap: 2px;
}
.mine-cell {
  width: 30px;
  height: 30px;
  background: #3a3a3a;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: background-color 90ms linear;
}
.mine-cell:hover { background: #4a4a4a; }
.mine-cell.is-open { background: #262626; cursor: default; }
.mine-cell.is-mine { background: var(--c-red); }
.mine-cell.is-flag { background: var(--c-amber); }
.mine-cell[data-n='1'] { color: #4fc3f7; }
.mine-cell[data-n='2'] { color: #81c784; }
.mine-cell[data-n='3'] { color: #e57373; }
.mine-cell[data-n='4'] { color: #ba68c8; }
.mine-cell[data-n='5'] { color: #ffb74d; }
.mine-cell[data-n='6'] { color: #4db6ac; }
.mine-cell[data-n='7'] { color: #fff; }
.mine-cell[data-n='8'] { color: #9e9e9e; }

/* --------------------------------------------------------------------------
   ABOUT THE OS
   -------------------------------------------------------------------------- */
.about-os { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.about-os-mark {
  width: 56px; height: 56px;
  flex: none;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
}
.about-os-name { font-family: var(--font-light); font-weight: 300; font-size: 24px; line-height: 1.1; }
.about-os-edition { font-size: 13px; color: rgba(0, 0, 0, 0.55); margin-top: 3px; }

/* --------------------------------------------------------------------------
   WEATHER - location picker
   -------------------------------------------------------------------------- */
.geo-picker { display: flex; flex-direction: column; }

.geo-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  margin: 10px 0 8px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
}
.geo-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.geo-input:focus { border-color: #fff; background: rgba(255, 255, 255, 0.2); }

.geo-results { display: flex; flex-direction: column; max-height: 210px; overflow-y: auto; }

.geo-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  text-align: left;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  transition: background-color var(--dur-fast) var(--ease-std);
}
.geo-result:hover { background: rgba(255, 255, 255, 0.18); }
.geo-result-city { font-size: 15px; }
.geo-result-meta { font-size: 12px; opacity: 0.75; }

/* The weather app is dark, so its help text needs light strokes. */
.weather-app .settings-help { color: rgba(255, 255, 255, 0.75); }
.weather-app .cp-link { color: #fff; text-decoration: underline; padding: 0; }



/* --------------------------------------------------------------------------
   TERMINAL
   -------------------------------------------------------------------------- */
.term-app { --app-bg: #0c0c0c; }

.term-body {
  display: flex;
  flex-direction: column;
  padding: 0 var(--app-edge, clamp(36px, 6vw, 118px)) 24px;
  overflow: hidden;
  cursor: text;
}

.term-out {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}
.term-out::-webkit-scrollbar { width: 10px; }
.term-out::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.28); }

/* Everything in here is monospaced - it's a terminal, not a Modern app. */
.term-out,
.term-line { font-family: Consolas, 'Cascadia Mono', 'DejaVu Sans Mono', monospace; font-size: 13.5px; }

.term-row {
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.82);
}
.term-row.is-head { color: #fff; font-weight: 700; }
.term-row.is-key { color: var(--accent-light); font-weight: 700; }
.term-row.is-dim { color: rgba(255, 255, 255, 0.45); }
.term-row.is-ok { color: #6fdc6f; }
.term-row.is-err { color: #ff7b72; }
.term-row.is-echo { color: rgba(255, 255, 255, 0.55); }

.term-line {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 6px;
}
.term-prompt { color: var(--accent-light); flex: none; }

.term-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  caret-color: var(--accent-light);
}
.term-input:focus { outline: none; }

/* The matrix easter egg renders as one pre block inside the scrollback. */
.term-rain {
  white-space: pre;
  line-height: 1.05;
  font-size: 12px;
  color: #3fdc6f;
  text-shadow: 0 0 6px rgba(63, 220, 111, 0.55);
  opacity: 0.92;
  margin: 6px 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   STORE
   -------------------------------------------------------------------------- */
.store-app { --app-bg: #0b5a7a; }

.store-hero {
  width: 260px;
  padding: 22px 20px 24px;
  background: var(--tile-color, var(--accent));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.store-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}
.store-hero > * { position: relative; z-index: 1; }
.store-hero-badge {
  font-size: 11px;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-bottom: 16px;
}
.store-hero-icon { margin-bottom: 14px; }
.store-hero-name {
  font-family: var(--font-semilight);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.1;
}
.store-hero-tag { font-size: 14px; opacity: 0.9; margin-top: 4px; }
.store-hero-stars { font-size: 13px; opacity: 0.85; margin-top: 10px; letter-spacing: 0.06em; }

.store-list { display: flex; flex-direction: column; }

.store-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.store-item:hover { background: rgba(255, 255, 255, 0.08); }

.store-item-tile {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--tile-color, var(--accent));
  color: #fff;
}

.store-item-text { flex: 1; min-width: 0; }
.store-item-name {
  font-size: 15px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.store-item-meta { font-size: 12px; color: rgba(255, 255, 255, 0.6); margin-top: 2px; }
.store-item-rating {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 3px;
}
.store-stars { color: var(--c-amber); letter-spacing: 0.05em; }

.store-install {
  flex: none;
  padding: 7px 16px;
  font-size: 13px;
  background: #fff;
  color: #0b5a7a;
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-std), transform var(--dur-fast) var(--ease-out);
}
.store-install:hover { background: var(--c-amber); }
.store-install:active { transform: scale(0.95); }

.store-installed {
  flex: none;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 7px 4px;
}
/* The row you just installed swaps its button for this label; a short slide
   makes that read as a result rather than as the list having reloaded. */
.store-installed.is-fresh { animation: store-done 380ms var(--ease-out) both; }
@keyframes store-done {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}

/* Refill targets for the Store's panorama. They carry no box of their own so
   the columns lay out exactly as they would with the content inlined. */
.store-slot { display: contents; }

/* --------------------------------------------------------------------------
   TOOLS
   -------------------------------------------------------------------------- */
.tool-app { --app-bg: #161616; }

.tool-blurb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
  max-width: 620px;
}

.tool { display: flex; flex-direction: column; gap: 16px; max-width: 980px; padding-bottom: 30px; }
.tool-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.tool-pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.tool-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tool-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.tool-hint { font-size: 12px; color: rgba(255, 255, 255, 0.45); }

.tool-area,
.tool-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  padding: 9px 11px;
}
.tool-area,
.tool-mono,
.tool-highlight { font-family: Consolas, 'Cascadia Mono', monospace; }
.tool-area { resize: vertical; line-height: 1.55; min-height: 120px; }
.tool-area:focus,
.tool-input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, 0.09); }
.tool-area[readonly] { background: rgba(255, 255, 255, 0.03); color: rgba(255, 255, 255, 0.82); }
.tool .dd { min-width: 96px; }

.tool-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tool-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.tool-inline input[type="checkbox"] { accent-color: var(--accent); }

.tool-button {
  padding: 8px 15px;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  border: 0;
  transition: background-color var(--dur-fast) var(--ease-std), transform var(--dur-fast) var(--ease-out);
}
.tool-button:hover { background: var(--accent-light); }
.tool-button:active { transform: scale(0.96); }
.tool-button.is-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.tool-button.is-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.tool-status { font-size: 13px; color: rgba(255, 255, 255, 0.55); min-height: 18px; }
.tool-status.is-ok { color: #6fdc6f; }
.tool-status.is-err { color: #ff7b72; }

.tool-out {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 9px 11px;
  font-size: 12.5px;
  word-break: break-all;
  min-height: 38px;
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
}
.tool-out-row { display: flex; gap: 8px; align-items: stretch; }

/* -- regex ---------------------------------------------------------------- */
.tool-highlight {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 11px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 90px;
  max-height: 240px;
  overflow-y: auto;
}
.tool-highlight mark {
  background: var(--accent);
  color: #fff;
  padding: 1px 0;
}
.tool-groups { display: flex; flex-direction: column; gap: 4px; }
.tool-group-row {
  display: flex;
  gap: 12px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
}
.tool-group-n { color: var(--accent); flex: none; }

/* -- convert -------------------------------------------------------------- */
.tool-convert { align-items: flex-end; }
.tool-convert .tool-field { flex: 1; min-width: 90px; }
.tool-result {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 38px;
  line-height: 1.15;
  color: #fff;
  word-break: break-word;
}

/* -- colour --------------------------------------------------------------- */
.tool-color-row { display: flex; gap: 8px; align-items: center; }
.tool-color {
  width: 42px;
  height: 34px;
  flex: none;
  padding: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
}
.tool-swatch {
  padding: 22px 18px;
  font-size: 17px;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.tool-contrast { align-items: center; gap: 22px; }
.tool-ratio {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 32px;
  color: #fff;
}
.tool-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.tool-badge { font-size: 11px; font-weight: 600; padding: 4px 9px; letter-spacing: 0.03em; }
.tool-badge.is-pass { background: rgba(111, 220, 111, 0.2); color: #6fdc6f; }
.tool-badge.is-fail { background: rgba(255, 123, 114, 0.18); color: #ff7b72; }
.tool-values { display: flex; flex-direction: column; gap: 6px; }
.tool-value-row { display: flex; gap: 14px; align-items: baseline; font-size: 13px; color: #fff; }
.tool-value-row .tool-label { width: 46px; flex: none; }
.tool-shades { display: flex; gap: 6px; flex-wrap: wrap; }
.tool-shade {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.tool-shade:hover { transform: scale(1.1); }

@media (max-width: 980px) {
  .tool-2col { grid-template-columns: 1fr; }
}

/* Year headings inside the certifications column. */
.cert-year {
  font-family: var(--font-semilight);
  font-weight: 300;
  font-size: 18px;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: -8px;
}
.award-list li.is-expired .award-title { color: rgba(0, 0, 0, 0.5); }
