/* Content-only presentation. Keep navigation, footer and background identity independent. */
main.shell {
  --text: #f2f3f7;
  --muted: #c0c4d2;
  --line: rgba(220, 224, 240, .18);
  --card: #20212c;
  --accent: #c1bcff;
  color: var(--text);
  position: relative;
  isolation: isolate;
  padding-right: 38px;
  padding-left: 38px;
  padding-bottom: 36px;
  margin-top: 96px;
  margin-bottom: 48px;
  width: min(920px, calc(100% - 48px));
  border-radius: 20px;
  background: rgba(16, 17, 26, .91);
  border: 1px solid var(--line);
}
main.shell, main.shell.page { padding-top: 42px; }
[data-theme="light"] main.shell {
  --text: #20222c;
  --muted: #505565;
  --line: rgba(35, 40, 60, .17);
  --card: #fff;
  --accent: #4e469f;
  background: rgba(255, 255, 255, .94);
}
main .intro { padding: 8px 0 40px; max-width: 620px; }
main .intro .eyebrow { font-size: 11px; letter-spacing: .06em; margin-bottom: 16px; }
main .intro h1 { font-size: 34px; font-weight: 650; letter-spacing: -.025em; margin-bottom: 18px; }
main .intro-description { font-size: 14px; line-height: 1.95; color: var(--muted); margin-bottom: 20px; }
main .intro-links { display: flex; gap: 24px; font-size: 12px; }
main a:hover { color: var(--accent); }
main .intro-links a { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line); }
main .section { padding: 30px 0; }
main .section:last-child { padding-bottom: 0; }
main .section-heading { align-items: baseline; margin-bottom: 12px; }
main .section-heading h2 { font-size: 19px; letter-spacing: 0; }
main .section-description { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
main .text-link { white-space: nowrap; }
main .project-entry { padding: 22px 0; border-bottom: 1px solid var(--line); }
main .project-entry:last-child { border-bottom: 0; padding-bottom: 0; }
main .project-entry h3, main .post-row h3 { font-size: 16px; font-weight: 600; letter-spacing: 0; }
main .project-entry h3 a { display: flex; justify-content: space-between; gap: 16px; }
main .project-entry .muted { font-size: 13px; max-width: 660px; margin-bottom: 10px; }
main .project-stack { color: var(--muted); font-size: 11px; margin: 0; }
main .post-row { grid-template-columns: 115px minmax(0, 1fr) 20px; gap: 20px; padding: 22px 0; }
main .post-row .muted { font-size: 13px; }
main .tags a, main .tags span { border: 0; background: transparent; padding: 0; font-size: 11px; }
main .tags { gap: 12px; }
main .post-date span { display: none; }
main .empty { border: 0; border-radius: 0; padding: 20px 0; margin: 0; }
main .page-heading { margin-bottom: 28px; }
main .page-heading h1, main .article-header h1 { font-size: 30px; }
main .page-heading .muted { font-size: 13px; margin-top: 12px; }
main .article-layout { grid-template-columns: minmax(0, 1fr) 155px; gap: 28px; }
main .toc { background: transparent; box-shadow: none; backdrop-filter: none; padding: 16px; }
main .button { background: var(--card); color: var(--text); border-color: var(--line); backdrop-filter: none; }
main .button.primary { background: var(--text); color: var(--card); }
main .prose { font-size: 16px; }
main .prose h2 { font-size: 22px; }
main .prose h3 { font-size: 18px; }
main .project-entry, main .post-row > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  main.shell { width: calc(100% - 28px); padding: 28px 20px; margin-top: 84px; margin-bottom: 28px; border-radius: 16px; }
  main.shell.page { padding-top: 28px; }
  main .intro { padding: 0 0 28px; }
  main .intro h1 { font-size: 30px; }
  main .section-heading { gap: 12px; }
  main .section-description { max-width: 220px; }
  main .post-row { grid-template-columns: minmax(0, 1fr) 20px; gap: 8px; }
  main .post-date { grid-column: 1 / -1; }
  main .article-layout { display: flex; }
  main .page-heading h1, main .article-header h1 { font-size: 26px; }
}

/* Independent glass surfaces: content stays tinted for legibility. */
main.shell.home-page {
  --panel: rgba(26, 29, 43, .78);
  --panel-edge: rgba(235, 242, 255, .23);
  --panel-shine: rgba(226, 235, 255, .10);
  --panel-shadow: 0 16px 44px rgba(0, 0, 0, .18);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(265px, 1fr);
  gap: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  width: min(1040px, calc(100% - 48px));
}
[data-theme="light"] main.shell.home-page {
  --panel: rgba(255, 255, 255, .78);
  --panel-edge: rgba(255, 255, 255, .9);
  --panel-shine: rgba(255, 255, 255, .55);
  --panel-shadow: 0 14px 38px rgba(54, 64, 100, .10), 0 0 0 1px rgba(40, 50, 80, .05);
}
main.home-page > section,
main.home-page > section:last-child {
  grid-column: 1 / -1;
  position: relative;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 32px;
  border: 1px solid var(--panel-edge);
  border-radius: 30px;
  background: linear-gradient(145deg, var(--panel-shine), transparent 48%), var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .03), var(--panel-shadow);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
}
main.home-page > .intro { grid-column: 1; padding: 34px; }
main.home-page > .explore-panel { grid-column: 2; padding: 26px 22px; align-content: center; }
main .profile-mark { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }
main .profile-mark img { padding: 7px; width: 48px; height: 48px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.8); border-radius: 16px; box-shadow: 0 5px 14px #0002; }
main .profile-mark span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
main .intro h1 { font-size: 36px; font-weight: 650; margin-bottom: 16px; }
main .intro-description { max-width: 440px; font-size: 13px; line-height: 1.95; margin-bottom: 24px; }
main .intro-links { gap: 10px; flex-wrap: wrap; }
main .intro-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 17px; text-decoration: none; background: rgba(200,210,255,.09); border: 1px solid var(--panel-edge); border-radius: 99px; box-shadow: inset 0 1px 0 #ffffff19; transition: background .2s, transform .2s; }
main .intro-links a:first-child { background: var(--text); color: var(--card); border-color: transparent; }
main .explore-panel .eyebrow { padding-left: 8px; margin-bottom: 15px; letter-spacing: .08em; }
main .explore-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 17px 8px; border-radius: 18px; transition: background .2s, transform .2s; }
main .explore-item + .explore-item { margin-top: 2px; }
main .explore-item + .explore-item::before { content: ""; position: absolute; top: -1px; left: 48px; right: 8px; height: 1px; background: var(--line); }
main .explore-item b { display: block; font-size: 13px; font-weight: 600; }
main .explore-item small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
main .explore-arrow { display: flex; margin-left: auto; color: var(--muted); opacity: .8; }
main .explore-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
main .app-icon { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 32px; color: var(--text); }
main .app-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
main .section-heading .eyebrow { font-size: 10px; letter-spacing: .08em; }
main .section-heading h2 { font-size: 21px; }
main .closing-note { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: center; }
main .closing-note h2 { font-size: 20px; letter-spacing: 0; }
main .closing-note p:not(.eyebrow) { font-size: 13px; line-height: 1.9; color: var(--muted); }
@media (hover: hover) {
  main .explore-item:hover { background: rgba(145,162,211,.12);  color: var(--text); }
  main .intro-links a:hover { filter: brightness(1.08); }
}
@media (max-width: 700px) {
  main.shell.home-page { grid-template-columns: 1fr; width: calc(100% - 28px); gap: 18px; }
  main.home-page > section, main.home-page > section:last-child { grid-column: 1; padding: 26px 22px; border-radius: 26px; }
  main.home-page > .intro, main.home-page > .explore-panel { grid-column: 1; }
  main.home-page > .intro { padding: 30px 26px; }
  main .intro h1 { font-size: 32px; }
  main .profile-mark { margin-bottom: 20px; }
  main .section-heading h2 { font-size: 19px; }
  main .closing-note { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-transparency: reduce) {
  main.shell.home-page { --panel: #202330; }
  [data-theme="light"] main.shell.home-page { --panel: #f7f8fc; }
  main.home-page > section { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* Shared interior pages: quiet reading surface, glass controls. */
main.shell.page {
  border-radius: 30px;
  border-color: rgba(235,242,255,.23);
  background: linear-gradient(145deg,rgba(226,235,255,.08),transparent 45%),rgba(23,26,38,.90);
  box-shadow: inset 0 1px 0 #ffffff24,0 18px 48px #0002;
  backdrop-filter: blur(26px) saturate(125%);
  -webkit-backdrop-filter: blur(26px) saturate(125%);
}
[data-theme="light"] main.shell.page {
  border-color: rgba(255,255,255,.9);
  background: linear-gradient(145deg,#ffffff90,transparent 45%),rgba(255,255,255,.90);
  box-shadow: inset 0 1px 0 #fff,0 16px 42px #36406418;
}
main.page .page-heading { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
main.page .page-heading .eyebrow { letter-spacing: .10em; font-size: 10px; }
main.page .page-heading h1 { margin-bottom: 12px; }
main.page > .text-link { display: inline-block; margin-bottom: 22px; }
main .search { padding: 6px; gap: 6px; border-radius: 22px; background: rgba(145,162,211,.08); border: 1px solid var(--line); }
main .search input, main .search select { border: 0; background: transparent; border-radius: 16px; padding: 11px 14px; font-size: 13px; }
main .search input::placeholder { color: var(--muted); opacity: 1; }
main .search select option { background: var(--card); color: var(--text); }
main .search .button { border-radius: 17px; min-width: 70px; }
main .project-entry { padding: 26px 0; }
main .project-entry h3 span, main .row-arrow { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; }
main .post-row { grid-template-columns: 115px minmax(0,1fr) 30px; }
main .post-row h3 { line-height: 1.6; }
main .post-date { padding-top: 5px; font-variant-numeric: tabular-nums; }
main .tags a, main .tags span { padding: 3px 9px; border-radius: 99px; background: rgba(145,162,211,.10); }
main .article-header { margin-top: 12px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
main .article-header h1 { line-height: 1.5; }
main .article-header > .muted { font-size: 14px; }
main .toc { border-radius: 20px; border: 1px solid var(--line); background: rgba(145,162,211,.07); }
main .toc a { padding: 4px 0; }
main .toc .button { font-size: 11px; padding: 8px 13px; }
main .prose pre { border-radius: 18px; }
main .prose blockquote { border-left-width: 2px; border-radius: 0 14px 14px 0; }
@media (max-width: 640px) {
  main.shell.page { border-radius: 26px; }
  main .search { border-radius: 20px; }
  main .search input { width: 100%; }
  main .post-row { grid-template-columns: minmax(0,1fr) 30px; }
}
@media (prefers-reduced-transparency: reduce) {
  main.shell.page { background: #202330; backdrop-filter: none; -webkit-backdrop-filter: none; }
  [data-theme="light"] main.shell.page { background: #f7f8fc; }
}

/* Quiet, consistent feedback for controls rather than motion on content. */
main .explore-item:active, main .intro-links a:active { transform: scale(.98); }
main .explore-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; background: rgba(145,162,211,.12); }
main .intro-links a { transition: background .18s, transform .18s, filter .18s; }
.nav .nav-btn svg { stroke-width: 1.5; }
@media (prefers-reduced-motion: reduce) {
  main .explore-item:active, main .intro-links a:active { transform: none; }
}
@media (prefers-contrast: more) {
  main.shell { --muted: #e0e4ef; --line: rgba(235,242,255,.45); }
  [data-theme="light"] main.shell { --muted: #343946; --line: rgba(35,40,60,.4); }
}
