:root {
  --ink: #18251f;
  --muted: #68736d;
  --line: #dfe6e1;
  --surface: #ffffff;
  --soft: #f4f7f4;
  --green: #216a4a;
  --green-dark: #155137;
  --mint: #d8f1e3;
  --amber: #d99335;
  --danger: #a6443c;
  --shadow: 0 18px 60px rgba(20, 50, 36, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eef3ef; }
body { min-height: 100vh; margin: 0; color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(135deg, #f7faf7 0%, #edf4ef 52%, #f5f1e8 100%); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(3px); opacity: .65; pointer-events: none; }
.ambient-one { width: 42vw; height: 42vw; left: -15vw; top: -18vw; background: radial-gradient(circle, #b9e5cc 0, transparent 68%); }
.ambient-two { width: 36vw; height: 36vw; right: -12vw; bottom: -20vw; background: radial-gradient(circle, #ebd7a8 0, transparent 68%); }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 760; letter-spacing: -.02em; text-decoration: none; }
.brand-large { font-size: 17px; }
.brand-mark { display: inline-flex; width: 31px; height: 31px; padding: 7px; align-items: flex-end; gap: 3px; border-radius: 9px; background: var(--ink); }
.brand-mark i { display: block; width: 4px; border-radius: 3px; background: #c8efd8; }
.brand-mark i:nth-child(1) { height: 7px; }.brand-mark i:nth-child(2) { height: 15px; }.brand-mark i:nth-child(3) { height: 11px; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.muted { margin: 0; color: var(--muted); }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr); align-items: center; gap: 9vw; max-width: 1220px; margin: auto; padding: 64px; }
.login-intro h1 { max-width: 650px; margin: 22px 0 20px; font: 500 clamp(46px, 5vw, 72px)/1.08 Georgia, "Songti SC", serif; letter-spacing: -.055em; }
.intro-copy { max-width: 570px; color: #59675f; font-size: 17px; }
.architecture { display: flex; align-items: center; gap: 14px; margin-top: 44px; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.architecture span { padding: 9px 13px; border: 1px solid #cdd8d1; border-radius: 99px; background: rgba(255,255,255,.45); }
.architecture span.active { color: #fff; border-color: var(--green); background: var(--green); }
.architecture b { width: 24px; height: 1px; background: #9bad9f; }
.login-card { padding: 48px; border: 1px solid rgba(204,216,208,.85); border-radius: 26px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.login-card h2 { margin: 0 0 5px; font-size: 30px; letter-spacing: -.035em; }
.mobile-brand { display: none; margin-bottom: 36px; }
.stack-form { display: grid; gap: 18px; margin-top: 32px; }
label { display: grid; gap: 7px; color: #425047; font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; border: 1px solid #d4ded7; border-radius: 11px; outline: none; color: var(--ink); background: #fbfcfb; transition: border .18s, box-shadow .18s; }
input, select { height: 45px; padding: 0 13px; }
textarea { resize: vertical; padding: 11px 13px; }
input:focus, textarea:focus, select:focus { border-color: #55a17a; box-shadow: 0 0 0 3px rgba(54,130,88,.12); }
.button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; transform: none; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 6px 18px rgba(33,106,74,.17); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.button-danger { color: var(--danger); border-color: #e8c6c2; background: #fff8f7; }
.button-wide { width: 100%; min-height: 48px; }
.form-error { min-height: 20px; margin: 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.login-footnote { margin: 25px 0 0; text-align: center; color: #87918b; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: #3da66c; box-shadow: 0 0 0 4px #dff3e7; }

.app-shell { min-height: 100vh; background: #f6f8f6; }
.topbar { position: sticky; z-index: 10; top: 0; height: 68px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(16px); }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.service-state { color: var(--muted); font-size: 12px; font-weight: 700; }
.service-state i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #42a66e; }
.profile-button { display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border: 0; border-radius: 99px; background: transparent; }
.profile-button span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: #324b3e; }
.profile-button b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.text-button, .link-button { padding: 0; border: 0; color: var(--green); background: none; font-size: 13px; font-weight: 750; }
.page-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar { display: flex; flex-direction: column; justify-content: space-between; padding: 28px 18px; border-right: 1px solid var(--line); background: #fff; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 11px 13px; border: 0; border-radius: 10px; color: #5b6860; background: transparent; font-weight: 700; text-align: left; }
.nav-item span { width: 20px; text-align: center; }.nav-item.active { color: var(--green-dark); background: #eaf4ee; }
.sidebar-note { padding: 17px; border: 1px solid #dce8df; border-radius: 14px; background: #f6faf7; }
.sidebar-note strong { font-size: 13px; }.sidebar-note p:not(.eyebrow) { margin: 8px 0 13px; color: var(--muted); font-size: 12px; }
.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 44px clamp(28px, 4vw, 64px) 70px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; }
.hero-row h1 { margin: 0 0 3px; font: 500 39px/1.15 Georgia, "Songti SC", serif; letter-spacing: -.04em; }
.metric { display: grid; min-width: 110px; padding-left: 24px; border-left: 1px solid var(--line); }
.metric span { font: 500 30px/1 Georgia, serif; }.metric small { margin-top: 5px; color: var(--muted); }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 160px 45px; gap: 10px; margin-bottom: 22px; }
.search-box { position: relative; display: block; }.search-box span { position: absolute; left: 14px; top: 9px; color: #7b8980; font-size: 20px; }.search-box input { padding-left: 41px; }
.icon-button { width: 45px; height: 45px; border: 1px solid #d4ded7; border-radius: 11px; color: var(--green); background: #fff; font-size: 21px; }
.skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.skill-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 3px 12px rgba(33,60,46,.035); transition: transform .18s, border-color .18s, box-shadow .18s; cursor: pointer; }
.skill-card:hover { transform: translateY(-2px); border-color: #b8cabf; box-shadow: 0 12px 30px rgba(33,60,46,.09); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.skill-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 11px; color: var(--green-dark); background: var(--mint); font: 700 17px Georgia, serif; }
.visibility { padding: 4px 8px; border-radius: 99px; color: #67736c; background: var(--soft); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.skill-card h2 { margin: 17px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; letter-spacing: -.02em; }
.skill-id { overflow: hidden; margin: 0; color: #76817b; font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.skill-description { height: 44px; margin: 13px 0 18px; overflow: hidden; color: #57645c; font-size: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 8px; border: 1px solid #dae4dd; border-radius: 6px; color: #496054; background: #f8faf8; font-size: 10px; font-weight: 750; }
.tag.target { color: #1b6847; border-color: #c8e6d4; background: #ebf7ef; }
.card-footer { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 14px; border-top: 1px solid #edf0ed; color: #7d8982; font-size: 11px; }
.state-card { display: grid; min-height: 300px; place-items: center; align-content: center; text-align: center; border: 1px dashed #ccd8d0; border-radius: 16px; color: var(--muted); background: rgba(255,255,255,.55); }
.state-card h2 { margin: 12px 0 2px; color: var(--ink); font-size: 18px; }.state-card p { margin: 4px 0 18px; }
.empty-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: var(--green); background: var(--mint); font-size: 26px; }
.spinner { width: 25px; height: 25px; border: 2px solid #cbdad1; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.dialog { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 25px 90px rgba(13,35,23,.3); }
.dialog-wide { width: min(790px, calc(100vw - 32px)); }.dialog-small { width: min(520px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(15,29,22,.48); backdrop-filter: blur(3px); }
.dialog-body { padding: 30px; }.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.dialog-header h2 { margin: 0 0 3px; font-size: 25px; letter-spacing: -.035em; }.dialog-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.close-button { width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 50%; color: #647168; background: #f0f3f1; font-size: 23px; line-height: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }.span-two { grid-column: span 2; }
label small { color: #859089; font-size: 10px; font-weight: 500; }
fieldset { margin: 0; padding: 0; border: 0; } legend { margin-bottom: 7px; color: #425047; font-size: 13px; font-weight: 700; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }.choice { display: block; cursor: pointer; }.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }.choice span { display: block; padding: 9px 13px; border: 1px solid #d4ded7; border-radius: 9px; color: #66736a; background: #fbfcfb; font-size: 12px; }.choice input:checked + span { color: var(--green-dark); border-color: #69a987; background: #e8f5ed; box-shadow: inset 0 0 0 1px #69a987; }
.file-field { position: relative; min-height: 82px; padding: 14px; border: 1px dashed #b8cbbf; border-radius: 11px; background: #f7faf8; cursor: pointer; }.file-field input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }.file-field strong { color: var(--green); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #edf0ed; }.dialog-actions.spread { justify-content: space-between; }.dialog-actions > div { display: flex; gap: 9px; }
.detail-description { color: #556259; }.meta-list { display: grid; grid-template-columns: 130px 1fr; margin: 22px 0; border-top: 1px solid var(--line); }.meta-list dt, .meta-list dd { margin: 0; padding: 10px 0; border-bottom: 1px solid #edf0ed; }.meta-list dt { color: #78837d; font-size: 12px; }.meta-list dd { min-width: 0; overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.manifest-panel { border: 1px solid var(--line); border-radius: 11px; background: #f8faf8; }.manifest-panel summary { padding: 12px 14px; cursor: pointer; font-weight: 750; }.manifest-panel pre { max-height: 280px; margin: 0; padding: 15px; overflow: auto; border-top: 1px solid var(--line); white-space: pre-wrap; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.key-value { max-height: 180px; padding: 15px; overflow: auto; border-radius: 10px; color: #d9f2e3; background: #183026; white-space: pre-wrap; word-break: break-all; font: 12px/1.6 ui-monospace, monospace; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 48px)); padding: 13px 17px; border-radius: 11px; color: #fff; background: #21382c; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: none; }.toast.error { background: #8b3933; }

@media (max-width: 1060px) { .skill-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.login-shell { gap: 5vw; padding: 42px; } }
@media (max-width: 780px) { .login-shell { display: block; padding: 28px 18px; }.login-intro { display: none; }.login-card { max-width: 460px; margin: 6vh auto; padding: 34px 26px; }.mobile-brand { display: inline-flex; }.page-grid { display: block; }.sidebar { display: none; }.topbar { padding: 0 16px; }.service-state, .profile-button b { display: none; }.content { padding: 30px 18px 55px; }.toolbar { grid-template-columns: 1fr 1fr 45px; }.search-box { grid-column: span 3; }.skill-grid { grid-template-columns: 1fr; }.hero-row h1 { font-size: 33px; }.form-grid { grid-template-columns: 1fr; }.span-two { grid-column: span 1; }.dialog-body { padding: 23px; } }
@media (max-width: 480px) { .topbar .button { width: 42px; padding: 0; overflow: hidden; white-space: nowrap; color: transparent; }.topbar .button::first-letter { color: #fff; }.text-button { display: none; }.metric { min-width: 80px; padding-left: 15px; }.dialog-actions.spread { align-items: stretch; flex-direction: column-reverse; }.dialog-actions.spread > div { display: grid; grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
