/* Minimal, shared styling for all pages */

@font-face {
  font-family: __IBM_Plex_Sans_a723b0;
  font-style: normal;
  font-weight: 100;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/__IBM_Plex_Sans_a723b0/7b19b489dc6743ba-s.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: __IBM_Plex_Sans_a723b0;
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url("../fonts/__IBM_Plex_Sans_a723b0/ibm-plex-sans-100.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: __IBM_Plex_Sans_a723b0;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/__IBM_Plex_Sans_a723b0/ibm-plex-sans-300.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: __IBM_Plex_Sans_a723b0;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/__IBM_Plex_Sans_a723b0/ibm-plex-sans-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --text: #000000;
  --text-muted: #888888;
  --rule: #f0f0f0;
  --card: transparent;

  --link: inherit;
  --link-hover: inherit;

  --container-bg: transparent;
  --container-border: transparent;
  --container-radius: 0px;
  --container-shadow: none;

  --switch-border: rgba(0, 0, 0, 0.10);
  --switch-bg: rgba(0, 0, 0, 0.03);
  --switch-thumb: #ffffff;
  --switch-icon: rgba(0, 0, 0, 0.55);
  --switch-icon-active: #000000;
  --switch-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);

  --theme-index: 0;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --text: #000000;
  --text-muted: #888888;
  --rule: #f0f0f0;
  --card: transparent;

  --link: #1a5bd7;
  --link-hover: #0f48b7;

  --container-bg: transparent;
  --container-border: transparent;
  --container-radius: 0px;
  --container-shadow: none;

  --switch-border: rgba(0, 0, 0, 0.10);
  --switch-bg: rgba(0, 0, 0, 0.03);
  --switch-thumb: #ffffff;
  --switch-icon: rgba(0, 0, 0, 0.55);
  --switch-icon-active: #000000;
  --switch-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
}

html[data-theme="dark"] {
  --bg: #16181d;
  --text: #f2f2f2;
  --text-muted: rgba(242, 242, 242, 0.72);
  --rule: rgba(255, 255, 255, 0.14);
  --card: transparent;

  --link: #8ab4ff;
  --link-hover: #a8c7ff;

  --container-bg: transparent;
  --container-border: transparent;
  --container-radius: 0px;
  --container-shadow: none;

  --switch-border: rgba(255, 255, 255, 0.16);
  --switch-bg: rgba(255, 255, 255, 0.08);
  --switch-thumb: #1e2128;
  --switch-icon: rgba(255, 255, 255, 0.70);
  --switch-icon-active: #ffffff;
  --switch-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

html[data-theme="paper"] {
  --bg: #f6f0df;
  --text: #1f1f1f;
  --text-muted: #6f6a5c;
  --rule: rgba(31, 31, 31, 0.12);
  --card: transparent;

  --link: #1a5bd7;
  --link-hover: #0f48b7;

  --container-bg: transparent;
  --container-border: transparent;
  --container-radius: 0px;
  --container-shadow: none;

  --switch-border: rgba(31, 31, 31, 0.16);
  --switch-bg: rgba(31, 31, 31, 0.04);
  --switch-thumb: #fffaf0;
  --switch-icon: rgba(31, 31, 31, 0.60);
  --switch-icon-active: #1f1f1f;
  --switch-shadow: 0 8px 20px rgba(31, 31, 31, 0.12);
}

html[data-theme="blueprint"] {
  --bg: #0b4aa2;
  --text: #eaf2ff;
  --text-muted: rgba(234, 242, 255, 0.78);
  --rule: rgba(234, 242, 255, 0.22);
  --card: transparent;

  --link: rgba(234, 242, 255, 0.95);
  --link-hover: #ffffff;

  --container-bg: transparent;
  --container-border: transparent;
  --container-radius: 0px;
  --container-shadow: none;

  --bp-minor: rgba(234, 242, 255, 0.06);
  --bp-major: rgba(234, 242, 255, 0.10);
  --bp-ruler: rgba(234, 242, 255, 0.18);

  --switch-border: rgba(234, 242, 255, 0.22);
  --switch-bg: rgba(234, 242, 255, 0.10);
  --switch-thumb: rgba(234, 242, 255, 0.18);
  --switch-icon: rgba(234, 242, 255, 0.78);
  --switch-icon-active: #eaf2ff;
  --switch-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

html[data-theme="blueprint"] body {
  background-image:
    repeating-linear-gradient(0deg, var(--bp-minor) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, var(--bp-minor) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, var(--bp-major) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(90deg, var(--bp-major) 0 1px, transparent 1px 120px);
  background-attachment: fixed;
}

html[data-theme="blueprint"] .container {
  position: relative;
}

html[data-theme="blueprint"] .container::before {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  top: -34px;
  height: 14px;
  pointer-events: none;
  border: 1px solid var(--bp-ruler);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background-image:
    repeating-linear-gradient(90deg, var(--bp-ruler) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, rgba(234, 242, 255, 0.55) 0 1px, transparent 1px 50px);
  background-size: 10px 100%, 50px 100%;
}

html[data-theme="blueprint"] .container::after {
  content: "";
  position: absolute;
  top: -16px;
  bottom: -16px;
  left: -34px;
  width: 14px;
  pointer-events: none;
  border: 1px solid var(--bp-ruler);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background-image:
    repeating-linear-gradient(0deg, var(--bp-ruler) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(0deg, rgba(234, 242, 255, 0.55) 0 1px, transparent 1px 50px);
  background-size: 100% 10px, 100% 50px;
}

html[data-theme="blueprint"] .list-item {
  border-bottom-style: dotted;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: __IBM_Plex_Sans_a723b0, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(56px, 10vh, 120px) 24px;
  background: var(--container-bg);
  border: 1px solid var(--container-border);
  border-radius: var(--container-radius);
  box-shadow: var(--container-shadow);
}


.article-shell {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 0 24px;
}

.article-shell .container {
  margin: 0;
  width: 100%;
}

.article-shell .article-sidebar {
  padding-top: 10vh;
}

.article-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 220px;
}

.article-sidebar .theme-switcher {
  align-self: flex-start;
}

.article-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.article-nav a {
  font-weight: 400;
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 0;
}

.article-nav a:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-bottom: 0;
}

.article-nav a[aria-current="page"] {
  color: var(--text);
}

.article-nav-current {
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.article-nav-current a {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.article-content {
  min-width: 0;
}

.article-header {
  margin-bottom: 2rem;
}

.article-content h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.article-content h2 {
  margin-top: 2.25rem;
}

.more-articles {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.more-articles ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.75rem;
}

.more-articles li {
  margin: 0.65rem 0;
}

@media (max-width: 760px) {
  .article-shell {
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
  }

  .article-sidebar {
    display: none;
    padding-top: 0;
  }

  .article-shell .menu-toggle {
    align-self: flex-end;
  }

  html.menu-open .article-sidebar {
    display: flex;
    position: fixed;
    inset: 76px 16px 16px 16px;
    width: auto;
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    border-radius: 16px;
    box-shadow: var(--container-shadow);
    padding: 18px;
    overflow: auto;
    z-index: 70;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 10px;
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
}

header {
  margin-bottom: 3rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu-toggle {
  display: none;
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--container-bg);
  border: 1px solid var(--container-border);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  line-height: 1;
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.identity {
  min-width: 0;
}

.avatar {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

h1 {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
}

.avatar-button {
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.avatar-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .container {
  filter: blur(8px);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal[data-open="true"] {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.modal__content {
  position: relative;
  z-index: 1;
  max-width: min(720px, 90vw);
  max-height: 85vh;
}

.modal__content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

nav {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 44px;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 80;
  }

  html.menu-open,
  html.menu-open body {
    overflow: hidden;
  }

  html.menu-open body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--bg);
    opacity: 0.98;
    z-index: 50;
  }

  .header-top .theme-switcher,
  header nav[aria-label="Primary"] {
    display: none;
  }

  html.menu-open .menu-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 80;
  }

  html.menu-open .header-top .theme-switcher {
    display: inline-flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 80;
  }

  html.menu-open .theme-switcher {
    padding: 2px;
  }

  html.menu-open .theme-switcher__thumb {
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc((100% - 4px) / 4);
  }

  html.menu-open .theme-switcher button {
    width: 36px;
    height: 36px;
    touch-action: manipulation;
  }

  html.menu-open .theme-icon {
    width: 16px;
    height: 16px;
  }

  html.menu-open header nav[aria-label="Primary"] {
    position: fixed;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 14px;
    inset: 76px 16px 16px 16px;
    margin: 0;
    padding: 18px;
    border-radius: 16px;
    background: var(--container-bg);
    border: 1px solid var(--container-border);
    box-shadow: var(--container-shadow);
    overflow: auto;
    z-index: 70;
  }
}

.theme-switcher {
  display: inline-flex;
  position: relative;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--switch-border);
  border-radius: 999px;
  background: var(--switch-bg);
  overflow: hidden;
  align-self: center;
}

.theme-switcher__thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / 4);
  border-radius: 999px;
  background: var(--switch-thumb);
  box-shadow: var(--switch-shadow);
  transform: translateX(calc(var(--theme-index) * 100%));
  transition: transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1), background-color 220ms ease, box-shadow 220ms ease;
}

.theme-switcher button {
  font: inherit;
  font-size: 0.95rem;
  color: var(--switch-icon);
  background: transparent;
  border: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  cursor: pointer;
  transition: transform 140ms ease, color 180ms ease;
  border-right: 0;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html.theme-init .theme-switcher__thumb,
html.theme-init .theme-switcher button {
  transition: none;
}

.theme-switcher button:last-child {
  border-right: 0;
}

.theme-switcher button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.theme-switcher button[aria-pressed="true"] {
  color: var(--switch-icon-active);
  transform: translateY(-1px);
}

.theme-switcher button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.theme-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.tooltip {
  position: fixed;
  z-index: 100;
  max-width: 240px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}

.tooltip[data-open="true"] {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding: clamp(40px, 8vh, 80px) 16px;
  }

  header {
    margin-bottom: 2.25rem;
  }

  nav {
    gap: 0.5rem 1rem;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .theme-switcher {
    padding: 2px;
  }

  .theme-switcher__thumb {
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc((100% - 4px) / 4);
  }

  .theme-switcher button {
    width: 36px;
    height: 36px;
    touch-action: manipulation;
  }

  .theme-icon {
    width: 16px;
    height: 16px;
  }

  footer {
    margin-top: 3.5rem;
  }

  .footer-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

nav a:hover {
  border-bottom-color: var(--text);
  color: var(--text);
}

nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

main {
  min-height: 40vh;
}

section {
  margin-bottom: 3rem;
}

h2 {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

html[data-theme="light"] h2 {
  color: var(--text);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

ul {
  list-style: none;
}

ul.bullets {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0 1.5rem;
}

ul.bullets li {
  margin: 0.65rem 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  margin-top: 1.75rem;
}

.tools-grid li {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--container-bg);
}

.tools-grid img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .tools-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .tools-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  gap: 1rem;
}

.list-item:last-child {
  border-bottom: none;
}

.item-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: right;
}

.interests-list {
  line-height: 2;
}

footer {
  margin-top: 5rem;
  color: var(--text-muted);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.footer-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}

.footer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-icon {
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.9;
}

@media (max-width: 480px) {
  .list-item {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
  }
  .item-meta {
    text-align: left;
  }
}
