:root {
  --nav: #161d26; --nav-2: #1f2733; --nav-border: #38414d; --orange: #ff9900; --orange-2: #ec7211;
  --bg: #f2f3f3; --card: #fff; --border: #c6c6cd; --border-soft: #e9ebed;
  --text: #0f141a; --muted: #5f6b7a; --link: #006ce0; --link-hover: #002b66; --ok: #037f0c; --danger: #d13212;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { font: 14px/1.43 "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: .25em; }
h1 { font-size: 24px; line-height: 30px; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
.i { width: 1em; height: 1em; display: inline-block; vertical-align: -.13em; flex: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

input, select, textarea { width: 100%; font: inherit; font-size: .9rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--link); outline-offset: 0; border-color: var(--link); }
input:disabled, select:disabled { background: #f4f4f6; color: var(--muted); }
textarea { resize: vertical; }
.err { color: var(--danger); font-size: .85rem; min-height: 1em; } .ok { color: var(--ok); font-size: .85rem; min-height: 1em; }
.filenote { color: var(--muted); font-size: .8rem; }
.req { color: var(--danger); font-weight: 700; }
.muted { color: var(--muted); }

/* buttons — AWS console set */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem 1rem; border-radius: 8px;
  font: inherit; font-weight: 700; font-size: .85rem; border: 1px solid var(--link); color: var(--link); background: #fff; cursor: pointer; }
.btn:hover { background: #f2f8fd; border-color: var(--link-hover); color: var(--link-hover); text-decoration: none; }
.btn.primary { background: var(--orange-2); border-color: var(--orange-2); color: #fff; }
.btn.primary:hover { background: #d9600d; border-color: #d9600d; color: #fff; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: #fdece9; color: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.wide { width: 100%; }

/* smile logo */
.smile { width: 22px; height: 22px; border-radius: 5px; background: var(--orange); position: relative; box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); flex: none; }
.smile::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 5px; height: 5px; border-bottom: 2px solid var(--nav); border-radius: 0 0 8px 8px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 16px; padding: 1.7rem; width: 100%; max-width: 370px; box-shadow: 0 12px 40px rgba(0,0,0,.09); }
.login-card .brand { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; font-weight: 800; }
.login-card .sub { color: var(--muted); margin: .35rem 0 1rem; }
.login-card label { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: .8rem 0 .3rem; }
.login-card .btn { margin-top: 1.2rem; }

/* ---------- gnav ---------- */
.gnav { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 1rem; height: 51px;
  background: var(--nav); border-bottom: 1px solid var(--nav-border); padding: 0 1rem; color: #d5dbdb; }
.logo { display: flex; align-items: center; gap: .5rem; color: #fff; font-size: .95rem; cursor: pointer; }
.logo:hover { text-decoration: none; color: #fff; } .logo b { font-weight: 700; }
.gnav-search { flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 8px; height: 32px; padding: 0 .6rem; min-width: 120px; }
.gnav-search input { flex: 1; border: 0; outline: 0; padding: 0; background: transparent; font-size: .88rem; color: var(--text); min-width: 0; }
.gnav-search kbd { border: 1px solid var(--border); border-radius: 4px; font-size: .7rem; color: var(--muted); padding: 0 .35rem; }
.gnav-r { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.gnav-chip, .gnav-acct { background: none; border: 0; color: #eaeded; cursor: pointer; font-size: .85rem; display: flex; align-items: center; gap: .4rem; padding: .35rem .55rem; border-radius: 6px; line-height: 1; font-family: inherit; }
.gnav-chip .i { color: var(--orange); font-style: normal; } .gnav-chip:hover, .gnav-acct:hover { background: rgba(255,255,255,.1); }
.gnav-acct .caret { opacity: .6; font-size: .7rem; }
.avatar-i { width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--nav); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar-i.big { width: 40px; height: 40px; font-size: 1rem; }

/* popovers */
.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: min(280px, 92vw); background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.2); padding: .5rem; }
.pop-acct-head { display: flex; align-items: center; gap: .7rem; padding: .6rem; border-bottom: 1px solid var(--border-soft); margin-bottom: .3rem; }
.pop-acct-head small { color: var(--muted); display: block; }
.pop a, .acct-link { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 8px; color: var(--text); font-size: .88rem; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font-family: inherit; }
.pop a:hover, .acct-link:hover { background: #f2f8fd; color: var(--link); text-decoration: none; }

/* ---------- shell + sidebar ---------- */
.shell { display: flex; align-items: flex-start; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--border-soft); min-height: calc(100vh - 51px); padding: 1rem .6rem; position: sticky; top: 51px; }
.side-title { font-weight: 700; padding: .4rem .7rem .6rem; }
.side-sub { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 1rem .7rem .4rem; }
#filters { display: flex; flex-direction: column; }
.chip { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: .5rem .7rem; font: inherit; font-size: .88rem; color: var(--text); border-left: 3px solid transparent; text-transform: capitalize; }
.chip:hover { background: #f2f8fd; } .chip.on { color: var(--link); font-weight: 700; border-left-color: var(--link); background: #f0f7ff; }
.chip span { margin-left: auto; background: #eef0f2; border-radius: 10px; padding: 0 .45rem; font-size: .72rem; color: var(--muted); }
.chip.on span { background: #d9e8fb; color: var(--link); }
.side-filters { display: flex; flex-direction: column; gap: .5rem; padding: 0 .7rem; }
.side-input { font-size: .84rem; }
.side-check { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text); padding: .2rem 0; }
.side-check input { width: auto; }
.side-status { margin-top: 1.2rem; padding: .7rem; font-size: .74rem; color: var(--muted); border-top: 1px solid var(--border-soft); line-height: 1.8; }
.side-status .dot { color: var(--ok); }

/* ---------- main ---------- */
main { flex: 1; min-width: 0; padding: 1.1rem 1.5rem 2rem; max-width: 1180px; }
.page-head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: .2rem 0 .3rem; } .page-head .sub { color: var(--muted); font-size: .92rem; }
.head-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

/* stats */
.grid { display: grid; gap: 1rem; }
.widgets { grid-template-columns: repeat(5, 1fr); margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; padding: .9rem 1rem; }
.stat b { font-size: 1.7rem; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .8rem; }

/* container */
.container { background: var(--card); border: 1px solid var(--border-soft); border-radius: 16px; overflow: hidden; margin-bottom: 1rem; }

/* activity (by date) */
#activity { padding: 1rem 1.2rem; }
.act-head { font-weight: 700; margin-bottom: .7rem; display: flex; gap: .6rem; align-items: baseline; }
.act-row { display: flex; align-items: center; gap: .8rem; padding: .3rem .4rem; cursor: pointer; border-radius: 6px; }
.act-row:hover, .act-row.on { background: #f2f8fd; }
.act-date { width: 100px; font-size: .82rem; color: var(--muted); flex: none; }
.act-bar { flex: 1; background: #eef0f2; height: 12px; border-radius: 6px; overflow: hidden; }
.act-bar i { display: block; height: 100%; background: var(--orange-2); }
.act-n { width: 28px; text-align: right; font-weight: 700; }

/* application cards (service-card style) */
.projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 16px; padding: 1.1rem; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); border-color: var(--border); transform: translateY(-2px); }
.card-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.card-ico { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg,#f0f7ff,#e6f0ff); color: var(--link); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.card-h b { font-size: 1rem; } .card-h .pill { margin-left: auto; }
.role { color: var(--link); font-weight: 700; margin: .1rem 0; }
.meta { color: var(--muted); font-size: .82rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; }
.tag { font-size: .68rem; color: var(--muted); background: #f2f3f3; border: 1px solid var(--border-soft); border-radius: 4px; padding: .12rem .4rem; }
.tag.sp { color: var(--ok); background: #e7f6ec; border-color: #cfead8; }
.tag.st { color: #3b48c9; background: #eef2ff; border-color: #dbe1fb; }
.due { display: block; margin-top: .55rem; color: var(--orange-2); font-size: .78rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* status pills */
.pill { font-size: .68rem; font-weight: 700; border-radius: 20px; padding: .12rem .55rem; text-transform: capitalize; }
.pill.applied { background: #eef0f2; color: #5f6b7a; }
.pill.screen { background: #fff2d9; color: #8a5a00; }
.pill.interview { background: #e6f0ff; color: #0056d6; }
.pill.offer { background: #e6f6e9; color: #0a7d1b; }
.pill.rejected { background: #fdece9; color: var(--danger); }
.pill.ghosted { background: #f4f4f6; color: #97a0ad; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow: auto; z-index: 100; }
.sheet { background: #fff; border-radius: 16px; width: 100%; max-width: 700px; }
.sm-sheet { max-width: 460px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border-soft); }
.x { border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.jd-box { margin: 1.2rem 1.3rem 0; padding: 1rem; background: #fff7ed; border: 1px solid #f6d9b8; border-radius: 12px; }
.jd-box label { display: block; font-weight: 700; color: #b35900; margin-bottom: .4rem; font-size: .9rem; }
.jd-box .btn { margin-top: .6rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding: 1.3rem; }
.grid2 label { display: block; font-size: .78rem; color: var(--muted); }
.grid2 label input, .grid2 label select { margin-top: .25rem; }
.grid2 .full { grid-column: 1 / -1; }
.check2 { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--text); align-self: end; }
.check2 input { width: auto; }
.docs .doclist { display: flex; flex-wrap: wrap; gap: .6rem; } .docs a { font-size: .85rem; }
.sheet-actions { display: flex; align-items: center; gap: .6rem; }

/* settings */
.settings-body { padding: 1.3rem; display: flex; flex-direction: column; gap: 1.4rem; }
.setblock h3 { margin-bottom: .7rem; }
.setblock label { display: block; font-size: .78rem; color: var(--muted); margin-top: .6rem; }
.setblock input { margin-top: .25rem; } .setblock .btn { margin-top: .9rem; }
.secret { display: block; background: var(--nav); color: #7ee787; padding: .6rem .8rem; border-radius: 8px; font-family: monospace; font-size: .95rem; letter-spacing: 1px; word-break: break-all; margin: .3rem 0; }

/* inline edit view */
.editcard { background: #fff; border: 1px solid var(--border-soft); border-radius: 16px; }
#edit-view .jd-box { margin: 0 0 1rem; }

/* JD ↔ résumé match */
.match { display: flex; align-items: center; gap: 1rem; }
.match-score { flex: none; width: 84px; height: 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.match.good .match-score { background: var(--ok); } .match.ok .match-score { background: #b35900; } .match.low .match-score { background: var(--danger); }
.match-score b { font-size: 1.5rem; line-height: 1; } .match-score span { font-size: .7rem; opacity: .92; }
.match-main { flex: 1; min-width: 0; } .match-main p { color: var(--text); margin-top: .5rem; }
.match-bar { background: #eef0f2; height: 10px; border-radius: 6px; overflow: hidden; }
.match-bar i { display: block; height: 100%; }
.match.good .match-bar i { background: var(--ok); } .match.ok .match-bar i { background: #d4870a; } .match.low .match-bar i { background: var(--danger); }
.match-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.match-lists h4 { font-size: .82rem; margin-bottom: .3rem; }
.match-lists ul { list-style: none; } .match-lists li { font-size: .82rem; padding: .2rem 0; color: var(--muted); }
.match-good h4 { color: var(--ok); } .match-gap h4 { color: #b35900; }
@media (max-width: 620px) { .match-lists { grid-template-columns: 1fr; } .match { flex-direction: column; align-items: flex-start; } }
.tag.mt { font-weight: 700; }
.tag.mt.good { background: #e6f6e9; color: #0a7d1b; border-color: #cfead8; }
.tag.mt.ok { background: #fff2d9; color: #8a5a00; border-color: #f6e2b8; }
.tag.mt.low { background: #fdece9; color: var(--danger); border-color: #f6cfc8; }

/* footer */
.siteftr { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: center; text-align: center; align-items: center; background: var(--nav); color: #c6ccd4; font-size: .78rem; padding: .7rem 1.2rem; border-top: 1px solid var(--nav-border); }
.ftr-left { display: flex; gap: 1.1rem; } .ftr-left a { color: #d5dbdb; } .ftr-left a:hover { color: #fff; }
.ftr-right { color: #9aa4b0; } .ftr-muted { color: #6b7684; }

/* portfolio "abr" logo */
.awslogo { display: flex; align-items: center; padding: 0 .4rem; }
.awslogo .awsmark { height: 27px; width: auto; display: block; }
.awsmark-letters { fill: #fff; font-family: "Amazon Ember", Arial, sans-serif; } .awsmark-bar { fill: var(--orange); } .awsmark-caret { fill: var(--orange); opacity: .55; }
.awslogo:hover { opacity: .85; } .awslogo:hover .awsmark-letters { fill: var(--orange); }
.login-card .brand .awsmark.lg { height: 34px; }
.login-card .awsmark.lg .awsmark-letters { fill: var(--nav); }

/* container head/body (portfolio) */
.container-head { font-weight: 700; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border-soft); font-size: .92rem; display: flex; align-items: center; gap: .5rem; }
.container-body { padding: 1.1rem; color: var(--text); font-size: .9rem; }
.container-body p strong { color: var(--text); }

/* detail view */
.backlink { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; cursor: pointer; color: var(--link); font: inherit; font-size: .88rem; font-weight: 600; margin-bottom: 1rem; padding: 0; }
.backlink:hover { color: var(--link-hover); }
.detail-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.detail-head h1 { margin: .1rem 0 .4rem; }
.detail-head .lede { color: var(--orange-2); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.card-ico.big { width: 52px; height: 52px; font-size: 1.4rem; border-radius: 12px; }
.detail-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.1rem; align-items: start; }
.detail-main .container, .detail-side .container { margin-bottom: 1.1rem; }
.jd-text { white-space: pre-wrap; font: inherit; color: var(--text); max-height: 340px; overflow: auto; }
.timeline { list-style: none; } .timeline li { padding: .3rem 0 .3rem 1rem; border-left: 2px solid var(--border-soft); color: var(--muted); }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

/* the [hidden] attribute must beat display rules */
[hidden] { display: none !important; }

/* ---------- responsive ---------- */
.hamburger { display: none; background: none; border: 0; color: #eaeded; cursor: pointer; padding: .3rem .45rem; }
.hamburger .i { width: 22px; height: 22px; }
.nav-backdrop { display: none; }
@media (max-width: 1000px) { .widgets { grid-template-columns: repeat(3, 1fr); } .projects-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px)  { .widgets { grid-template-columns: repeat(2, 1fr); } .projects-grid { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .hamburger { display: inline-flex; order: -1; }
  .gnav { flex-wrap: wrap; height: auto; padding: .5rem .7rem; gap: .5rem; }
  .gnav-r { margin-left: auto; } .gnav-acct .name { display: none; } .gnav-chip .label { display: none; }
  .gnav-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 110; width: 264px; min-height: 100vh; overflow-y: auto;
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: 2px 0 22px rgba(0,0,0,.28); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 105; background: rgba(0,0,0,.45); }
}
