:root {
  color-scheme: dark;
  --bg: #1c1c1c;
  --surface: #252525;
  --surface-hover: #2d2d2d;
  --border: #303030;
  --border-strong: #3e3e42;
  --text: #f4f4f5;
  --text-secondary: #b8b8be;
  --text-muted: #8a8a90;
  --blue: #1877f2;
  --blue-link: #1877f2;
  --blue-hover: #4599ff;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --font-heading: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .name, .section-label, .project-title, .capabilities-list strong { font-family: var(--font-heading); }
a { color: inherit; text-decoration: none; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: 0.6rem 1rem; z-index: 1000; }
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 6px; }

.page { width: min(1280px, calc(100% - 3rem)); margin-inline: auto; padding: clamp(2.5rem, 5vw, 4rem) 0 2.5rem; }
.section-label { margin: 0 0 1.4rem; font-size: 1.28rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }

.hero-band { display: grid; grid-template-columns: 1.08fr 1.05fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: stretch; padding-bottom: clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--border); }
.hero-left { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.hero-profile { display: grid; grid-template-columns: 148px 1fr; gap: 1.5rem; align-items: start; }
.portrait-frame { width: 148px; aspect-ratio: 4 / 4.75; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-strong); background: #222222; }
.portrait-fallback { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.portrait-fallback svg { width: 100%; height: 100%; display: block; }
.portrait-fallback span { position: absolute; bottom: 0.65rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text-muted); }
.identity-col { display: flex; flex-direction: column; min-width: 0; }
.name { margin: 0; font-size: clamp(1.55rem, 2.35vw, 2.05rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; white-space: nowrap; }
.role { margin: 0.35rem 0 1.15rem; font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.about { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); max-width: 44ch; }
.hero-meta-grid { list-style: none; margin: 0; padding: 1.35rem 1rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: nowrap; }
.hero-meta-grid li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.hero-meta-grid svg { color: rgba(255, 255, 255, 0.82); flex-shrink: 0; }
.hero-meta-grid a:hover { color: #ffffff; }
.hero-tools { padding-top: 0; }
.tools-heading { margin: 0 0 1.25rem; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
.tools-mini-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.35rem 0.5rem; }
.tools-mini-grid li { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; text-align: center; color: var(--text); }
.tool-logo { width: 22px; height: 22px; object-fit: contain; display: block; flex-shrink: 0; }
.tools-mini-grid span { font-size: 0.74rem; font-weight: 500; color: var(--text-secondary); line-height: 1.2; }
.hero-right { position: relative; display: flex; flex-direction: column; justify-content: flex-start; padding-left: 36px; border-left: 1px solid rgba(255, 255, 255, 0.28); }
.hero-right .section-label { margin-bottom: 1.35rem; }
.capabilities-list { list-style: none; margin: 0; padding: 0; }
.capabilities-list li { display: flex; align-items: center; gap: 0.9rem; padding: 0.92rem 0; border-bottom: 1px solid var(--border); }
.capabilities-list li:first-child { padding-top: 0.35rem; }
.capabilities-list li:last-child { border-bottom: none; padding-bottom: 0; }
.cap-node { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; min-height: 24px; aspect-ratio: 1 / 1; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.55); background: var(--bg); color: rgba(255, 255, 255, 0.92); flex-shrink: 0; transition: border-color 0.15s ease; }
.cap-node::before { content: ""; position: absolute; right: calc(100% + 1px); top: 50%; transform: translateY(-50%); width: 36px; height: 1px; background: rgba(255, 255, 255, 0.28); }
.cap-node svg { display: block; flex-shrink: 0; }
.capabilities-list li:hover .cap-node { border-color: #ffffff; }
.cap-copy { display: grid; gap: 0.14rem; min-width: 0; }
.capabilities-list strong { font-size: 0.91rem; font-weight: 700; color: var(--text); line-height: 1.25; }
.capabilities-list span { font-size: 0.8rem; color: var(--text-muted); line-height: 1.3; }

.projects-band { padding: clamp(2.25rem, 4.5vw, 3.25rem) 0 clamp(1.75rem, 3.5vw, 2.5rem); border-bottom: 1px solid var(--border); }
.timeline-list { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 128px 230px; gap: 0 1.25rem; align-items: start; }
.timeline-track { display: flex; flex-direction: column; align-items: center; align-self: stretch; padding-top: 0.22rem; }
.timeline-node { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.75); background: var(--bg); display: grid; place-items: center; flex-shrink: 0; transition: border-color 0.15s ease; }
.timeline-dot { width: 6px; height: 6px; border-radius: 50%; background: #ffffff; }
.timeline-row:hover .timeline-node { border-color: #ffffff; }
.timeline-line { width: 1px; flex: 1; min-height: 24px; background: rgba(255, 255, 255, 0.35); margin-top: 5px; }
.project-info { padding-bottom: 1.85rem; }
.timeline-row:last-child .project-info { padding-bottom: 0.35rem; }
.project-title { margin: 0 0 0.32rem; font-size: 1.04rem; font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
.project-desc { margin: 0 0 0.52rem; font-size: 0.9rem; line-height: 1.58; color: var(--text-muted); max-width: 60ch; }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.project-link { background: none; border: none; padding: 0; font-family: inherit; font-size: 0.9rem; font-weight: 400; color: var(--blue-link); cursor: pointer; line-height: 1.2; }
.project-link:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.project-link + .project-link { padding-left: 0.75rem; border-left: 1px solid var(--border-strong); }
.private-tag { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 500; color: var(--text-muted); padding: 0.16rem 0.55rem; border: 1px solid var(--border-strong); border-radius: 999px; line-height: 1.2; }
.project-date, .project-domain { display: inline-flex; align-items: center; gap: 0.45rem; justify-self: start; padding-top: 0.14rem; font-size: 0.86rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-secondary); text-align: left; white-space: nowrap; }
.project-date svg, .project-domain svg { color: var(--text-muted); flex-shrink: 0; }

.tools-band { padding: 1.85rem 0; border-bottom: 1px solid var(--border); }
.tools-band .section-label { margin-bottom: 0.7rem; }
.tools-line { margin: 0; font-size: 0.93rem; font-weight: 500; color: var(--text-secondary); line-height: 1.75; }

.footer-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: 0.86rem; color: var(--text-muted); }
.footer-details strong { color: var(--text); font-weight: 600; }
.footer-details a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.socials { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.socials a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-secondary); font-weight: 500; transition: color 0.15s ease; }
.socials a:hover { color: var(--text); }

.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.icon-btn:hover { background: var(--surface-hover); }

dialog.arch-dialog { width: min(660px, calc(100% - 2rem)); max-height: 85dvh; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog.arch-dialog[open] { display: flex; flex-direction: column; }
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop { background: rgba(3, 6, 12, 0.76); backdrop-filter: blur(4px); overflow: hidden; overscroll-behavior: contain; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--border); }
.dialog-header h1 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.dialog-body { padding: 1.35rem; overflow-y: auto; display: grid; gap: 1rem; }
.arch-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.95rem; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.78rem; }
.arch-node { padding: 0.36rem 0.62rem; border-radius: 6px; background: var(--surface); border: 1px solid var(--border-strong); }
.arch-arrow { color: var(--blue); font-weight: 700; }
.arch-points { margin: 0; padding-left: 1.15rem; color: var(--text-secondary); display: grid; gap: 0.45rem; font-size: 0.9rem; }

@media (max-width: 960px) {
  .hero-band { grid-template-columns: 1fr; gap: 2rem; }
  .hero-right { padding-left: 28px; }
  .cap-node::before { width: 28px; }
  .timeline-row { grid-template-columns: 28px minmax(0, 1fr); gap: 0.25rem 0.9rem; }
  .project-date, .project-domain { grid-column: 2; text-align: left; padding-top: 0; font-size: 0.8rem; color: var(--text-muted); }
  .project-info { padding-bottom: 0.45rem; }
  .project-domain { padding-bottom: 1.5rem; }
}
@media (max-width: 560px) {
  .page { width: calc(100% - 2rem); }
  .hero-profile { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero-meta-grid { flex-wrap: wrap; justify-content: flex-start; gap: 0.65rem 1.25rem; }
  .portrait-frame { width: 124px; }
  .name { white-space: normal; }
  .tools-mini-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.facts-band { margin: 0 0 2.5rem; padding: 1.1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.facts li { display: flex; flex-direction: column; gap: 0.15rem; }
.facts strong { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; color: var(--text); }
.facts span { font-size: 0.8rem; color: var(--text-muted); }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, 1fr); } }

.plain-email { user-select: text; cursor: text; }
