 /**
 * Apple.com ~2002 "Aqua" homage — ONLY inside #legacy.apple-aqua-legacy.
 * Completely overrides legacy.css for the legacy section.
 * Does not touch #modern, project-*.html, or anything outside #legacy.
 */

/* ── Base (do NOT use * { margin;padding } — ID specificity beats .aq-* and kills margin:auto + padding) ── */
#legacy.apple-aqua-legacy *,
#legacy.apple-aqua-legacy *::before,
#legacy.apple-aqua-legacy *::after {
  box-sizing: border-box;
}

#legacy.apple-aqua-legacy {
  min-height: 100vh;
  min-width: 852px;
  width: 852px;
  background: #ffffff;
  color: #111;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family:
    "Lucida Grande",
    "Lucida Sans Unicode",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: subpixel-antialiased;

  /* Push buttons + nav tabs (Store chrome) — light grey, sharp mid shelf */
  --aq-btn-bg: linear-gradient(
    180deg,
    #fafafa 0%,
    #f0f0f0 47%,
    #d2d2d2 50%,
    #c4c4c4 100%
  );
  --aq-btn-bg-hover: linear-gradient(
    180deg,
    #ffffff 0%,
    #f5f5f5 47%,
    #dadada 50%,
    #cccccc 100%
  );
  --aq-btn-border: #777;
  --aq-btn-radius: 5px;
  --aq-btn-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(0, 0, 0, 0.07),
    0 1px 2px rgba(0, 0, 0, 0.16);

  /* Footer Search — softer fill, rounder, stronger drop shadow */
  --aq-btn-search-bg: linear-gradient(
    180deg,
    #fcfcfc 0%,
    #f4f4f4 42%,
    #e6e6e6 58%,
    #dcdcdc 100%
  );
  --aq-btn-search-radius: 7px;
  --aq-btn-search-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 #b0b0b0,
    0 2px 4px rgba(0, 0, 0, 0.22);
}

#legacy.apple-aqua-legacy h1,
#legacy.apple-aqua-legacy h2,
#legacy.apple-aqua-legacy h3 {
  margin: 0;
  font-weight: inherit;
}

#legacy.apple-aqua-legacy p {
  margin: 0;
}

#legacy.apple-aqua-legacy ul {
  margin: 0;
  padding: 0;
}

/* ══════════════════════════════════════════
   AQUA CHROME — sticky header
   ══════════════════════════════════════════ */

.aq-chrome {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Pinstripe background behind tabs */
  background:
    repeating-linear-gradient(
      0deg,
      #e8ecf2,
      #e8ecf2 1px,
      #dde2ea 1px,
      #dde2ea 2px
    );
}

/* ── Tab row (Store-style chips, same chrome as push buttons) ── */
.aq-tabs-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding: 10px 16px;
  box-sizing: border-box;
}

.aq-logo-tab,
.aq-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-height: 22px;
  padding: 3px 12px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--aq-btn-border);
  border-radius: var(--aq-btn-radius);
  background: var(--aq-btn-bg);
  box-shadow: var(--aq-btn-shadow);
  color: #000;
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  -webkit-appearance: none;
  appearance: none;
}

.aq-logo-tab {
  flex: 0 0 auto;
  min-width: 36px;
  padding: 3px 8px;
}

.aq-tab:hover,
.aq-logo-tab:hover,
.aq-tab:focus-visible,
.aq-logo-tab:focus-visible {
  text-decoration: none;
  color: #000;
  background: var(--aq-btn-bg-hover);
}

.aq-tab:active,
.aq-logo-tab:active {
  background: linear-gradient(
    180deg,
    #d8d8d8 0%,
    #e4e4e4 48%,
    #f0f0f0 50%,
    #f6f6f6 100%
  );
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.16);
}

.aq-tab--upgrade {
  color: #000;
}

/* ── Pinstripe subbar ── */
.aq-subbar {
  border-top: 1px solid #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.16);
  background:
    repeating-linear-gradient(
      0deg,
      #ffffff,
      #ffffff 1px,
      #f4f6f9 1px,
      #f4f6f9 2px
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.aq-subbar {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  padding: 7px 16px;
  font-size: 11px;
  box-sizing: border-box;
}

.aq-subbar a {
  color: #222;
  text-decoration: none;
  padding: 0 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.14);
}

.aq-subbar a:last-child {
  border-right: none;
}

.aq-subbar a:hover {
  text-decoration: underline;
  color: #000;
}

/* ── Push buttons (Store-style — light grey, NOT tab chrome) ── */
.aq-btn,
.aq-promo__link,
button.aq-promo__link,
.aq-footer__search button,
#legacy.apple-aqua-legacy .xp-btn,
#legacy.apple-aqua-legacy .xp-btn--primary {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 3px 14px;
  min-height: 22px;
  border: 1px solid var(--aq-btn-border);
  border-radius: var(--aq-btn-radius);
  background: var(--aq-btn-bg);
  box-shadow: var(--aq-btn-shadow);
  color: #000;
  font-family: inherit;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
}

.aq-promo__link,
button.aq-promo__link {
  font-size: 11px;
  padding: 2px 10px;
  min-height: 20px;
}

.aq-btn:hover,
.aq-promo__link:hover,
button.aq-promo__link:hover,
.aq-footer__search button:hover,
#legacy.apple-aqua-legacy .xp-btn:hover,
#legacy.apple-aqua-legacy .xp-btn--primary:hover {
  color: #000;
  text-decoration: none;
  background: var(--aq-btn-bg-hover);
}

.aq-btn:active,
.aq-promo__link:active,
button.aq-promo__link:active,
.aq-footer__search button:active,
#legacy.apple-aqua-legacy .xp-btn:active,
#legacy.apple-aqua-legacy .xp-btn--primary:active {
  background: linear-gradient(
    180deg,
    #d8d8d8 0%,
    #e4e4e4 48%,
    #f0f0f0 50%,
    #f6f6f6 100%
  );
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.18),
    0 0 0 transparent;
}

/* ══════════════════════════════════════════
   PAGE BODY
   ══════════════════════════════════════════ */

.aq-body {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px 52px;
  background: #fff;
}

/* ── Hero ── */
.aq-hero {
  display: flex;
  align-items: stretch;
  min-height: 320px;
  border-bottom: 1px solid #d8dce4;
}

.aq-hero__img-wrap {
  flex: 0 0 260px;
  overflow: hidden;
}

.aq-hero__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.aq-hero__quote {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 40px 40px 48px;
  font-style: normal;
}

.aq-hero__quote p {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 40px;
  font-weight: bold;
  line-height: 1.05;
  color: #000;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.aq-hero__quote footer {
  font-size: 12px;
  color: #778;
  line-height: 1.6;
  font-style: normal;
}

.aq-hero__title {
  display: block;
  font-size: 11px;
  color: #999;
}

/* ── Hot News bar (apple.com 2002 — pill ticker, NOT dark label block) ── */
.aq-hotnews {
  display: flex;
  align-items: stretch;
  margin: 0;
  border: 1px solid #848484;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #fdfdfd 0%, #e4e4e4 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

.aq-hotnews__label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: bold;
  color: #000;
  white-space: nowrap;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  background: linear-gradient(
    180deg,
    #dce1ea 0%,
    #d0d6e2 46%,
    #bcc3d2 50%,
    #adb5c6 100%
  );
  border-right: 1px solid #949aaa;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset -1px 0 0 rgba(0, 0, 0, 0.06);
}

.aq-hotnews__story {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 5px 14px;
  font-size: 12px;
  line-height: 1.35;
  color: #000;
  background: linear-gradient(
    180deg,
    #fcfcfc 0%,
    #f5f5f5 42%,
    #ebebeb 58%,
    #e2e2e2 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.aq-hotnews__story strong {
  font-weight: bold;
}

.aq-hotnews__story a {
  color: #000;
  text-decoration: underline;
}

.aq-hotnews__story a:hover {
  color: #000;
}

/* ── 4 promo boxes ── */
.aq-promos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid #d0d4de;
}

.aq-promo {
  padding: 14px 12px 16px;
  border-right: 1px solid #d8dce6;
  background: #fff;
}

.aq-promo:last-child {
  border-right: none;
}

.aq-promo__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 1px solid #e0e4ec;
}

.aq-promo__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aq-promo__img-wrap--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e8eef8, #ccd4e6);
  aspect-ratio: 16 / 10;
}

.aq-promo__icon-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.aq-promo__name {
  font-size: 12px;
  font-weight: bold;
  color: #000;
  margin-bottom: 4px;
}

.aq-promo__desc {
  font-size: 11px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.4;
}

.aq-promo__link {
  margin-top: 4px;
  font-size: 11px;
}

/* ── Divider ── */
.aq-rule {
  border: 0;
  height: 1px;
  background: #d0d5de;
  margin: 0;
}

/* ══════════════════════════════════════════
   CONTENT SECTIONS (single column)
   ══════════════════════════════════════════ */

.aq-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 24px;
  text-align: center;
}

.aq-section__h {
  width: 100%;
  max-width: 600px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: bold;
  color: #111;
  line-height: 1.15;
  margin: 0 auto 12px;
  letter-spacing: -0.02em;
}

.aq-section__body {
  width: 100%;
  max-width: 600px;
  font-size: 13px;
  color: #333;
  margin: 0 auto 8px;
  line-height: 1.55;
}

.aq-section__sub {
  width: 100%;
  max-width: 600px;
  font-size: 11px;
  color: #778;
  margin: 0 auto 8px;
}

.aq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  margin: 14px auto 0;
}

.aq-section--about .aq-btn {
  margin-top: 10px;
}

/* ── Skills ── */
.aq-skills {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 14px auto 0;
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.aq-skill {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #eaedf2;
}

.aq-skill:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.aq-skill__name {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  flex: none;
}

.aq-skill__desc {
  font-size: 12px;
  color: #444;
  line-height: 1.5;
}

/* ── Guestbook ── */
.aq-guestbook {
  list-style: none;
  margin: 10px auto 0;
  width: 100%;
  max-width: 600px;
  text-align: center;
}

.aq-guestbook li {
  font-size: 12px;
  color: #444;
  padding: 7px 0;
  border-bottom: 1px solid #eaedf2;
  line-height: 1.4;
}

.aq-guestbook li:last-child {
  border-bottom: none;
}

.aq-guestbook strong {
  color: #111;
  font-weight: bold;
}

/* ── Hit counter (Apple-ised) ── */
.aq-hit-counter {
  display: inline-flex;
  gap: 2px;
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.05em;
  background: #fff;
  border: 1px solid #d0d5de;
  border-radius: 4px;
  padding: 4px 8px;
  color: #003;
  margin: 12px auto 0;
}

/* ══════════════════════════════════════════
   AQUA FOOTER
   ══════════════════════════════════════════ */

.aq-footer {
  border-top: 1px solid #d0d5de;
  padding: 24px 32px 32px;
  text-align: center;
  background:
    repeating-linear-gradient(
      0deg,
      #ffffff,
      #ffffff 1px,
      #f5f7fb 1px,
      #f5f7fb 2px
    );
}

.aq-footer__search {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.aq-footer__search input {
  width: 220px;
  height: 24px;
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  background: #fff;
  outline: none;
}

.aq-footer__search button {
  height: 22px;
  padding: 0 16px;
  border-radius: var(--aq-btn-search-radius);
  background: var(--aq-btn-search-bg);
  box-shadow: var(--aq-btn-search-shadow);
}

.aq-footer__links-row {
  font-size: 12px;
  margin-bottom: 10px;
}

.aq-footer__links-row a {
  color: #111;
  text-decoration: underline;
}

.aq-footer__links-row a:hover {
  color: #000;
}

.aq-footer__text {
  font-size: 12px;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.55;
}

.aq-footer__text a {
  color: #111;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

.aq-footer__select-wrap {
  margin: 10px auto 14px;
}

.aq-footer__select-wrap select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  background: #fff;
  width: 260px;
}

.aq-footer__copy {
  font-size: 11px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.6;
}

.aq-footer__copy a {
  color: #111;
  text-decoration: underline;
}

/* Aqua "Powered by" — brushed metal, not blue */
.aq-footer__powered {
  font-size: 12px;
  font-weight: bold;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #5a6270;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  margin-top: 6px;
}

/* ══════════════════════════════════════════
   STATUS BAR (Aqua-styled, kept for main.js)
   ══════════════════════════════════════════ */

.aq-statusbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  height: 22px;
  background: linear-gradient(180deg, #e2e8f2 6%, #96a4be 98%);
  border-top: 1px solid rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 11px;
  color: #222;
  overflow: hidden;
}

.aq-statusbar__cell {
  flex: 0 0 auto;
  padding: 0 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.14);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 11px;
}

.aq-statusbar__ticker {
  flex: 1 1 auto;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.aq-statusbar__ticker-inner {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: aq-ticker 32s linear infinite;
  font-size: 11px;
}

@keyframes aq-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ══════════════════════════════════════════
   XP POPUPS — Aqua re-skin (glass dialog)
   ══════════════════════════════════════════ */

#legacy.apple-aqua-legacy .xp-window {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  background: rgba(240, 244, 252, 0.96);
  backdrop-filter: blur(10px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#legacy.apple-aqua-legacy .xp-window__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 7px;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, #e4e8f2 4%, #bcc4d8 98%);
  font-size: 12px;
  font-weight: bold;
  color: #111;
}

#legacy.apple-aqua-legacy .xp-btn-close {
  position: relative;
  overflow: hidden;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(120, 0, 0, 0.45);
  /* Two-layer: deep red body + bright top-left highlight = Aqua traffic light */
  background: radial-gradient(circle at 35% 30%, #ff7070 0%, #d42020 65%, #aa1010 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 1px 2px rgba(0, 0, 0, 0.25);
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

#legacy.apple-aqua-legacy .xp-btn-close::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 60%;
  height: 45%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 40% 30%,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.0) 100%
  );
  pointer-events: none;
}

#legacy.apple-aqua-legacy .xp-window__body {
  padding: 18px 20px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

#legacy.apple-aqua-legacy .xp-window__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(160deg, #d0d8ee, #aab4cc);
  border: 1px solid rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
}

#legacy.apple-aqua-legacy .xp-window__content p {
  font-size: 12px;
  color: #222;
  line-height: 1.5;
  margin-bottom: 14px;
}

#legacy.apple-aqua-legacy .xp-window__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Dialog actions — inherit .xp-btn push-button rules above */
#legacy.apple-aqua-legacy .xp-btn,
#legacy.apple-aqua-legacy .xp-btn--primary {
  padding: 4px 20px;
}

/* Kill leftover Win9x / hyperlink blue inside Aqua legacy */
#legacy.apple-aqua-legacy .aq-body a,
#legacy.apple-aqua-legacy .aq-footer a {
  color: #111;
}

/* ── Stickers (keep but muted) ── */
#legacy.apple-aqua-legacy .legacy__stickers {
  display: none;
}

/* ══════════════════════════════════════════
   LEGACY VIEW — fixed 852px layout (no responsive — it’s 2002)
   ══════════════════════════════════════════ */

html.is-legacy-view {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

html.is-legacy-view body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#legacy.apple-aqua-legacy.is-morphing {
  background: #fff;
}

#legacy.apple-aqua-legacy.is-morphing .aq-chrome {
  position: relative;
  z-index: 2;
}

/* Vortex warp scanlines during legacy → modern */
.morph-warp-overlay {
  position: fixed;
  inset: 0;
  z-index: 99997;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(
      ellipse 80% 60% at 50% 42%,
      rgba(180, 200, 255, 0.35) 0%,
      rgba(40, 50, 90, 0.55) 55%,
      rgba(0, 0, 0, 0.75) 100%
    );
  animation: morph-warp-in 0.65s ease-out forwards;
}

@keyframes morph-warp-in {
  0% {
    opacity: 0;
    transform: scale(1.08);
    filter: blur(0);
  }
  35% {
    opacity: 0.85;
    transform: scale(1);
    filter: blur(0.5px);
  }
  100% {
    opacity: 1;
    transform: scale(0.98);
    filter: blur(1px);
  }
}

.morph-flash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #fff 0%, rgba(200, 220, 255, 0.9) 35%, transparent 70%);
  opacity: 0;
  transition: opacity 0.12s ease-out;
}

.morph-flash.is-on {
  opacity: 0.92;
  transition: opacity 0.38s ease-in;
}

