/* Foundations */
:root {
  color-scheme: light;
  --bg: #f6f2e9;
  --paper: #fffdf8;
  --surface: #ffffff;
  --surface-soft: #edf1f6;
  --text: #0b1f3a;
  --muted: #5d6d82;
  --blue: #173b67;
  --blue-dark: #0b2442;
  --coral: #f06c5b;
  --yellow: #b7c5d8;
  --border: #d4dbe5;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(11, 31, 58, .13);
}
.site-app, .site-app *, .site-app *::before, .site-app *::after { box-sizing: border-box; }
.site-app [hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font: 400 16px/1.6 system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; }
body:has(.site-app dialog[open]) { overflow: hidden; }
[dir=rtl] body { font-family: Tahoma, Arial, sans-serif; }

/* Keep gotoonion's injected disclaimer compact. Its SVG has no intrinsic size. */
body > div:has(> a[href="mailto:report@gotoonion.site"]) {
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.45;
}
body > div:has(> a[href="mailto:report@gotoonion.site"]) > div:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
body > div:has(> a[href="mailto:report@gotoonion.site"]) > div:first-child > svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.site-app ::selection { background: var(--yellow); color: var(--text); }
.site-app a { color: inherit; text-underline-offset: 4px; }
.site-app img { display: block; max-width: 100%; object-fit: cover; }
.site-app button, .site-app input, .site-app select, .site-app textarea { font: inherit; }
.site-app button { cursor: pointer; }
.site-app :focus-visible { outline: 3px solid #5378a4; outline-offset: 3px; }
.site-app h1, .site-app h2, .site-app h3 { margin: 0 0 1rem; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; }
.site-app h1 { font-size: clamp(3rem, 6vw, 6.8rem); }
.site-app h2 { font-size: clamp(1.65rem, 2.4vw, 2.5rem); }
.site-app h3 { font-size: 1.2rem; }
.site-app p { margin: 0 0 1rem; }
.site-app p:last-child { margin-bottom: 0; }
.shell { width: min(1560px, calc(100% - 64px)); margin-inline: auto; }
.muted, .bio, .lead, .view-count { color: var(--muted); }
.eyebrow, .role { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .12em; line-height: 1.45; text-transform: uppercase; }
.icon { inline-size: 20px; block-size: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
[dir=rtl] .directional { transform: scaleX(-1); }
.site-app a[href^="mailto:"], .site-app a[href^="tel:"] { direction: ltr; unicode-bidi: isolate; display: inline-block; overflow-wrap: anywhere; }
.sr-only, .skip-link:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; inset: 12px auto auto 12px; z-index: 100; padding: 12px 16px; background: white; border: 1px solid var(--border); border-radius: 10px; }

/* Shared chrome */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 253, 248, .94); border-bottom: 1px solid rgba(19, 37, 60, .12); backdrop-filter: blur(16px); }
.header-inner { display: flex; align-items: center; gap: 30px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; flex: none; gap: 12px; width: max-content; color: var(--text); font-size: 1.05rem; font-weight: 850; letter-spacing: -.025em; text-decoration: none; }
.brand img { width: 96px; height: 58px; object-fit: contain; background: transparent; }
.header-inner nav { display: flex; gap: clamp(16px, 2vw, 30px); margin-inline-start: auto; }
.header-inner nav a { display: inline-flex; align-items: center; min-height: 44px; color: #43566f; font-size: .87rem; font-weight: 650; text-decoration: none; }
.header-inner nav a:hover { color: var(--blue); }
.header-inner nav .nav-donate { gap: 7px; min-height: 38px; padding-inline: 14px; border: 1px solid #8d632d; border-radius: 999px; color: #ffd48a; }
.header-inner nav .nav-donate .icon { width: 17px; height: 17px; }
.header-inner nav .nav-donate:hover { border-color: var(--blue); background: var(--surface-soft); }
.language-control { display: flex; align-items: center; gap: 8px; padding-inline: 12px 5px; border: 1px solid var(--border); border-radius: 999px; background: white; }
.language-label { color: var(--muted); font-size: .73rem; }
.language-select-wrap { position: relative; }
.language select { appearance: none; min-height: 42px; max-width: 140px; padding: 8px; padding-inline-end: 28px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .8rem; cursor: pointer; }
.language-chevron { position: absolute; inset-inline-end: 10px; top: 16px; width: 6px; height: 6px; border-inline-end: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.site-footer { margin-top: 64px; border-top: 1px solid #294966; background: #041321; color: #e8f0f8; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; padding-block: 24px; }
.footer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.footer-action { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 11px 16px; border: 1px solid #527493; border-radius: 10px; color: #e4edf6; font-size: .82rem; font-weight: 800; text-decoration: none; transition: border-color 150ms, background 150ms, color 150ms, transform 150ms; }
.footer-action:hover { border-color: #8db7e2; background: rgba(141, 183, 226, .1); color: #fff; transform: translateY(-1px); }
.footer-action-primary { border-color: #d9695d; background: #d9695d; color: #fff; }
.footer-action-primary:hover { border-color: #ef8074; background: #e37468; }
.footer-action-donate { border-color: #956d34; color: #ffd48a; }
.footer-action-donate:hover { border-color: #f4b94f; background: rgba(247, 147, 26, .1); color: #ffe0a8; }
.footer-action-darkweb { border-color: #7357a6; color: #d9c7ff; }
.footer-action-darkweb:hover { border-color: #aa8bea; background: rgba(170, 139, 234, .1); color: #f0e8ff; }
.footer-action .icon { width: 17px; height: 17px; }
.footer-social-links { display: flex; align-items: center; gap: 8px; padding-inline-start: 22px; border-inline-start: 1px solid #294966; }
.footer-social-links a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #395a79; border-radius: 10px; color: #b9ccde; text-decoration: none; transition: border-color 150ms, background 150ms, color 150ms, transform 150ms; }
.footer-social-links a:hover { border-color: #8db7e2; background: #102d4a; color: #fff; transform: translateY(-1px); }
.footer-social-links .icon { width: 19px; height: 19px; }
.social-icon-fill { fill: currentColor; stroke: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 20px; border: 1px solid transparent; border-radius: 999px; background: var(--blue); color: white; font-size: .85rem; font-weight: 800; text-decoration: none; transition: background 150ms, transform 150ms, box-shadow 150ms; }
.button:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11, 36, 66, .24); }
.button.secondary { background: white; color: var(--text); border-color: var(--border); }
.button.secondary:hover { background: var(--surface-soft); }
.links, .contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: var(--blue); font-size: .83rem; font-weight: 750; text-decoration: none; }

/* Editorial banner */
.portal-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(460px, .95fr); min-height: min(680px, calc(100vh - 110px)); margin-top: 28px; overflow: hidden; border: 1px solid #d6dde7; border-radius: 28px; background: #f3f5f8; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; max-width: 850px; padding: clamp(44px, 7vw, 110px); padding-inline-end: 24px; }
.hero-copy h1 { max-width: 10ch; margin-bottom: 24px; color: var(--text); }
.hero-copy > p:not(.eyebrow) { max-width: 54ch; color: #52647b; font-size: clamp(1rem, 1.4vw, 1.2rem); }
.hero-copy .eyebrow { margin-bottom: 20px; color: var(--coral); }
.hero-button { margin-top: 18px; }
.hero-collage { position: relative; min-height: 560px; }
.hero-portrait { position: absolute; z-index: 2; display: grid; place-items: center; overflow: hidden; border: 8px solid var(--paper); border-radius: 26px; background: var(--blue); color: white; box-shadow: 0 24px 55px rgba(35, 49, 70, .22); font-size: 4rem; font-weight: 850; }
.hero-portrait img { width: 100%; height: 100%; }
.hero-portrait-1 { inset: 8% 29% 43% 3%; transform: rotate(-5deg); }
.hero-portrait-2 { inset: 31% 3% 12% 49%; transform: rotate(5deg); background: var(--coral); }
.hero-portrait-3 { inset: 55% 51% 4% 10%; transform: rotate(3deg); background: #31577f; }
.hero-portrait-4 { inset: 4% 4% 61% 64%; transform: rotate(7deg); background: #0b2442; }
.hero-shape { position: absolute; border-radius: 999px; }
.hero-shape-one { width: 340px; height: 340px; inset: 4% 4% auto auto; background: #b7c5d8; }
.hero-shape-two { width: 210px; height: 210px; inset: auto auto 4% 9%; background: var(--coral); opacity: .85; }

/* Homepage directory */
.portal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; padding-top: 54px; }
.directory-main { min-width: 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading > p { max-width: 40ch; color: var(--muted); font-size: .9rem; }
.developer-search { display: flex; align-items: center; gap: 12px; min-width: 0; padding-inline: 18px 6px; margin-bottom: 24px; background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(31, 50, 78, .07); }
.developer-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 59, 103, .14); }
.search-icon { display: flex; color: var(--blue); }
.developer-search input { min-width: 0; width: 100%; min-height: 56px; border: 0; outline: 0; background: transparent; color: var(--text); }
.developer-search input::placeholder { color: #8993a1; }
.developer-search input::-webkit-search-cancel-button { display: none; }
.search-count { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.developer-search button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.folder-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.folder-tab { position: relative; display: flex; min-width: 0; min-height: 112px; align-items: center; justify-content: space-between; gap: 12px; padding: 23px 16px 16px; overflow: hidden; border: 1px solid #c7d1df; border-radius: 8px 16px 16px 16px; background: #e8edf4; color: var(--text); text-align: start; transition: transform 150ms, background 150ms, border-color 150ms; }
.folder-tab::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 42%; height: 9px; border-radius: 0 7px 0 0; background: #8da3be; }
[dir=rtl] .folder-tab::before { inset: 0 0 auto auto; border-radius: 7px 0 0; }
.folder-tab:hover { transform: translateY(-2px); border-color: #6d86a5; }
.folder-tab.active { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 12px 25px rgba(11, 36, 66, .22); }
.folder-tab.active::before { background: var(--coral); }
.folder-tab-label { min-width: 0; }
.folder-tab-label strong, .folder-tab-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-tab-label strong { margin-bottom: 5px; font-size: .95rem; }
.folder-tab-label small { color: inherit; opacity: .72; font-size: .7rem; }
.folder-preview { display: flex; flex: none; padding-inline-start: 12px; }
.folder-preview img, .folder-preview i { display: grid; place-items: center; width: 34px; height: 34px; margin-inline-start: -12px; border: 2px solid currentColor; border-radius: 50%; background: white; color: var(--blue); object-fit: cover; font-size: .72rem; font-style: normal; font-weight: 800; }
.folder-panels { min-width: 0; }
.folder-panel { padding: 24px; border: 1px solid var(--border); border-radius: 8px 20px 20px 20px; background: var(--paper); box-shadow: 0 12px 35px rgba(31, 50, 78, .07); }
.folder-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.folder-heading h3 { margin: 0; font-size: 1.5rem; }
.folder-heading .eyebrow { margin-bottom: 5px; }
.folder-heading > span { color: var(--muted); font-size: .75rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 16px; transition: transform 180ms, border-color 180ms, box-shadow 180ms; }
.card:hover { transform: translateY(-4px); border-color: #8da3be; box-shadow: var(--shadow); }
.card-portrait { display: block; height: 220px; overflow: hidden; background: var(--surface-soft); text-decoration: none; }
.card-portrait img, .card-portrait .photo-placeholder { width: 100%; height: 100%; transition: transform 300ms; }
.card:hover .card-portrait img { transform: scale(1.025); }
.photo-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, #dce4ee, #f3ddd8); color: var(--blue); font-size: 3.5rem; font-weight: 850; }
.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 18px; }
.card-meta { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.card .role { margin: 0 0 8px; }
.category-badge { flex: none; max-width: 42%; overflow: hidden; padding: 3px 7px; border-radius: 999px; background: #fff0e9; color: #a34234; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.card h3 { margin-bottom: 9px; font-size: 1.18rem; }
.card h3 a { text-decoration: none; }
.card-body > p:not(.role) { margin-bottom: 15px; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.card .text-link { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.card .text-link .icon { margin-inline-start: auto; }
.search-empty, .empty { padding: 28px; margin-block: 18px; background: white; border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); }
.search-loading { display: flex; align-items: center; gap: 12px; padding: 20px 24px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); color: var(--muted); }
.search-loading[hidden] { display: none; }
.search-spinner { width: 20px; height: 20px; border: 3px solid var(--border); border-top-color: var(--coral); border-radius: 50%; animation: search-spin 700ms linear infinite; }
@keyframes search-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .search-spinner { animation-duration: 1400ms; } }

/* Sidebar rankings */
.portal-sidebar { position: sticky; top: 104px; grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 18px; min-width: 0; }
.ranking-panel { padding: 24px 20px; border-radius: 18px; background: var(--text); color: white; box-shadow: var(--shadow); }
.ranking-panel header { padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.15); }
.ranking-panel h2 { margin: 0; font-size: 1.55rem; }
.ranking-panel .eyebrow { margin-bottom: 5px; color: #b7cbe4; }
.ranking-list, .recent-list { padding: 0; margin: 8px 0 0; list-style: none; }
.ranking-list li { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.ranking-list li:last-child, .recent-list li:last-child { border-bottom: 0; }
.ranking-list a, .recent-list a { display: flex; align-items: center; min-width: 0; gap: 10px; text-decoration: none; }
.ranking-list img, .ranking-list i, .recent-list img, .recent-list i { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #dce4ee; color: var(--blue); object-fit: cover; font-size: .8rem; font-style: normal; font-weight: 800; }
.ranking-list a span, .recent-list a span { min-width: 0; }
.ranking-list strong, .ranking-list small, .recent-list strong, .recent-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list strong, .recent-list strong { font-size: .82rem; }
.ranking-list small, .recent-list small { color: #aebbd0; font-size: .67rem; }
.rank { color: var(--coral); font-size: .7rem; font-weight: 850; }
.ranking-list > li > b { color: #aebbd0; font-size: .7rem; }
.recent-panel { background: white; color: var(--text); border: 1px solid var(--border); }
.recent-panel header { border-color: var(--border); }
.recent-panel .eyebrow { color: var(--coral); }
.recent-list li { padding: 11px 0; border-bottom: 1px solid var(--border); }
.recent-list small { color: var(--muted); }

/* Scroll rail and calls to action */
.developer-rail-section { grid-column: 1; min-width: 0; margin-top: 4px; padding-block: 30px; border-block: 1px solid var(--border); }
.rail-heading { margin-bottom: 18px; }
.rail-controls { display: flex; gap: 8px; }
.rail-controls button { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 50%; background: white; color: var(--text); }
.rail-controls button:hover { border-color: var(--blue); color: var(--blue); }
.developer-rail { display: flex; gap: 18px; max-width: 100%; padding: 3px 3px 18px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory; scrollbar-color: var(--blue) #ddd9d0; scrollbar-width: thin; }
.rail-card { flex: 0 0 clamp(260px, 22vw, 330px); scroll-snap-align: start; }
.rail-card .card { height: 100%; }
.community-panels { display: grid; grid-template-columns: 1.08fr .92fr; gap: 20px; margin-top: 34px; }
.share-section, .contact-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; min-width: 0; padding: 34px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.share-section { background: #e5ebf3; border-color: #c5d0de; }
.share-section > div:first-child, .contact-section > div:first-child { flex: 1 1 320px; }
.share-section h2, .contact-section h2 { max-width: 27ch; }
.share-section p, .contact-section p { max-width: 60ch; color: var(--muted); font-size: .86rem; }
.social-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; width: 100%; padding-top: 14px; border-top: 1px solid var(--border); }
.social-label { color: var(--muted); font-size: .75rem; }
.social-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--blue); font-size: .8rem; font-weight: 700; text-decoration: none; }
.donation-section { display: grid; grid-template-columns: minmax(220px, .55fr) minmax(300px, 1fr) auto; align-items: center; gap: 20px; padding: 22px 24px; margin-top: 20px; border: 1px solid #5d492b; border-radius: 14px; background: linear-gradient(105deg, #102842, #081a2e); box-shadow: 0 12px 30px rgba(0, 7, 18, .22); }
.donation-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.donation-heading h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.75rem); }
.donation-heading .eyebrow { margin-bottom: 5px; color: #f4b94f; }
.bitcoin-wallet { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 12px 12px 16px; border: 1px solid #3b526d; border-radius: 11px; background: #07182a; }
.bitcoin-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #f7931a; color: white; }
.bitcoin-mark .icon { width: 24px; height: 24px; stroke-width: 2; }
.wallet-details { min-width: 0; }
.wallet-label { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; color: var(--muted); font-size: .72rem; }
.wallet-label .icon { width: 15px; height: 15px; }
.wallet-details code { display: block; overflow: hidden; color: #fff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
.wallet-actions { display: flex; gap: 7px; margin-inline-start: auto; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 11px; border: 1px solid #3d5b78; border-radius: 8px; background: #122f4c; color: var(--text); font-size: .75rem; font-weight: 750; text-decoration: none; }
.icon-button:hover { border-color: #7197bc; background: #193b5d; }
.icon-button.primary { border-color: #c57517; background: #f7931a; color: #171006; }
.icon-button.primary:hover { background: #ffab42; }
.icon-button .icon { width: 16px; height: 16px; }
.donation-note { display: flex; align-items: center; gap: 7px; max-width: 170px; margin: 0; color: #aabbd0; font-size: .72rem; line-height: 1.4; }
.donation-note .icon { flex: none; width: 17px; height: 17px; color: #7fb19a; }
.donation-unavailable { padding: 12px 15px; margin: 0; border: 1px dashed #6c5730; border-radius: 9px; color: var(--muted); font-size: .8rem; }

/* Profile */
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 22px; color: var(--muted); font-size: .82rem; font-weight: 700; text-decoration: none; }
.back-link .icon { transform: rotate(180deg); }
[dir=rtl] .back-link .icon { transform: none; }
.profile-hero { position: relative; display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); align-items: center; gap: clamp(38px, 6vw, 90px); min-height: 600px; padding: clamp(32px, 5vw, 70px); overflow: hidden; border: 1px solid #d0d9e5; border-radius: 28px; background: #e9eef5; }
.profile-hero::after { content: ""; position: absolute; z-index: 0; width: 380px; height: 380px; inset: auto -90px -160px auto; border-radius: 50%; background: var(--coral); opacity: .9; }
.profile-media, .profile-intro { position: relative; z-index: 1; min-width: 0; }
.profile-photo { width: 100%; aspect-ratio: 4 / 5; max-height: 510px; overflow: hidden; border: 9px solid white; border-radius: 24px; box-shadow: var(--shadow); }
.profile-intro h1 { max-width: 12ch; margin-bottom: 18px; font-size: clamp(3rem, 6vw, 6rem); }
.profile-category { display: inline-flex; margin-bottom: 12px; padding: 6px 12px; border-radius: 999px; background: #fff0e9; color: #a34234; font-size: .7rem; font-weight: 800; }
.lead-bio { max-width: 62ch; color: #50627a; font-size: 1.05rem; }
.view-count { margin-block: 16px; font-size: .76rem; }
.profile-nav { display: flex; gap: 6px; max-width: 100%; overflow: auto; padding-block: 11px; margin-top: 14px; border-bottom: 1px solid var(--border); }
.profile-nav a { display: inline-flex; align-items: center; flex: none; min-height: 40px; padding-inline: 13px; border-radius: 999px; color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
.profile-nav a:hover { background: white; color: var(--blue); }
.profile-layout { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: 24px; padding-block: 28px; align-items: start; }
.profile-column-side { grid-column: 1; grid-row: 1; display: grid; gap: 20px; min-width: 0; }
.profile-column-main { grid-column: 2; grid-row: 1; display: grid; gap: 20px; min-width: 0; }
.content-panel, .sidebar-panel { min-width: 0; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: 0 10px 30px rgba(31, 50, 78, .05); }
.content-panel > .eyebrow, .sidebar-panel > .eyebrow { margin-bottom: 20px; padding-bottom: 13px; border-bottom: 1px solid var(--border); }
.prose { max-width: 78ch; color: #344a65; }
.experience-list { display: grid; gap: 0; }
.experience { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 4px 0 25px 26px; border-inline-start: 2px solid #aebfd3; }
[dir=rtl] .experience { padding: 4px 26px 25px 0; }
.experience::before { content: ""; position: absolute; inset: 7px auto auto -7px; width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
[dir=rtl] .experience::before { inset: 7px -7px auto auto; }
.experience:last-child { padding-bottom: 0; }
.experience h3 { margin-bottom: 4px; }
.experience p { margin: 0; color: var(--muted); font-size: .85rem; }
.experience-date { font-size: .73rem !important; }
.experience-description { grid-column: 1 / -1; color: var(--muted); }
.detail-list { margin: 0; }
.detail-list > div { padding-block: 13px; border-bottom: 1px solid var(--border); }
.detail-list > div:first-child { padding-top: 0; }
.detail-list > div:last-child { padding-bottom: 0; border: 0; }
.site-app dt { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.site-app dd { margin: 4px 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.map-panel iframe { display: block; width: 100%; height: 250px; border: 0; border-radius: 12px; background: var(--surface-soft); }
.map-link { display: inline-flex; align-items: center; min-height: 42px; margin-top: 8px; color: var(--blue); font-size: .78rem; }

/* Forms, comments, gallery */
.narrow { max-width: 840px; padding-block: 58px; margin-inline: auto; }
.narrow .lead { margin-bottom: 28px; }
.form-panel { padding: 30px; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.comments-panel .form-panel { padding: 26px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.form-heading { margin-bottom: 12px; font-size: 1.3rem; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-size: .83rem; font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; min-height: 50px; padding: 12px 14px; border: 1px solid #c7cdd7; border-radius: 10px; background: #fffefa; color: var(--text); }
.field textarea { resize: vertical; }
.field [aria-invalid=true] { border-color: var(--danger); }
.field input[type=email] { direction: ltr; text-align: start; }
.field-help:empty { display: none; }
.errorlist { padding-inline-start: 20px; margin: 4px 0; color: var(--danger); font-size: .85rem; }
.form-errors { padding: 12px 16px; margin-bottom: 20px; border-inline-start: 3px solid var(--danger); background: #fff0ee; color: var(--danger); }
.notice { padding: 16px 20px; margin-top: 24px; border: 1px solid #9fb0c6; border-radius: 12px; background: #e9eef5; }
.privacy-note { padding: 13px 16px; border-inline-start: 3px solid var(--blue); background: #edf1f6; color: var(--muted); font-size: .78rem; }
.comment-list { display: grid; gap: 14px; margin-bottom: 24px; }
.comment { padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: #fffdf8; overflow-wrap: anywhere; }
.comment header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.comment time { color: var(--muted); font-size: .73rem; }
.comment p { margin-top: 12px; }
.developer-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.developer-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: white; }
.gallery-trigger { display: block; width: 100%; padding: 0; border: 0; background: var(--surface-soft); cursor: zoom-in; }
.gallery-trigger img { width: 100%; height: 235px; }
.site-app figcaption { padding: 12px; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.image-viewer { width: min(1080px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid var(--border); border-radius: 14px; background: white; color: var(--text); }
.image-viewer::backdrop { background: rgba(11, 22, 38, .88); }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.viewer-toolbar button, .viewer-nav { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--text); }
.viewer-stage { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 8px; height: min(65dvh, 700px); padding: 12px; }
.viewer-image-wrap { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.viewer-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.viewer-error { color: var(--danger); }
.image-viewer [data-viewer-caption] { padding: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: .83rem; }

/* News */
.news-header { max-width: 780px; padding-block: 58px 32px; }
.news-header .lead { max-width: 60ch; }
.news-sources { display: grid; gap: 44px; }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.news-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: white; }
.news-card > img { width: 190px; height: 100%; min-height: 220px; border-inline-end: 1px solid var(--border); }
.news-card-body { display: flex; flex-direction: column; min-width: 0; padding: 20px; }
.news-meta { margin-bottom: 8px; color: var(--muted); font-size: .7rem; }
.news-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.news-card h3 a { text-decoration: none; }
.news-card h3 a:hover { color: var(--blue); }
.news-card-body > p:not(.news-meta) { color: var(--muted); font-size: .83rem; overflow-wrap: anywhere; }
.news-card .text-link { margin-top: auto; }

/* Responsive */
@media (max-width: 1180px) {
  .portal-hero { grid-template-columns: 1fr 440px; }
  .portal-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .folder-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { width: calc(100% - 48px); }
  .portal-hero { grid-template-columns: 1fr .8fr; min-height: 560px; }
  .hero-copy { padding: 46px; }
  .hero-collage { min-height: 500px; }
  .portal-layout { grid-template-columns: minmax(0, 1fr); }
  .portal-sidebar { position: static; grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-panels { grid-template-columns: 1fr; }
  .donation-section { grid-template-columns: minmax(220px, .55fr) minmax(0, 1fr); }
  .donation-note { grid-column: 2; max-width: none; }
  .profile-hero { grid-template-columns: 280px minmax(0, 1fr); min-height: 500px; gap: 35px; padding: 34px; }
  .profile-layout { grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .site-footer { margin-top: 48px; }
  .footer-inner { padding-block: 20px; }
  .footer-actions { width: 100%; }
  .footer-action { flex: 1 1 180px; }
  .footer-social-links { width: 100%; justify-content: center; padding: 14px 0 0; border-inline-start: 0; border-top: 1px solid #294966; }
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding-block: 10px 0; }
  .brand { gap: 0; }
  .brand img { width: 82px; height: 41px; }
  .brand-name { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .header-inner nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 8px; width: 100%; margin: 0; overflow-x: auto; border-top: 1px solid var(--border); }
  .header-inner nav a { flex: none; font-size: .75rem; }
  .language { grid-row: 1; grid-column: 2; }
  .language-label { display: none; }
  .language-control { padding-inline: 8px 2px; }
  .language select { max-width: 104px; }
  .portal-hero { display: block; min-height: auto; margin-top: 16px; }
  .hero-copy { min-height: 470px; padding: 38px 26px; }
  .hero-copy h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-collage { height: 420px; min-height: 0; }
  .hero-portrait-1 { inset: 2% 42% 38% 4%; }
  .hero-portrait-2 { inset: 28% 4% 5% 45%; }
  .hero-portrait-3 { inset: 60% 54% 4% 11%; }
  .hero-portrait-4 { inset: 2% 4% 68% 67%; }
  .portal-layout { padding-top: 40px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .developer-search { padding-inline: 13px 4px; }
  .search-count { display: none; }
  .folder-tabs { display: flex; max-width: 100%; padding: 3px 3px 10px; overflow-x: auto; scroll-snap-type: inline mandatory; }
  .folder-tab { flex: 0 0 230px; scroll-snap-align: start; }
  .folder-panel { padding: 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .card { display: grid; grid-template-columns: 118px minmax(0, 1fr); }
  .card-portrait { width: 118px; height: 100%; min-height: 220px; }
  .card-body { padding: 15px; }
  .card-meta { display: block; }
  .category-badge { display: inline-flex; max-width: 100%; margin-bottom: 7px; }
  .card-body > p:not(.role) { font-size: .78rem; }
  .portal-sidebar { grid-template-columns: 1fr; }
  .developer-rail-section { margin-top: 18px; }
  .rail-heading { display: flex; align-items: end; }
  .rail-card { flex-basis: min(86vw, 320px); }
  .rail-card .card { display: flex; }
  .rail-card .card-portrait { width: 100%; height: 220px; min-height: 0; }
  .community-panels { margin-top: 24px; }
  .share-section, .contact-section { padding: 25px; }
  .donation-section { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .bitcoin-wallet { align-items: stretch; flex-wrap: wrap; padding: 12px; }
  .wallet-details { flex: 1 1 calc(100% - 60px); }
  .wallet-actions { width: 100%; margin: 0; }
  .wallet-actions .icon-button { flex: 1; }
  .donation-note { grid-column: 1; }
  .back-link { margin-top: 16px; }
  .profile-hero { grid-template-columns: 1fr; min-height: auto; gap: 26px; padding: 24px; }
  .profile-photo { max-height: 420px; aspect-ratio: 4 / 3; }
  .profile-intro h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
  .profile-nav { margin-inline: -16px; padding-inline: 16px; }
  .profile-layout { grid-template-columns: 1fr; gap: 18px; padding-block: 20px; }
  .profile-column-side, .profile-column-main { grid-column: 1; grid-row: auto; }
  .profile-column-side { order: 1; }
  .profile-column-main { order: 2; }
  .content-panel, .sidebar-panel, .form-panel { padding: 22px; }
  .experience { grid-template-columns: 1fr; }
  .developer-gallery { grid-template-columns: 1fr; }
  .viewer-stage { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 4px; height: 55dvh; padding: 8px; }
  .image-viewer { width: calc(100% - 16px); }
  .narrow { padding-block: 40px; }
  .news-header { padding-block: 40px 24px; }
  .news-card { grid-template-columns: 110px minmax(0, 1fr); }
  .news-card > img { width: 110px; min-height: 210px; }
  .news-card-body { padding: 16px; }
}
@media (max-width: 420px) {
  .hero-copy { min-height: 430px; }
  .hero-collage { height: 360px; }
  .folder-heading { align-items: start; }
  .card { grid-template-columns: 104px minmax(0, 1fr); }
  .card-portrait { width: 104px; }
  .card h3 { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-app, .site-app *, .site-app *::before, .site-app *::after { transition: none !important; animation: none !important; }
}

/* Dark navy theme */
:root {
  color-scheme: dark;
  --bg: #061426;
  --paper: #0c2038;
  --surface: #102944;
  --surface-soft: #163553;
  --text: #f2f6fb;
  --muted: #a8b8ca;
  --blue: #4778aa;
  --blue-dark: #315b86;
  --coral: #ff7867;
  --yellow: #7891ad;
  --border: #29445f;
  --danger: #ff8a80;
  --shadow: 0 18px 48px rgba(0, 7, 18, .38);
}
body { background: radial-gradient(circle at 80% 0, #102b49 0, transparent 34%), var(--bg); }
::selection { background: #315b86; color: #fff; }
:focus-visible { outline-color: #8bb5e1; }
.skip-link:focus { background: var(--surface); }

.site-header { background: rgba(6, 20, 38, .94); border-bottom-color: var(--border); }
.header-inner nav a { color: #c2cfdd; }
.header-inner nav a:hover { color: #fff; }
.language-control { border-color: var(--border); background: #0d223b; }
.site-footer { background: #030d1a; }
.button { background: #315f8f; }
.button:hover { background: #3e719f; box-shadow: 0 8px 20px rgba(0, 7, 18, .42); }
.button.secondary { background: #142f4c; color: var(--text); border-color: #395776; }
.button.secondary:hover { background: #1b3b5e; }
.text-link, .social-links a, .map-link { color: #8db7e2; }

.portal-hero { border-color: #294966; background: linear-gradient(135deg, #0b2038 0%, #102c4b 100%); }
.hero-copy h1 { color: #fff; }
.hero-copy > p:not(.eyebrow) { color: #bdcad8; }
.hero-portrait { border-color: #dce6f1; background: #173b67; }
.hero-portrait-2 { background: #b94e46; }
.hero-portrait-3 { background: #315b86; }
.hero-portrait-4 { background: #071a30; }
.hero-shape-one { background: #365878; }
.hero-shape-two { background: #c75d52; opacity: .78; }

.developer-search { background: #0d223b; border-color: #34516e; box-shadow: 0 8px 24px rgba(0, 7, 18, .24); }
.developer-search input::placeholder { color: #7f93aa; }
.developer-search:focus-within { border-color: #739dcc; box-shadow: 0 0 0 3px rgba(115, 157, 204, .2); }
.folder-tab { border-color: #31506e; background: #102b49; }
.folder-tab::before { background: #567796; }
.folder-tab:hover { border-color: #6d91b7; background: #153657; }
.folder-tab.active { background: #315f8f; border-color: #6e97c1; box-shadow: 0 12px 28px rgba(0, 7, 18, .34); }
.folder-preview img, .folder-preview i { background: #dce6f1; color: #102944; }
.folder-panel { background: #0b1f36; box-shadow: 0 12px 35px rgba(0, 7, 18, .3); }
.card { background: #102944; }
.card:hover { border-color: #6d91b7; }
.card-portrait { background: #163553; }
.photo-placeholder { background: linear-gradient(145deg, #244d74, #3b526c); color: #f4f8fc; }
.category-badge, .profile-category { background: rgba(255, 120, 103, .14); color: #ffafa4; border: 1px solid rgba(255, 120, 103, .25); }
.search-empty, .empty { background: #102944; }

.ranking-panel { background: #030f20; border: 1px solid #29445f; }
.ranking-list img, .ranking-list i, .recent-list img, .recent-list i { background: #dce6f1; color: #173b67; }
.recent-panel { background: #102944; color: var(--text); border-color: var(--border); }
.recent-panel header, .recent-list li { border-color: var(--border); }
.ranking-list small, .recent-list small, .ranking-list > li > b { color: #a8b8ca; }
.rail-controls button { background: #102944; color: var(--text); }
.rail-controls button:hover { border-color: #8db7e2; color: #8db7e2; }
.developer-rail { scrollbar-color: #4778aa #0b1f36; }
.share-section, .contact-section { background: #102944; }
.share-section { background: #132f4c; border-color: #395b7a; }

.profile-hero { border-color: #31506e; background: linear-gradient(135deg, #0c223b, #153657); }
.profile-photo { border-color: #dce6f1; }
.lead-bio, .prose { color: #c2cfdd; }
.profile-nav a:hover { background: #102944; color: #9bc2e8; }
.content-panel, .sidebar-panel, .form-panel { background: #102944; box-shadow: 0 10px 30px rgba(0, 7, 18, .25); }
.experience { border-inline-start-color: #587a9b; }
.experience::before { border-color: #dce6f1; background: #5f8fbe; box-shadow: 0 0 0 2px #5f8fbe; }

.field input, .field textarea, .field select { border-color: #3b5875; background: #0a1c31; color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: #7890a9; }
.form-errors { background: rgba(180, 35, 24, .2); }
.notice, .privacy-note { border-color: #496986; background: #142f4c; }
.comment { background: #0b1f36; }
.developer-gallery figure { background: #0b1f36; }
.gallery-trigger { background: #07182a; }
.image-viewer { background: #081a2d; color: var(--text); }
.viewer-toolbar button, .viewer-nav { background: #163553; color: var(--text); }

.news-card { background: #102944; }
.news-card h3 a:hover { color: #9bc2e8; }

/* Screenshot-led portal redesign */
.shell { width: min(1720px, calc(100% - 64px)); }
.site-header { background: rgba(3, 13, 26, .94); }
.header-inner { min-height: 86px; }
.header-inner nav a { font-size: .9rem; letter-spacing: .01em; }

.portal-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr);
  min-height: min(720px, calc(100vh - 96px));
  isolation: isolate;
  border-radius: 8px;
  background: linear-gradient(112deg, #0a3a70 0%, #0a3a70 48%, #07305a 100%);
}
.portal-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(3, 13, 26, .55)); pointer-events: none; }
.hero-copy { justify-content: flex-end; max-width: 930px; padding: clamp(44px, 5vw, 78px); padding-inline-end: 24px; }
.hero-copy h1 { max-width: 13ch; margin-bottom: 12px; font-size: clamp(3rem, 4.8vw, 5.2rem); font-weight: 600; letter-spacing: -.02em; }
.hero-copy .eyebrow { margin-bottom: 12px; }
.hero-copy > p:not(.eyebrow) { max-width: 50ch; }
.hero-search-row { display: flex; align-items: stretch; gap: 16px; width: min(820px, 100%); margin-top: 24px; }
.hero-search { flex: 1 1 auto; width: auto; margin: 0; background: rgba(3, 13, 26, .92); border-color: #41698e; border-radius: 12px; }
.hero-search input { font-size: 1rem; }
.hero-search-submit { flex: none; min-width: 128px; border-radius: 12px; background: #55779f; }
.hero-browse-link { margin-top: 12px; color: #d2dfeb; }
.hero-network { position: relative; min-height: 640px; overflow: hidden; }
.network-globe { position: absolute; width: min(830px, 145%); aspect-ratio: 1; inset: 48% auto auto 52%; transform: translate(-34%, -50%); fill: none; stroke: rgba(45, 191, 229, .52); stroke-width: 2; }
.network-globe .network-nodes { fill: #42b1e0; stroke: none; }
.network-portrait { position: absolute; z-index: 2; display: grid; place-items: center; width: 92px; aspect-ratio: 1; overflow: hidden; border: 5px solid rgba(220, 230, 241, .9); border-radius: 50%; background: #173b67; color: #fff; box-shadow: 0 18px 42px rgba(0, 7, 18, .5); font-size: 2rem; font-weight: 850; }
.network-portrait img { width: 100%; height: 100%; }
.network-portrait-1 { inset: 17% 10% auto auto; }
.network-portrait-2 { inset: 48% auto auto 9%; }
.network-portrait-3 { inset: auto 22% 10% auto; }
.network-accent { position: absolute; width: 180px; height: 180px; inset: auto -40px -45px auto; border: 24px solid rgba(255, 120, 103, .7); border-radius: 50%; }

.portal-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; }
.folder-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.folder-tab { min-height: 92px; border-radius: 5px 10px 10px; background: #102944; }
.folder-tab { text-decoration: none; }
.folder-tab.active { background: #315f8f; }
.folder-panel { border-radius: 5px 10px 10px; }
.folder-panel { position: relative; scroll-margin-top: 112px; padding-top: 34px; background-image: repeating-linear-gradient(0deg, transparent 0, transparent 43px, rgba(110, 151, 193, .055) 44px); }
.folder-panel::before { content: ""; position: absolute; width: min(210px, 42%); height: 18px; inset: -18px auto auto 0; border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 18px 0 0; background: #0b1f36; }
[dir=rtl] .folder-panel::before { inset: -18px 0 auto auto; border-radius: 18px 8px 0 0; }
.folder-panel::after { content: "CASE FILE"; position: absolute; inset: 15px 24px auto auto; padding: 6px 10px; border: 2px solid rgba(255, 120, 103, .42); color: #ff9a8d; font-size: .62rem; font-weight: 900; letter-spacing: .16em; transform: rotate(2deg); }
[dir=rtl] .folder-panel::after { inset: 15px auto auto 24px; transform: rotate(-2deg); }
.case-reference { display: block; margin-top: 7px; color: #7897b8; font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.category-section .card-grid { grid-template-columns: 1fr; }
.category-section .card { grid-template-columns: 190px minmax(0, 1fr); min-height: 230px; }
.category-section .card-portrait { min-height: 230px; }
.category-section .card-body { padding: 24px; }
.category-section .card::after { content: ""; position: absolute; inset: 12px 12px auto auto; width: 8px; height: 8px; border-radius: 50%; background: #dce6f1; box-shadow: 0 0 0 4px #566d86; }
.category-section .card { position: relative; }
.search-results { margin-top: 28px; }
.case-file-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; min-height: 260px; padding: 54px 48px 38px; margin: 18px 0 42px; border: 1px solid var(--border); border-radius: 6px; background: linear-gradient(115deg, #0b1f36, #143657); }
.case-file-header h1 { margin-bottom: 12px; font-size: clamp(3rem, 6vw, 6rem); }
.case-file-header .lead { max-width: 52ch; }
.case-file-stamp { display: grid; min-width: 180px; padding: 18px; border: 3px solid rgba(255, 120, 103, .55); color: #ff9a8d; text-align: center; text-transform: uppercase; transform: rotate(2deg); }
.case-file-stamp span { font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
.case-file-stamp strong { margin-top: 5px; font-size: 1.3rem; overflow-wrap: anywhere; }
.standalone-case-file { margin-bottom: 60px; }
.standalone-case-file .case-file-list { grid-template-columns: 1fr; }
.standalone-case-file .card { position: relative; grid-template-columns: 210px minmax(0, 1fr); min-height: 240px; }
.standalone-case-file .card-portrait { min-height: 240px; }
.standalone-case-file .card-body { padding: 26px; }
.standalone-case-file .card::after { content: ""; position: absolute; inset: 12px 12px auto auto; width: 8px; height: 8px; border-radius: 50%; background: #dce6f1; box-shadow: 0 0 0 4px #566d86; }
.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: grid; grid-template-columns: minmax(145px, 42%) minmax(0, 1fr); min-height: 270px; border-radius: 8px; background: #27394f; }
.card-portrait { width: 100%; height: 100%; min-height: 270px; }
.card-body { padding: 20px; }
.card h3 { font-size: clamp(1.15rem, 1.4vw, 1.45rem); }
.portal-sidebar { top: 112px; }
.ranking-panel { padding: 26px 22px; border-radius: 4px; }
.ranking-list li { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; }
.ranking-list .rank { display: grid; place-items: center; width: 38px; height: 54px; border-radius: 9px; background: #24466c; color: #fff; font-size: .8rem; }
.ranking-list img, .ranking-list i { width: 48px; height: 48px; }
.developer-rail-section { border-color: #29445f; }
.rail-card .card { display: flex; min-height: 0; }
.rail-card .card-portrait { width: 100%; height: 250px; min-height: 0; }

.profile-hero {
  grid-template-columns: minmax(260px, 340px) minmax(250px, .72fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  min-height: 520px;
  padding: clamp(30px, 4vw, 58px);
  border-radius: 8px;
  background: #0b1b2e;
}
.profile-hero::after { content: none; }
.profile-media, .profile-identity, .profile-story { position: relative; z-index: 1; min-width: 0; }
.profile-photo { max-height: 430px; border-width: 0; border-radius: 4px; }
.profile-identity h1 { max-width: 11ch; margin-bottom: 14px; font-size: clamp(2.8rem, 4.8vw, 5.4rem); }
.profile-identity > .eyebrow { margin-bottom: 10px; color: #9bc2e8; }
.profile-story { padding-inline-start: clamp(24px, 4vw, 58px); border-inline-start: 1px solid #3a5672; }
.profile-story > .eyebrow { margin-bottom: 18px; color: #ffafa4; }
.profile-story .links { margin-top: 24px; }
.hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; }
.hero-facts div { min-width: 0; padding-top: 12px; border-top: 1px solid #3a5672; }
.hero-facts dd { font-weight: 750; }

.profile-layout { grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); gap: 28px; padding-block: 30px; }
.profile-column-side { position: sticky; top: 112px; }
.profile-column-main { align-content: start; }
.profile-nav { margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 3px; background: #263b59; }
.profile-nav a { flex: 1 1 auto; justify-content: center; min-height: 46px; border-radius: 8px; }
.profile-nav a[aria-selected="true"] { border-radius: 0; background: #4e6382; color: #fff; }
.tabs-enhanced [data-profile-panel] { min-height: 430px; }
.content-panel, .sidebar-panel { border-radius: 14px; }

@media (max-width: 1180px) {
  .portal-hero { grid-template-columns: minmax(0, 1fr) 410px; }
  .card-grid { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: 260px minmax(230px, .75fr) minmax(280px, 1fr); gap: 28px; }
}

@media (max-width: 960px) {
  .shell { width: calc(100% - 48px); }
  .portal-hero { grid-template-columns: minmax(0, 1fr) 350px; min-height: 600px; }
  .hero-copy { padding: 46px; }
  .hero-network { min-height: 500px; }
  .portal-layout { grid-template-columns: minmax(0, 1fr); }
  .portal-sidebar { position: static; grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-hero { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .profile-story { grid-column: 1 / -1; padding: 26px 0 0; border-inline-start: 0; border-top: 1px solid #3a5672; }
  .profile-layout { grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .header-inner nav { flex-wrap: wrap; overflow: visible; }
  .portal-hero { display: block; min-height: auto; }
  .hero-copy { min-height: 0; padding: 42px 24px 24px; }
  .hero-copy h1 { font-size: clamp(2.8rem, 13vw, 4.2rem); }
  .hero-search-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-search-submit { width: 100%; }
  .hero-network { height: 320px; min-height: 0; }
  .network-globe { width: 470px; transform: translate(-48%, -50%); }
  .network-portrait { width: 68px; border-width: 4px; }
  .network-portrait-1 { inset: 12% 8% auto auto; }
  .network-portrait-2 { inset: 47% auto auto 8%; }
  .network-portrait-3 { inset: auto 20% 6% auto; }
  .folder-tabs { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; overflow: visible; }
  .folder-tab { width: 100%; min-height: 92px; }
  .folder-tab-label strong { white-space: normal; overflow-wrap: anywhere; }
  .folder-panel { margin-top: 18px; padding-top: 28px; }
  .folder-panel::after { display: none; }
  .category-section .card { grid-template-columns: 118px minmax(0, 1fr); min-height: 220px; }
  .category-section .card-portrait { width: 118px; min-height: 220px; }
  .case-file-header { display: block; min-height: 0; padding: 34px 24px; }
  .case-file-stamp { width: max-content; min-width: 150px; margin-top: 28px; }
  .standalone-case-file .card { grid-template-columns: 118px minmax(0, 1fr); min-height: 220px; }
  .standalone-case-file .card-portrait { width: 118px; min-height: 220px; }
  .card { grid-template-columns: 118px minmax(0, 1fr); min-height: 220px; }
  .card-portrait { width: 118px; min-height: 220px; }
  .portal-sidebar { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: 1fr; gap: 24px; padding: 22px; }
  .profile-photo { max-height: 480px; aspect-ratio: 4 / 5; }
  .profile-identity h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .profile-story { grid-column: auto; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-column-side { position: static; order: 1; }
  .profile-column-main { order: 2; }
  .profile-nav { display: none; }
  .tabs-enhanced [data-profile-panel] { min-height: 0; }
}

@media (max-width: 420px) {
  .hero-search { gap: 8px; padding-inline: 12px 3px; }
  .hero-copy { padding-inline: 20px; }
  .card { grid-template-columns: 104px minmax(0, 1fr); }
  .card-portrait { width: 104px; }
  .hero-facts { grid-template-columns: 1fr; }
}

