/* Hanes Folio design system
   Canvas: cool mist. Tiles: white. One accent per person, used boldly in one place (the intro tile). */
@font-face { font-family: 'Inter Display'; src: url('/static/fonts/inter-display-800.woff') format('woff'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('/static/fonts/inter-display-600.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/inter-600.woff') format('woff'); font-weight: 600; font-display: swap; }

:root {
  --canvas: #e9ecf1;
  --surface: #ffffff;
  --text: #1a1f2b;
  --muted: #5b6372;
  --line: #d5dae2;
  --tint: #f1f3f6;
  --accent: #2b50e0;
  --on-accent: #ffffff;
  --danger: #c0262d;
  --display: 'Inter Display', 'Segoe UI Variable Display', system-ui, sans-serif;
  --sans: 'Inter', 'Segoe UI Variable Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-tile: 22px;
  --r-ctl: 12px;
  --gap: 14px;
}
.accent-ink { --accent: #1a1f2b; }
.accent-ocean { --accent: #2b50e0; }
.accent-forest { --accent: #127649; }
.accent-plum { --accent: #7b3fb4; }
.accent-ember { --accent: #ac4715; }
.accent-rose { --accent: #bc2b5d; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 400 16px/1.6 var(--sans); font-feature-settings: 'cv11'; -webkit-font-smoothing: antialiased; }
/* Very long words or links (a pasted URL, a name without spaces) wrap instead of widening the page. */
body { overflow-wrap: anywhere; }
.btn, .pill, .period, .dur, .status, .topbar nav a, .facts dt { overflow-wrap: normal; }
.chips li, .langs li, .certs li, .refs li, .lk-host, .rail-links a { min-width: 0; }
.ph-grid > *, .pro-id > *, .pro-name, .ph-text, .intro-text, .tl-head > *, .m-side, .m-main { min-width: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -0.025em; }
h3 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; left: -999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }

/* ---------- top bar ---------- */
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font: 800 1.45rem/1 var(--display); letter-spacing: -0.04em; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.brand::before { content: ''; width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 90deg, var(--accent) 0 25%, #f5b83d 0 50%, var(--text) 0 75%, #8fb3ff 0); }
.topbar nav { display: flex; align-items: center; gap: 22px; }
.topbar nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.97rem; white-space: nowrap; }
.topbar nav .btn { white-space: nowrap; }
.topbar nav a:not(.btn):hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--text); background: var(--text); color: #fff; font: 600 0.98rem var(--sans); text-decoration: none; cursor: pointer; transition: transform 0.12s ease, background-color 0.12s ease; }
.btn:hover { background: var(--accent); border-color: var(--accent); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--line); }
.btn-quiet:hover { background: var(--surface); color: var(--text); border-color: var(--text); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #9c1c22; border-color: #9c1c22; }
.btn-on-accent { background: var(--on-accent); color: var(--accent); border-color: var(--on-accent); }
.btn-on-accent:hover { background: var(--on-accent); color: var(--text); border-color: var(--on-accent); }
.btn-ghost-accent { background: transparent; color: var(--on-accent); border-color: color-mix(in srgb, var(--on-accent) 55%, transparent); }
.btn-ghost-accent:hover { background: color-mix(in srgb, var(--on-accent) 14%, transparent); border-color: var(--on-accent); }

/* ---------- tiles (shared by landing mosaic and Bento pages) ---------- */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 22px; min-width: 0; }
.tile-label { font: 600 0.9rem/1.2 var(--sans); letter-spacing: 0; color: var(--muted); margin: 0 0 14px; }
.t-intro { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.t-intro .headline, .t-intro .location { color: color-mix(in srgb, var(--on-accent) 88%, transparent); }
.lk-badge { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--text); font: 800 0.95rem/1 var(--display); letter-spacing: -0.02em; flex: none; }

/* ---------- landing ---------- */
.hero { padding: 40px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.045em; line-height: 0.98; max-width: 11ch; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 32em; margin: 24px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 92px; gap: 12px; }
.mosaic .tile { padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; font-size: 0.92rem; }
.mz-intro { grid-column: span 2; grid-row: span 2; }
.mz-intro strong { font: 800 1.55rem/1.05 var(--display); letter-spacing: -0.035em; margin-top: auto; }
.mz-intro span:not(.avatar) { opacity: 0.85; }
.mz-intro .avatar { background: color-mix(in srgb, var(--on-accent) 22%, transparent); color: var(--on-accent); margin-bottom: auto; }
.mz-link { justify-content: space-between !important; font-weight: 600; }
.mz-proj { grid-column: span 2; grid-row: span 2; padding: 0 !important; overflow: hidden; font-weight: 600; }
.mz-proj > span:last-child { padding: 12px 16px 14px; }
.mz-shot { flex: 1; background: #f5b83d; display: flex; align-items: flex-end; gap: 10px; padding: 18px 18px 0; }
.mz-shot i { flex: 1; background: #fff; border-radius: 10px 10px 0 0; height: 70%; }
.mz-shot i:nth-child(2) { height: 92%; background: var(--text); }
.mz-shot i:nth-child(3) { height: 52%; }
.mz-skills { grid-column: span 2; justify-content: flex-start !important; overflow: hidden; }
.mz-skills .tile-label, .mz-msg .tile-label { margin-bottom: 8px; }
.mz-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 1.65rem; overflow: hidden; } /* one row only: chips that do not fit drop out whole */
.mz-chips b { font-weight: 600; font-size: 0.82rem; padding: 3px 10px; border-radius: 999px; background: var(--tint); }
.mz-langs { grid-column: span 2; justify-content: flex-start !important; gap: 2px !important; }
.mz-langs .tile-label { margin-bottom: 6px; }
.mz-langs span b { font-weight: 600; margin-right: 4px; }
.mz-msg { grid-column: span 2; justify-content: flex-start !important; background: var(--text) !important; color: #fff; border-color: var(--text) !important; }
.mz-msg .tile-label { color: #b9c0cc; }
.mz-btn { align-self: flex-start; background: #fff; color: var(--text); font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-top: auto; }
.steps { padding: 8px 0 56px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 22px 24px; }
.steps li::before { content: counter(s); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: #fff; font: 800 0.9rem/1 var(--display); margin-bottom: 14px; }
.steps strong { display: block; font: 800 1.2rem/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 4px; }
.steps span { color: var(--muted); }

/* ---------- general sections, directory ---------- */
.sec { padding: 48px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; gap: 16px; }
.sec h2 { font-size: 1.6rem; margin-bottom: 18px; }
.sec-head h2 { margin: 0; }
.page-title { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -0.04em; margin-bottom: 22px; }
.empty { color: var(--muted); }
.avatar { border-radius: 50%; object-fit: cover; background: var(--tint); flex: none; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 14%, white); color: var(--accent); font: 800 1.1rem/1 var(--display); letter-spacing: -0.02em; }
.avatar-sm { width: 48px; height: 48px; } .avatar-md { width: 52px; height: 52px; }
.avatar-lg { width: 128px; height: 128px; font-size: 2.6rem; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--gap); }
.person { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--text); text-decoration: none; transition: border-color 0.12s ease; }
.person:hover { border-color: var(--text); }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-text strong { font-weight: 600; }
.person-text span { color: var(--muted); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { display: flex; gap: 10px; margin-bottom: 26px; max-width: 560px; }
.search input { flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; font: inherit; background: var(--surface); }
.search input:focus { outline: none; border-color: var(--text); }
.pager { display: flex; justify-content: space-between; margin-top: 28px; color: var(--muted); }

/* ---------- profile: shared pieces ---------- */
.headline { font-size: 1.2rem; margin: 8px 0 2px; line-height: 1.4; }
.location { color: var(--muted); margin-bottom: 10px; }
.links { list-style: none; padding: 0; margin: 12px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.links a { display: inline-block; padding: 5px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.93rem; font-weight: 600; }
.links a:hover { border-color: var(--text); }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 0; }
.prose p { margin-bottom: 0.85em; max-width: 42em; }
.prose p:last-child { margin-bottom: 0; }
.bullets { margin: 0 0 0.85em; padding-left: 1.2em; }
.bullets li { margin-bottom: 0.3em; }
.bullets li::marker { color: var(--accent); }
.bullets:last-child { margin-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.timeline li { position: relative; padding-left: 22px; }
.timeline li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 4px; top: calc(0.55em + 13px); bottom: -16px; width: 1px; background: var(--line); }
.tl-head { display: flex; justify-content: space-between; gap: 4px 16px; align-items: baseline; flex-wrap: wrap; }
.tl-head h3 { font-size: 1.05rem; }
.at { font-family: var(--sans); font-weight: 400; color: var(--muted); }
.period { color: var(--muted); font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline .prose { margin-top: 4px; color: #3b4250; font-size: 0.97rem; }
.timeline .prose p { margin-bottom: 0.4em; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--tint); color: var(--text); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 0.93rem; }
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); align-items: start; }
.projects li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.proj-body { padding: 18px; }
.proj-body h3 { font-size: 1.08rem; margin-bottom: 4px; }
.proj-body h3 a { color: var(--text); }
.proj-body p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.proj-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tint); }
.certs, .langs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.certs li, .langs li { display: flex; flex-direction: column; line-height: 1.35; }
.certs strong, .langs strong { font-weight: 600; }
.certs strong a { color: var(--text); }
.certs span, .langs span { color: var(--muted); font-size: 0.92rem; }
.langs { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.banner { background: #fff1c7; color: #4f3a00; text-align: center; padding: 10px 20px; font-size: 0.95rem; font-weight: 600; }

/* ---------- status pill, meters, small shared bits ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 5px 12px 5px 10px; border-radius: 999px; font-weight: 600; font-size: 0.88rem; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.status i { width: 9px; height: 9px; border-radius: 50%; background: #18a957; box-shadow: 0 0 0 3px rgba(24, 169, 87, 0.2); }
.status-open i { background: #e0a100; box-shadow: 0 0 0 3px rgba(224, 161, 0, 0.22); }
.t-intro .status, .pro-hero .status { border-color: transparent; }
.tl-meta { color: var(--muted); font-size: 0.92rem; margin: 2px 0 0; }
.meter-5 { display: inline-flex; gap: 3px; margin-top: 6px; }
.meter-5 i { width: 16px; height: 5px; border-radius: 3px; background: var(--line); }
.meter-5 i.on { background: var(--accent); }
.refs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.refs li { display: flex; flex-direction: column; line-height: 1.4; }
.refs strong { font-weight: 600; }
.refs span { color: var(--muted); font-size: 0.92rem; }
.aw-desc { color: #3b4250 !important; margin-top: 2px; }

/* ---------- layout: professional (default) ---------- */
.pro-hero { background: var(--accent); color: var(--on-accent); padding: 44px 0 0; margin-top: 4px; }
.pro-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: end; padding-bottom: 34px; }
.pro-avatar { width: 148px; height: 148px; border: 5px solid color-mix(in srgb, var(--on-accent) 35%, transparent); font-size: 3rem; }
.pro-hero .avatar-fallback { background: color-mix(in srgb, var(--on-accent) 18%, transparent); color: var(--on-accent); }
.pro-name h1 { font-size: clamp(2.6rem, 5.6vw, 4.5rem); letter-spacing: -0.047em; line-height: 0.95; }
.pro-name .headline { font-size: 1.22rem; margin: 12px 0 0; color: color-mix(in srgb, var(--on-accent) 86%, transparent); max-width: 38em; }
.pro-actions { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 0; border-top: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent); }
.facts div { padding: 18px 24px 22px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent); }
.facts dt { font-size: 0.88rem; color: color-mix(in srgb, var(--on-accent) 88%, transparent); margin-bottom: 2px; }
.facts dd { margin: 0; font: 600 1.06rem/1.35 var(--display); letter-spacing: -0.01em; }
.pro-nav { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.pro-nav .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pro-nav a { flex: none; padding: 16px 12px 14px; color: var(--muted); font-weight: 600; font-size: 0.95rem; text-decoration: none; border-bottom: 2px solid transparent; }
.pro-nav a:hover { color: var(--text); }
.pro-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.pro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; padding: 26px 0 40px; align-items: start; }
.pro-main, .pro-rail { display: grid; gap: 18px; min-width: 0; }
.pro-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 30px; scroll-margin-top: 72px; min-width: 0; }
.pro-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.pro-rail .pro-card { padding: 22px 24px; }
.pro-rail .pro-card h2 { font-size: 1.08rem; letter-spacing: -0.01em; margin-bottom: 14px; }
.pro-summary { font-size: 1.07rem; line-height: 1.7; }
.pro-list { list-style: none; margin: 0; padding: 0; }
.pro-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding: 20px 0; }
.pro-item:first-child { padding-top: 0; }
.pro-item:last-child { padding-bottom: 0; }
.pro-item + .pro-item { border-top: 1px solid var(--line); }
.mono { width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 11%, white); color: var(--accent); font: 800 1.05rem/1 var(--display); letter-spacing: -0.02em; }
.mono-edu { background: var(--tint); color: var(--text); }
.pro-body h3 { font-size: 1.12rem; }
.pro-org { margin: 2px 0 0; font-weight: 600; color: #3b4250; }
.pro-when { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; font-variant-numeric: tabular-nums; }
.dur { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--text); font-size: 0.82rem; font-weight: 600; }
.pro-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; }
.pro-body .prose { margin-top: 10px; color: #333a47; }
.pro-card .projects { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pro-card .projects li { background: var(--tint); border-color: transparent; }
.rail-links { list-style: none; margin: 0; padding: 0; }
.rail-links li + li { border-top: 1px solid var(--line); }
.rail-links a { display: block; padding: 9px 0; color: var(--text); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-links a:hover { color: var(--accent); }
.pro-rail .langs { grid-template-columns: 1fr; gap: 12px; }
.pro-rail .langs li { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; }
.pro-rail .langs li span:not(.meter-5) { grid-column: 1; font-size: 0.88rem; }
.pro-rail .langs .meter-5 { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.layout-professional .contact-sec .narrow { width: min(1120px, 100% - 40px); }
.layout-professional .contact-sec { padding-top: 8px; }

/* ---------- layout: bento (default) ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--gap); padding: 8px 0 32px; align-items: start; }
.bento.packed { grid-auto-rows: 1px; }
.bento:not(.packed) > .tile { align-self: stretch; }
.bento > .tile { animation: settle 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.bento > .tile:nth-child(2) { animation-delay: 40ms; } .bento > .tile:nth-child(3) { animation-delay: 80ms; } .bento > .tile:nth-child(4) { animation-delay: 120ms; }
.bento > .tile:nth-child(5) { animation-delay: 160ms; } .bento > .tile:nth-child(6) { animation-delay: 200ms; } .bento > .tile:nth-child(n+7) { animation-delay: 240ms; }
@keyframes settle { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.bento .t-intro { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; gap: 18px; padding: 30px; min-height: 360px; }
.t-intro .avatar-lg { width: 108px; height: 108px; border: 4px solid color-mix(in srgb, var(--on-accent) 30%, transparent); }
.t-intro .avatar-fallback { background: color-mix(in srgb, var(--on-accent) 20%, transparent); color: var(--on-accent); }
.t-intro .intro-text { margin-top: auto; }
.t-intro h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); letter-spacing: -0.045em; line-height: 0.98; }
.t-intro .headline { font-size: 1.15rem; margin-top: 12px; }
.t-intro .location { margin: 4px 0 0; }
.t-intro .ph-actions { margin: 0; }
.t-about { grid-column: span 2; }
.t-about.tall { grid-row: span 2; }
.t-link { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-height: 132px; transition: border-color 0.12s ease, transform 0.12s ease; }
.t-link:hover { border-color: var(--text); transform: translateY(-2px); }
.t-link .lk-badge { margin-bottom: auto; background: color-mix(in srgb, var(--accent) 12%, white); color: var(--accent); }
.lk-name { font-weight: 600; margin-top: 14px; }
.lk-host { color: var(--muted); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-exp { grid-column: span 2; }
.t-exp.tall { grid-row: span 2; }
.t-edu, .t-skills { grid-column: span 2; }
.t-proj { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.t-proj.has-img { grid-column: span 2; }
.t-proj:not(.has-img) .proj-body { display: flex; flex-direction: column; height: 100%; }
.t-proj:not(.has-img) .proj-body::before { content: ''; width: 40px; height: 40px; border-radius: 12px; margin-bottom: auto; background: var(--tint) radial-gradient(circle at 50% 50%, var(--accent) 0 5px, transparent 6px); }
.t-proj:not(.has-img) h3 { margin-top: 16px; }
.t-proj .proj-img { border-bottom: 1px solid var(--line); }
.t-certs.wide { grid-column: span 2; }
.layout-bento .contact-sec { background: transparent; border: 0; padding: 0 0 40px; }
.layout-bento .contact-sec .narrow { width: min(1120px, 100% - 40px); background: var(--text); color: #fff; border-radius: var(--r-tile); padding: 34px 36px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 8px 40px; }
.layout-bento .contact-sec h2 { color: #fff; font-size: 2rem; letter-spacing: -0.035em; }
.layout-bento .contact-sec .muted { color: #b9c0cc; }
.layout-bento .contact-sec .contact-form, .layout-bento .contact-sec .note { grid-column: 2; grid-row: 1 / span 3; }
.layout-bento .contact-sec .note { grid-row: auto; }
.layout-bento .contact-sec .field label { color: #e4e7ec; }
.layout-bento .contact-sec .field input, .layout-bento .contact-sec .field textarea { background: #252b39; border-color: #3a4152; color: #fff; }
.layout-bento .contact-sec .btn { background: #fff; color: var(--text); border-color: #fff; }
.layout-bento .contact-sec .btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- layout: classic ---------- */
.profile-head { padding: 40px 0 8px; }
.ph-grid { display: flex; gap: 32px; align-items: center; }
.profile-head h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); letter-spacing: -0.045em; }
.pf-body { padding-bottom: 12px; }
.pf-sec { padding: 26px 30px; margin-top: var(--gap); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); }
.pf-sec h2 { font-size: 1.35rem; margin-bottom: 16px; }
.pf-body .projects li { background: var(--tint); border-color: transparent; }

/* ---------- layout: modern (sidebar) ---------- */
.modern-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; padding: 16px 0 24px; align-items: start; }
.m-side { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 28px; overflow: hidden; }
.m-side::before { content: ''; display: block; height: 86px; margin: -28px -28px -54px; background: var(--accent); }
.m-side .avatar-lg { width: 108px; height: 108px; margin-bottom: 14px; border: 5px solid var(--surface); position: relative; }
.m-side h1 { font-size: 1.9rem; letter-spacing: -0.035em; }
.m-side .headline { font-size: 1.02rem; }
.m-side .pf-sec { padding: 18px 0 0; margin-top: 18px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.m-side .pf-sec h2 { font: 600 0.9rem/1.2 var(--sans); color: var(--muted); letter-spacing: 0; margin-bottom: 12px; }
.m-side .langs { grid-template-columns: 1fr 1fr; }
.m-main > .pf-sec:first-child { margin-top: 0; }
.layout-modern .contact-sec .narrow { width: min(1120px, 100% - 40px); }

/* ---------- layout: minimal ---------- */
.layout-minimal { --canvas: #ffffff; }
.layout-minimal .profile-head { padding-top: 56px; }
.layout-minimal .ph-grid { flex-direction: column; align-items: flex-start; gap: 18px; }
.layout-minimal .avatar-lg { width: 84px; height: 84px; font-size: 1.8rem; }
.layout-minimal .pf-sec { background: none; border: 0; border-radius: 0; border-top: 1px solid var(--line); padding: 24px 0; margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; }
.layout-minimal .pf-body > .pf-sec:first-child { border-top: 0; }
.layout-minimal .pf-sec h2 { font: 600 0.95rem/1.4 var(--sans); color: var(--muted); letter-spacing: 0; padding-top: 2px; }
.layout-minimal .chips li { background: transparent; border: 1px solid var(--line); }
.layout-minimal .projects { grid-template-columns: 1fr; }
.layout-minimal .projects li { flex-direction: row; border: 0; border-radius: 0; background: transparent; }
.layout-minimal .projects li.has-img .proj-img { width: 140px; aspect-ratio: 4 / 3; border-radius: 10px; flex: none; }
.layout-minimal .proj-body { padding: 0 0 0 16px; }
.layout-minimal .projects li:not(.has-img) .proj-body { padding: 0; }
.layout-minimal .contact-sec { background: var(--tint); }

/* ---------- contact ---------- */
.contact-sec { padding: 44px 0; }
.contact-sec h2 { font-size: 1.7rem; margin-bottom: 8px; }
.contact-form { max-width: 640px; margin-top: 8px; }
.contact-form .btn { min-width: 180px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { padding: 10px 14px; border-radius: var(--r-ctl); font-weight: 600; max-width: 640px; }
.note-ok { background: #ddf3e6; color: #12573a; }
.note-bad { background: #fde3e3; color: #7d1a1e; }

/* ---------- forms (sign-in, admin, contact) ---------- */
.auth { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 20px 16px 48px; }
.auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 36px; }
.auth-card h1 { font-size: 2.1rem; letter-spacing: -0.04em; margin: 18px 0 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.94rem; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); font: inherit; background: #fff; color: var(--text); transition: border-color 0.12s ease; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #b4bcc8; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.field .help { color: var(--muted); font-size: 0.87rem; margin: 6px 0 0; }
.field .err { color: var(--danger); font-size: 0.9rem; margin: 6px 0 0; font-weight: 600; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.form-err { background: #fde3e3; color: #7d1a1e; padding: 10px 14px; border-radius: var(--r-ctl); margin-bottom: 16px; font-size: 0.95rem; font-weight: 600; }
.auth-card .btn { width: 100%; }
.auth-switch { text-align: center; margin: 22px 0 0; color: var(--muted); }
.prefix { display: flex; align-items: stretch; }
.prefix span { display: flex; align-items: center; padding: 0 12px; background: var(--tint); border: 1.5px solid var(--line); border-right: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.prefix input { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }

/* ---------- footer ---------- */
.foot { padding: 28px 0 36px; color: var(--muted); font-size: 0.93rem; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; }
.foot a { color: var(--text); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .pro-grid { grid-template-columns: 1fr; }
  .pro-id { grid-template-columns: auto minmax(0, 1fr); }
  .pro-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 14ch; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .t-intro { min-height: 320px; }
  .modern-grid { grid-template-columns: 1fr; }
  .m-side { position: static; }
  .layout-bento .contact-sec .narrow { grid-template-columns: 1fr; }
  .layout-bento .contact-sec .contact-form, .layout-bento .contact-sec .note { grid-column: 1; grid-row: auto; }
}
@media (max-width: 640px) {
  .pro-hero { padding-top: 28px; }
  .pro-id { grid-template-columns: 1fr; gap: 18px; padding-bottom: 26px; }
  .pro-avatar { width: 104px; height: 104px; font-size: 2.2rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div, .facts div + div { padding: 14px 12px 14px 0; border-left: 0; }
  .facts div:nth-child(even) { padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent); }
  .facts div:nth-child(n+3) { border-top: 1px solid color-mix(in srgb, var(--on-accent) 22%, transparent); }
  .pro-card { padding: 22px 20px; }
  .pro-item { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; }
  .mono { width: 42px; height: 42px; font-size: 0.92rem; border-radius: 12px; }
  .topbar .wrap { height: 62px; }
  .topbar nav { gap: 14px; }
  .topbar nav a:not(.btn) { font-size: 0.92rem; }
  .hero { padding-top: 20px; }
  .mosaic { grid-auto-rows: 74px; gap: 10px; }
  .mz-intro strong { font-size: 1.2rem; }
  .steps ol { grid-template-columns: 1fr; }
  .bento { gap: 10px; }
  .bento .t-intro, .t-about, .t-exp, .t-edu, .t-skills, .t-proj.has-img, .t-certs.wide { grid-column: 1 / -1; }
  .bento .t-intro { padding: 24px; min-height: 0; }
  .t-about.tall, .t-exp.tall { grid-row: auto; }
  .t-link { min-height: 112px; padding: 16px; }
  .t-proj:not(.has-img) { grid-column: 1 / -1; }
  .tile { padding: 18px; }
  .tile.t-proj { padding: 0; }
  .ph-grid { flex-direction: column; align-items: flex-start; gap: 18px; }
  .avatar-lg { width: 100px; height: 100px; font-size: 2rem; }
  .pf-sec { padding: 20px; }
  .row2 { grid-template-columns: 1fr; }
  .period { white-space: normal; }
  .layout-minimal .pf-sec { grid-template-columns: 1fr; gap: 8px; }
  .layout-minimal .projects li { flex-direction: column; }
  .layout-minimal .projects li.has-img .proj-img { width: 100%; margin-bottom: 10px; }
  .layout-minimal .proj-body { padding: 0; }
  .layout-bento .contact-sec .narrow { padding: 26px 22px; }
  .auth-card { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .noprint, .topbar, .foot, .banner, .contact-sec { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .pf-sec { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
.forgot { margin: -6px 0 16px; font-size: 0.93rem; }

/* ---------- people filters ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)); gap: 0 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px 4px; margin-bottom: 14px; }
.filters .field label { font-size: 0.86rem; }
.filters .field input, .filters .field select { min-height: 42px; padding: 8px 12px; }
.filter-actions { grid-column: 1 / -1; display: flex; gap: 10px; padding-bottom: 14px; }
.result-count { margin: 0 0 14px; font-size: 0.93rem; }
.person-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 3px; white-space: normal !important; }
.pill { font-style: normal; font-size: 0.76rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.pill-looking { background: #ddf3e6; color: #12573a; }
.pill-open { background: #fff1c7; color: #6b4b00; }
@media (max-width: 980px) { .filters { grid-template-columns: 1fr 1fr; } .filters .f-q { grid-column: 1 / -1; } }
@media (max-width: 640px) { .filters { grid-template-columns: 1fr; } }

/* ---------- report, banners ---------- */
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.report-link { color: var(--muted) !important; font-weight: 400 !important; }
.report-form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.report-form fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.report-form legend { font-weight: 600; margin-bottom: 8px; }
.radio { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.radio input { width: 18px; height: 18px; accent-color: var(--text); }
.banner-info { background: #e3ecff; color: #1d3a8a; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 74px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--tint); border-radius: 8px; padding: 6px 10px; font: 600 0.85rem var(--sans); color: var(--text); cursor: pointer; }
.pw-toggle:hover { background: var(--line); }
.help.ok { color: #12573a; font-weight: 600; }
.help.bad { color: var(--danger); font-weight: 600; }
