:root {
  color-scheme: dark;
  --bg: #101214;
  --sidebar: #141618;
  --panel: #171a1e;
  --line: #292d33;
  --text: #eef0f3;
  --muted: #a0a6b0;
  --blue: #8ab5ff;
  --blue-bg: #202e43;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}
h1:focus, main:focus { outline: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.035em; }
h1 { font-size: 36px; font-weight: 600; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
img { max-width: 100%; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 200px;
  padding: 38px 18px 24px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand-group { min-width: 0; padding: 0 15px; }
.brand { display: inline-block; font-size: 25px; letter-spacing: -1px; font-weight: 650; }
.brand-dot { color: var(--blue); }
.availability {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid #1b4a41;
  border-radius: 999px;
  background: #0d2826;
  color: #28dba5;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.availability-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #26987a;
}
nav { display: flex; flex-direction: column; gap: 7px; margin-top: 38px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 6px;
  padding: 11px 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.nav-link:hover { color: var(--text); background: #1c2025; }
.nav-link[aria-current="page"] { background: var(--blue-bg); color: var(--blue); }
.nav-link svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }

main { margin-left: 200px; padding: 64px 54px; min-height: 100vh; }
.content { max-width: 1120px; margin: 0 auto; }
.page-header { margin-bottom: 32px; }
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.page-header > p:last-child { color: var(--muted); margin-top: 13px; max-width: 580px; font-size: 14px; }

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 48px;
  align-items: start;
  padding: 12px 0 36px;
}
.profile-heading { font-size: 40px; letter-spacing: -.045em; line-height: 1.15; }
.profile-role { font-size: 21px; letter-spacing: -.025em; color: var(--blue); margin: 12px 0 17px; font-weight: 450; }
.profile-intro { font-size: 16px; line-height: 1.8; max-width: 630px; color: #c5cad1; }
.profile-description { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 630px; line-height: 1.8; }
.avatar {
  width: 140px;
  aspect-ratio: 1;
  background: #1b222c;
  border: 1px solid #303d50;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #94b4e5;
  font-size: 44px;
  font-weight: 450;
  letter-spacing: -3px;
}
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.social-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #333941;
  border-radius: 7px;
  background: var(--panel);
  color: #cbd3df;
}
.social-button:hover, .social-button:focus-visible { color: var(--blue); border-color: #536987; background: #1c2532; }
.social-button svg, .social-button img { width: 18px; height: 18px; }
.social-button[aria-disabled="true"] { color: #8c929d; border-style: dashed; cursor: default; }
.social-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%);
  border: 1px solid #414955;
  border-radius: 5px;
  background: #212730;
  color: var(--text);
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.social-button:hover .social-tooltip, .social-button:focus-visible .social-tooltip { opacity: 1; }
.about-details {
  border-top: 1px solid var(--line);
  padding: 29px 0 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 27px 40px;
}
.info-item { min-width: 0; }
.info-item dt { color: var(--muted); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; }
.info-item dd { margin: 0; font-size: 15px; color: #dce1e8; overflow-wrap: anywhere; }
.info-item dd a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.info-item .detail-copy { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.info-item .badge { margin-top: 9px; }
.badge { display: inline-block; font: 10px ui-monospace, monospace; letter-spacing: .7px; color: var(--blue); background: var(--blue-bg); border-radius: 4px; padding: 4px 7px; white-space: nowrap; }

.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.skill-group { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.skill-group h2 { font-size: 17px; letter-spacing: -.015em; }
.skill-group > p { font-size: 13px; color: var(--muted); margin-top: 8px; }
.tool-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 23px 0 0; }
.tool-list li { min-width: 0; }
.skill-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 104px;
  padding: 14px 7px;
  border: 1px solid #2e343d;
  border-radius: 7px;
  background: #13161a;
  color: #d9dfe8;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}
.skill-button:hover { border-color: #536987; background: #1b2330; }
.tool-icon { display: block; width: 36px; height: 36px; padding: 5px; border-radius: 7px; background: #edf0f4; object-fit: contain; flex-shrink: 0; }

.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; }
.filter-button { padding: 8px 14px; border: 1px solid #333941; border-radius: 6px; background: transparent; color: #b5bdc9; font-size: 12px; line-height: 1.5; }
.filter-button:hover { color: var(--text); background: #1b2027; }
.filter-button[aria-pressed="true"] { color: var(--blue); background: var(--blue-bg); border-color: #3c5477; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 24px; display: flex; flex-direction: column; min-width: 0; }
.project-category { font: 10px ui-monospace, monospace; color: var(--blue); letter-spacing: .35px; margin-bottom: 24px; }
.project-card h2 { font-size: 19px; line-height: 1.4; letter-spacing: -.025em; }
.project-description { font-size: 13px; color: var(--muted); line-height: 1.8; margin-top: 14px; margin-bottom: 22px; }
.tags { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: auto 0 0; gap: 6px; }
.tags li { font-size: 10px; border: 1px solid #313741; border-radius: 4px; padding: 3px 7px; color: #b4bfce; overflow-wrap: anywhere; }
.project-actions { display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
.project-actions a { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; color: #c6cdd7; }
.project-actions a:first-child[data-live] { color: var(--blue); }
.project-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }
.project-actions svg { width: 14px; height: 14px; }
.empty-state { grid-column: 1 / -1; padding: 32px 24px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 14px; text-align: center; }

.certificate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.certificate-card { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.certificate-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.certificate-top > svg { width: 28px; height: 28px; color: var(--muted); }
.certificate-card h2 { font-size: 19px; }
.certificate-card p { font-size: 13px; color: var(--muted); margin-top: 12px; }
.certificate-bottom { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; font-size: 11px; color: var(--muted); }
.certificate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.text-button { display: inline-flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; color: var(--blue); font-size: 12px; line-height: 1.65; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-button svg { width: 14px; height: 14px; }
.sub-certificates { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sub-certificates summary { cursor: pointer; font-size: 12px; color: #c0cad9; }
.sub-certificates summary::marker { color: var(--blue); }
.sub-certificates ul { list-style: none; padding: 0; margin: 9px 0 0; }
.sub-certificates li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.sub-certificates li:last-child { border-bottom: 0; padding-bottom: 0; }
.sub-cert-title { font-size: 13px; overflow-wrap: anywhere; }

.detail-dialog {
  width: min(540px, calc(100% - 40px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid #3b424e;
  border-radius: 12px;
  background: #171b21;
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
}
.detail-dialog:has(.document-image), .detail-dialog:has(.document-pdf) { width: min(960px, calc(100% - 40px)); }
.detail-dialog::backdrop { background: rgb(4 7 11 / 78%); }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 21px; line-height: 1.4; }
.dialog-close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid #3b424e; border-radius: 5px; padding: 4px; background: #20252d; font-size: 23px; line-height: 1; }
.dialog-close:hover { background: #303a49; }
.dialog-content { padding: 25px; }
.skill-detail-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.skill-detail-heading .tool-icon { width: 40px; height: 40px; }
.skill-level { color: #cad4e2; font-size: 14px; margin-bottom: 20px; }
.dialog-content > h3 { font-size: 16px; }
.skill-level strong { color: var(--text); font-weight: 500; }
.capability-list { margin: 20px 0 0; padding-left: 20px; color: #bdc5d1; font-size: 14px; line-height: 1.9; }
.capability-list li + li { margin-top: 7px; }
.document-image { display: block; width: 100%; height: auto; max-height: 65dvh; object-fit: contain; }
.document-pdf { display: block; width: 100%; height: min(65dvh, 720px); border: 0; border-radius: 4px; background: #20252a; }
.document-pdf p { margin: 24px; color: var(--muted); font-size: 14px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.dialog-actions a { color: var(--blue); font-size: 13px; }
.dialog-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }

.resume-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.download-link, .open-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #3c5477;
  border-radius: 6px;
  padding: 9px 14px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 13px;
}
.download-link svg, .open-pdf svg { width: 16px; height: 16px; }
.download-link:hover { border-color: #6989b8; background: #283c58; }
.open-pdf { border-color: #343a43; background: transparent; color: #c6cdd7; }
.open-pdf:hover { border-color: #617088; background: #1a2029; }
.resume-viewer { width: 100%; max-width: 900px; display: grid; gap: 20px; }
.resume-page { position: relative; margin: 0; min-width: 0; background: #fff; border: 1px solid #343a43; border-radius: 5px; }
.resume-canvas { display: block; width: 100%; height: auto; border-radius: 4px; }
.resume-viewer[data-render-state="loading"],
.resume-viewer[data-render-state="error"] { padding: 28px; border: 1px solid var(--line); border-radius: 9px; }
.resume-status { color: var(--muted); font-size: 13px; }
.resume-status:not(:empty) { margin-top: 15px; }

.sr-only, .filter-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; top: 10px; left: 15px; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; z-index: 30; background: var(--blue-bg); border-radius: 4px; }
.skip-link:focus { width: auto; height: auto; clip-path: none; padding: 8px 14px; }
.noscript { position: fixed; inset: 40% 20% auto; background: var(--panel); padding: 25px; border: 1px solid var(--line); }

@media (min-width: 1440px) {
  main { padding-left: 64px; padding-right: 64px; }
}

@media (max-width: 1023px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; padding: 22px 32px 0; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-group { padding: 0; }
  .brand { font-size: 23px; }
  .availability { display: flex; margin-top: 6px; }
  nav { flex-direction: row; margin-top: 20px; width: 100%; gap: 10px; padding-bottom: 12px; }
  .nav-link { padding: 9px 12px; gap: 8px; font-size: 13px; }
  main { margin-left: 0; padding: 38px 32px 52px; }
  .profile-layout { gap: 32px; padding-top: 0; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-group { padding: 21px; }
  .tool-list { gap: 7px; }
}

@media (max-width: 639px) {
  .sidebar { padding: 17px 22px; justify-content: space-between; gap: 0 14px; }
  .brand-group { flex: 1; }
  .menu-toggle { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid #343a43; border-radius: 5px; padding: 6px 10px; font-size: 12px; }
  nav { display: none; flex-direction: column; gap: 4px; padding: 0; margin-top: 18px; }
  nav.is-open { display: flex; }
  .nav-link { padding: 10px 12px; }
  main { padding: 30px 22px 42px; }
  h1 { font-size: 30px; }
  .page-header { margin-bottom: 25px; }
  .profile-layout { display: flex; flex-direction: column; gap: 22px; padding-bottom: 29px; }
  .avatar { order: -1; width: 80px; font-size: 30px; letter-spacing: -2px; border-radius: 9px; }
  .profile-heading { font-size: 34px; }
  .profile-role { font-size: 19px; margin: 11px 0 16px; }
  .profile-intro { font-size: 15px; }
  .profile-description { font-size: 14px; }
  .social-links { margin-top: 20px; }
  .about-details { grid-template-columns: 1fr; gap: 23px; padding-top: 24px; }
  .info-item dd { font-size: 14px; }
  .skill-grid, .project-grid, .certificate-grid { grid-template-columns: 1fr; }
  .skill-group { padding: 21px; }
  .skill-button { min-height: 95px; font-size: 11px; padding: 12px 5px; }
  .tool-list { gap: 8px; }
  .filter-button { padding: 8px 11px; }
  .project-card { padding: 23px; }
  .project-category { margin-bottom: 20px; }
  .certificate-card { padding: 24px; }
  .detail-dialog { max-height: calc(100dvh - 28px); }
  .detail-dialog, .detail-dialog:has(.document-image), .detail-dialog:has(.document-pdf) { width: calc(100% - 28px); }
  .dialog-header { padding: 18px; gap: 14px; }
  .dialog-header h2 { font-size: 18px; }
  .dialog-content { padding: 20px 18px; }
  .resume-toolbar { gap: 9px; }
  .download-link, .open-pdf { font-size: 12px; padding: 9px 12px; }
}
