/* ======================================================================
 * HudsonLocke.com — professional résumé window.
 * Self-contained: window chrome + layout + print styles. No XP.css needed.
 * ====================================================================== */

:root {
  --lk-blue:        #245edb;
  --lk-blue-2:      #1941a5;
  --lk-titlebar-a:  #2f7bf2;
  --lk-titlebar-b:  #1c4fc4;
  --lk-titlebar-c:  #14379a;
  --lk-bg-a:        #5b86c4;
  --lk-bg-b:        #aac5e6;
  --lk-ink:         #1d2733;
  --lk-muted:       #5c6b7a;
  --lk-line:        #e2e8f0;
  --lk-card:        #ffffff;
  --lk-accent:      #245edb;
  --lk-radius:      8px;
  --lk-font:        "Segoe UI", Tahoma, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body.hudsonlocke {
  font-family: var(--lk-font);
  color: var(--lk-ink);
  background: linear-gradient(160deg, var(--lk-bg-a) 0%, var(--lk-bg-b) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.lk-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 18px 48px;
  min-height: 100vh;
}

/* ---------------------------- Window chrome ---------------------------- */
.lk-window {
  width: 100%;
  max-width: 1080px;
  background: var(--lk-card);
  border-radius: var(--lk-radius) var(--lk-radius) 6px 6px;
  box-shadow: 0 18px 50px rgba(8, 22, 56, 0.38), 0 2px 0 rgba(255, 255, 255, 0.4) inset;
  border: 1px solid var(--lk-titlebar-c);
  overflow: hidden;
}

.lk-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 7px 5px 9px;
  background: linear-gradient(180deg, var(--lk-titlebar-a) 0%, var(--lk-titlebar-b) 48%, var(--lk-titlebar-c) 100%);
  color: #fff;
}
.lk-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lk-title-text {
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lk-title-ico {
  width: 16px; height: 16px; flex: 0 0 16px; border-radius: 3px;
  background: radial-gradient(circle at 30% 30%, #ffe9a8, #f5a623 70%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset;
}
.lk-controls { display: flex; gap: 3px; }
.lk-ctl {
  width: 21px; height: 20px; border-radius: 3px; display: inline-block;
  border: 1px solid rgba(255,255,255,.65);
  background: linear-gradient(180deg, #4f8bf0, #2257c9);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset;
}
.lk-close { background: linear-gradient(180deg, #f08f6b, #d24a28); }
.lk-close:hover { background: linear-gradient(180deg, #ff9d78, #e4542f); }

.lk-body { padding: 22px 24px 26px; }

/* ---------------------------- Status bar ------------------------------- */
.lk-statusbar {
  display: flex; justify-content: space-between;
  padding: 5px 12px;
  font-size: 11px; color: var(--lk-muted);
  background: #eef2f7;
  border-top: 1px solid var(--lk-line);
}

.lk-foot-note { margin: 14px 0 0; color: #eaf1ff; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.lk-foot-note a { color: #fff; }

/* ------------------------------- Layout -------------------------------- */
.lk-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
}

/* ------------------------------- Left ---------------------------------- */
.lk-left { min-width: 0; }

.lk-avatar {
  width: 148px; height: 148px; border-radius: 12px; object-fit: cover;
  display: block; margin: 0 0 14px;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(8, 22, 56, 0.22);
}
.lk-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--lk-titlebar-a), var(--lk-titlebar-c));
  color: #fff; font-size: 52px; font-weight: 700; letter-spacing: 1px;
}

.lk-name { font-size: 24px; line-height: 1.15; margin: 4px 0 2px; }
.lk-tagline { margin: 0 0 14px; color: var(--lk-accent); font-weight: 600; font-size: 14px; }

.lk-contact { list-style: none; margin: 0 0 16px; padding: 0; }
.lk-contact li {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; padding: 5px 0; border-bottom: 1px solid var(--lk-line);
}
.lk-contact li:last-child { border-bottom: 0; }
.lk-contact a { color: var(--lk-ink); text-decoration: none; word-break: break-word; }
.lk-contact a:hover { color: var(--lk-accent); text-decoration: underline; }
.lk-ico {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, var(--lk-titlebar-a), var(--lk-titlebar-c));
}

.lk-projects-link {
  display: block; text-align: center;
  padding: 9px 12px; margin-bottom: 18px;
  background: linear-gradient(180deg, #fdfdfd, #e9eef6);
  border: 1px solid #b6c4d8; border-radius: 6px;
  color: var(--lk-blue-2); font-weight: 700; font-size: 13.5px; text-decoration: none;
}
.lk-projects-link:hover { background: linear-gradient(180deg, #fff, #dde7f5); border-color: var(--lk-accent); }

/* LinkedIn feed */
.lk-feed-head, .lk-section-head {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--lk-muted); margin: 0 0 10px;
  padding-bottom: 5px; border-bottom: 2px solid var(--lk-line);
}
.lk-post {
  background: #f7f9fc; border: 1px solid var(--lk-line);
  border-radius: 7px; padding: 10px 11px; margin-bottom: 10px;
}
.lk-post-img { width: 100%; border-radius: 5px; margin-bottom: 8px; display: block; }
.lk-post-text { margin: 0 0 7px; font-size: 13px; line-height: 1.45; }
.lk-post-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--lk-muted); }
.lk-post-meta a { color: var(--lk-accent); text-decoration: none; white-space: nowrap; }
.lk-post-meta a:hover { text-decoration: underline; }

/* ------------------------------- Right --------------------------------- */
.lk-right { min-width: 0; }

.lk-resume-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.lk-resume-head h2 { margin: 0; font-size: 19px; }
.lk-pdf-dl {
  flex: 0 0 auto;
  padding: 7px 14px; border-radius: 6px; text-decoration: none; font-weight: 700; font-size: 13px;
  color: #fff; background: linear-gradient(180deg, #43a047, #2e7d32);
  border: 1px solid #1b5e20; box-shadow: 0 1px 0 rgba(255,255,255,.3) inset;
}
.lk-pdf-dl:hover { background: linear-gradient(180deg, #4cae50, #357a38); }

.lk-pdf-frame {
  border: 1px solid #c3d0e0; border-radius: 8px; overflow: hidden;
  background: #525659; margin-bottom: 22px;
  height: 560px;
}
.lk-pdf-frame object,
.lk-pdf-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lk-pdf-fallback { color: #fff; padding: 24px; text-align: center; }
.lk-pdf-fallback a { color: #9fc6ff; }

/* HTML résumé */
.lk-resume-html { font-size: 14px; line-height: 1.55; }
.lk-intro { margin: 0 0 20px; font-size: 14.5px; color: #2c3a48; }
.lk-section { margin-bottom: 20px; }
.lk-item { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--lk-line); }
.lk-section .lk-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.lk-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 3px; }
.lk-item-title { font-weight: 700; font-size: 15px; }
.lk-item-sub { color: var(--lk-muted); font-size: 13px; }
.lk-item-desc { color: #36434f; }
.lk-item-desc p { margin: 4px 0; }

/* ------------------------------ Projects ------------------------------- */
.lk-projects-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--lk-line);
}
.lk-projects-head h1 { margin: 0; font-size: 22px; }
.lk-back {
  text-decoration: none; font-weight: 700; font-size: 13.5px; color: var(--lk-blue-2);
  padding: 6px 12px; border: 1px solid #b6c4d8; border-radius: 6px;
  background: linear-gradient(180deg, #fdfdfd, #e9eef6);
}
.lk-back:hover { border-color: var(--lk-accent); background: linear-gradient(180deg, #fff, #dde7f5); }
.lk-back-bottom { margin: 22px 0 0; }

.lk-proj-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px;
}
.lk-proj {
  border: 1px solid var(--lk-line); border-radius: 9px; padding: 14px 15px;
  background: #fbfcfe; display: flex; flex-direction: column;
}
.lk-proj-thumb { width: 100%; border-radius: 6px; margin-bottom: 10px; aspect-ratio: 16/9; object-fit: cover; }
.lk-proj-title { margin: 0 0 6px; font-size: 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lk-proj-year { font-size: 12px; font-weight: 600; color: var(--lk-muted); }
.lk-proj-tags { margin: 0 0 8px; font-size: 12px; color: var(--lk-accent); font-weight: 600; }
.lk-proj-desc { font-size: 13.5px; line-height: 1.5; color: #36434f; margin-bottom: 10px; }
.lk-proj-stack { margin: 0 0 10px; font-size: 12px; color: var(--lk-muted); font-family: "Cascadia Code", Consolas, monospace; }
.lk-proj-link { margin-top: auto; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--lk-blue-2); }
.lk-proj-link:hover { text-decoration: underline; }
.lk-empty { color: var(--lk-muted); font-style: italic; }

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 820px) {
  .lk-grid { grid-template-columns: 1fr; gap: 22px; }
  .lk-left { display: grid; grid-template-columns: auto 1fr; grid-template-areas:
      "avatar name" "avatar tagline" "contact contact" "projects projects" "feed feed";
      column-gap: 16px; align-items: center; }
  .lk-avatar { grid-area: avatar; width: 96px; height: 96px; margin: 0; }
  .lk-avatar-fallback { font-size: 34px; }
  .lk-name { grid-area: name; align-self: end; }
  .lk-tagline { grid-area: tagline; align-self: start; margin-bottom: 0; }
  .lk-contact { grid-area: contact; margin-top: 12px; }
  .lk-projects-link { grid-area: projects; }
  .lk-feed { grid-area: feed; }
  .lk-pdf-frame { height: 460px; }
}
@media (max-width: 520px) {
  .lk-screen { padding: 14px 8px 30px; }
  .lk-body { padding: 16px 14px 20px; }
  .lk-left { display: block; }
  .lk-avatar { margin-bottom: 12px; }
  .lk-pdf-frame { height: 70vh; }
  .lk-resume-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ------------------------------- Print --------------------------------- */
@media print {
  body.hudsonlocke { background: #fff; }
  .lk-screen { padding: 0; }
  .lk-window { box-shadow: none; border: 0; max-width: none; }
  .lk-titlebar, .lk-statusbar, .lk-controls, .lk-foot-note,
  .lk-pdf-frame, .lk-pdf-dl, .lk-projects-link, .lk-feed { display: none !important; }
  .lk-grid { grid-template-columns: 200px 1fr; }
  .lk-item, .lk-contact li { break-inside: avoid; }
}
