:root {
  --blue: #0002FF;
  --red:  #FF1F00;
  --white: #ffffff;
  --pad: 48px;   /* left/right page margin outside the frame */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0; }
html, body {
  font-family: 'DM Mono', monospace;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.5rem;
  color: var(--blue);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
::selection { color: #fff; background: var(--red); -webkit-text-fill-color: #fff; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════
   OUTER WRAPPER — the blue-bordered frame
   with page margins on left + right
══════════════════════════════════ */
.page-frame {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Every top-level section sits inside .frame-box,
   which draws the continuous outer border */
.frame-box {
  border: 1px solid var(--blue);
  /* sections stack vertically; inner borders are
     drawn on the children, not here */
}

/* ── RULER ── */
.ruler {
  height: 18px;
  border-top: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  background-image:
    repeating-linear-gradient(to right, var(--blue) 0, var(--blue) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(to right, var(--blue) 0, var(--blue) 1px, transparent 1px, transparent 5px);
  background-size: 20px 10px, 5px 6px;
  background-position: 0 0, 0 12px;
  background-repeat: repeat-x;
  opacity: 0.22;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  max-width: 1400px;
  box-sizing: border-box;
  margin: 2.2rem auto 0.8rem;
}

.nav-logo { font-weight: 400; font-size: 16px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 16px; font-weight: 300; }

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 4.5fr 7.5fr;
  border-bottom: 1px solid var(--blue);
}
.hero-photo {
  border-right: none;
  overflow: hidden;
  min-height: 640px;
  background: #ffffff;
  position: relative;
  display: flex;
}
.hero-photo-inner {
  position: absolute;
  bottom: 36px;
  left: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.hero-photo-img {
  width: 360px;
  height: 500px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.hero-photo-caption {
  font-size: 12px;
  font-weight: 300;
  color: var(--blue);
  opacity: 0.55;
  font-style: italic;
  line-height: 1.6;
}
/* USP 2x2 grid embedded in right hero column */
.hero-usp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: end;
  padding-top: 80px;
}
.hero-usp-cell {
  padding: 28px 32px;
  border-bottom: none;
  transition: background .2s; cursor: default;
}
.hero-usp-cell:nth-child(even) { border-left: none; }

.hero-usp-cell:hover { background: #f0f1ff; }
.usp-icon { font-size: 34px; margin-bottom: 12px; display: block; }
.usp-title { font-size: 16px; font-weight: 700; margin-bottom: 9px; line-height: 1.25; }
.usp-desc { font-size: 12.5px; line-height: 1.5rem; opacity: 0.68; }

/* ── MARQUEE ── */
.marquee-wrap {
  border-bottom: 1px solid var(--blue);
  overflow: hidden;
  padding: 10px 0;
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}
.marquee-item {
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 300; font-style: italic;
  color: var(--red); padding: 0 36px;
  opacity: 0.18; letter-spacing: -0.01em;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }



/* ── WORK ── */
.work-filters-wrap {
  border-bottom: 1px solid var(--blue);
  padding: 14px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.filter-row {
  display: flex; align-items: center; gap: 0;
}
.filter-label {
  font-size: 11px; opacity: 0.4; white-space: nowrap;
  width: 52px; flex-shrink: 0; font-style: italic;
}
.filter-group { display: flex; gap: 0; flex-wrap: wrap; gap: 4px; }
.filter-btn {
  font-family: 'DM Mono', monospace;
  font-size: 13px; font-weight: 300;
  padding: 4px 14px;
  border: none; background: none;
  color: var(--blue); opacity: 0.45;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, opacity .15s;
}
.filter-btn:hover { opacity: 1; color: var(--blue); }
.filter-btn.active { color: var(--red); opacity: 1; font-weight: 500; }
.filter-clear {
  font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 300;
  padding: 4px 10px; margin-left: 8px;
  border: 1px solid var(--red); background: none;
  color: var(--red); cursor: pointer; opacity: 0.7;
  transition: opacity .15s;
}
.filter-clear:hover { opacity: 1; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-columns: 1fr 1fr 1fr;
}
.work-card {
  border-bottom: 1px solid var(--blue);
  cursor: pointer; transition: background .15s; display: block;
}
.work-card:not(:nth-child(3n+1)) { border-left: 1px solid var(--blue); }
.work-card:hover { background: #f0f1ff; }
.work-card:nth-last-child(-n+3) { border-bottom: none; }

.work-thumb {
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.work-thumb img {
  filter: grayscale(1);
  transition: filter .3s;
  display: block;
  width: 100%; height: 190px;
  object-fit: cover;
}
.work-card:hover .work-thumb img,
.work-card.selected .work-thumb img { filter: grayscale(0) !important; }
.work-body { padding: 26px 30px; }
.work-industry { font-size: 12px; color: var(--red); margin-bottom: 7px; font-style: italic; }
.work-title { font-size: 18px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.work-desc { font-size: 13px; line-height: 1.5rem; opacity: 0.62; margin-bottom: 14px; }
.work-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.work-tag { font-size: 11px; padding: 2px 8px; border: 1px solid currentColor; opacity: 0.5; }
.work-tag.award { color: var(--red); opacity: 1; border-color: var(--red); }
.work-empty { grid-column: 1/-1; padding: 64px; text-align: center; font-style: italic; opacity: 0.4; }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
}
.about-left {
  border-right: 1px solid var(--blue);
  padding: 44px 36px;
  display: flex; flex-direction: column; gap: 28px;
}
.about-photo {
  width: 100%; aspect-ratio: 3/4;
  max-width: 200px;
  background: linear-gradient(135deg,#d0d5ff 0%,#8892ff 100%);
  border: 1px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}

.about-right { padding: 44px 40px; }
.about-name { font-size: 44px; font-weight: 700; line-height: 1; margin-bottom: 8px; }
.about-role { font-size: 13px; color: var(--red); font-style: italic; margin-bottom: 24px; }
.about-bio { font-size: 14px; line-height: 1.7rem; opacity: 0.72; margin-bottom: 28px; }

.about-sub { font-size: 11px; color: var(--red); font-style: italic; margin-bottom: 10px; opacity: 0.8; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; }
.chip { font-size: 12px; padding: 3px 10px; border: 1px solid var(--blue); opacity: 0.55; }

.exp-item { margin-bottom: 18px; }
.exp-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 4px; flex-wrap: wrap; }
.exp-role { font-size: 15px; font-weight: 700; }
.exp-co { font-size: 12px; color: var(--red); font-style: italic; }
.exp-period { font-size: 11px; opacity: 0.4; margin-left: auto; }
.exp-desc { font-size: 12px; opacity: 0.62; line-height: 1.5rem; }

.edu-row { display: flex; gap: 18px; margin-bottom: 10px; }
.edu-yr { font-size: 11px; opacity: 0.38; width: 74px; flex-shrink: 0; padding-top: 2px; }
.edu-school { font-size: 14px; font-weight: 500; }
.edu-major { font-size: 12px; opacity: 0.55; }

.award-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--blue); margin-bottom: 8px; }
.award-icon { font-size: 18px; }
.award-name { font-size: 14px; font-weight: 500; }
.award-sub { font-size: 11px; opacity: 0.5; }

/* ── CONTACT ── */
.contact-email-btn:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.contact-li:hover { color: var(--red); border-color: var(--red); text-decoration: none; }

.frame-footer 
/* scroll-spy active */
.nav-links a.active { color: var(--red); }

/* ── AI JD MATCH MODULE ── */
.ai-match-bar {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
}
.ai-match-marquee {
  flex: 1;
  display: flex;
  min-height: 0;
}
.ai-match-inline-input {
  font-family: 'DM Mono', monospace;
  font-size: 13px; font-weight: 300;
  color: var(--blue);
  background: transparent;
  border: none; outline: none;
  width: 100%;
  resize: none;
  padding: 16px 24px;
  line-height: 1.5rem;
  display: block;
  overflow: hidden;
  field-sizing: content;
  min-height: 52px;
}
.ai-match-inline-input::placeholder { color: var(--blue); opacity: 0.35; }
.ai-match-btn {
  font-family: 'DM Mono', monospace;
  font-size: 13px; font-weight: 400;
  padding: 0 32px;
  height: auto;
  align-self: stretch;
  border: none; border-left: 1px solid var(--blue);
  background: var(--blue); color: var(--white);
  cursor: pointer; white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}
.ai-match-btn:hover { background: #0001cc; }
.ai-match-btn.loading { opacity: 0.6; cursor: wait; }
.ai-match-result-bar {
  display: none;
  padding: 10px 28px;
  font-size: 12px;
  font-style: italic;
  color: var(--blue);
  opacity: 0.6;
  border-bottom: 1px solid var(--blue);
  background: #f8f8ff;
}
.ai-match-result-bar.visible { display: block; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,2,255,0.08);
  z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border: 1px solid var(--blue);
  width: min(640px, 92vw);
  display: flex; flex-direction: column;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--blue);
}
.modal-title {
  font-size: 14px; font-style: italic; color: var(--red);
}
.modal-close {
  font-family: 'DM Mono', monospace; font-size: 18px;
  background: none; border: none; color: var(--blue);
  cursor: pointer; line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--red); }
.modal-body { padding: 20px 24px; }
.modal-textarea {
  font-family: 'DM Mono', monospace;
  font-size: 13px; font-weight: 300;
  color: var(--blue);
  background: #fafafe;
  border: 1px solid var(--blue);
  outline: none;
  width: 100%; height: 220px;
  resize: none; padding: 14px 16px;
  line-height: 1.6rem;
}
.modal-textarea::placeholder { opacity: 0.35; }
.modal-footer {
  display: flex; justify-content: flex-end;
  padding: 12px 24px 20px;
  gap: 12px;
}
.modal-cancel {
  font-family: 'DM Mono', monospace; font-size: 13px;
  padding: 10px 22px; background: none;
  border: 1px solid var(--blue); color: var(--blue);
  cursor: pointer; transition: all .15s;
}
.modal-cancel:hover { background: #f0f0ff; }
.modal-run {
  font-family: 'DM Mono', monospace; font-size: 13px;
  padding: 10px 22px; background: var(--blue); color: #fff;
  border: none; cursor: pointer; transition: background .15s;
}
.modal-run:hover { background: #0001cc; }
.modal-run.loading { opacity: 0.6; cursor: wait; }

.work-tag-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.work-tag-label {
  font-size: 11px;
  color: var(--red);
  opacity: 0.8;
  letter-spacing: 0.03em;
}

/* ── PDF VIEWER MODAL ── */
.pdf-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,40,0.55);
  z-index: 2000;
  align-items: center; justify-content: center;
  padding: 24px;
}
.pdf-modal-overlay.open { display: flex; }
.pdf-modal {
  background: #fff;
  border: 1px solid var(--blue);
  width: min(960px, 95vw);
  height: 90vh;
  display: flex; flex-direction: column;
}
.pdf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--blue);
  flex-shrink: 0;
}
.pdf-modal-title { font-size: 13px; color: var(--blue); font-style: italic; }
.pdf-modal-close {
  font-family: 'DM Mono', monospace; font-size: 20px;
  background: none; border: none; color: var(--blue);
  cursor: pointer; line-height: 1; padding: 0 4px;
}
.pdf-modal-close:hover { color: var(--red); }
.pdf-modal iframe {
  flex: 1; border: none; width: 100%;
}


/* ── CONTACT ── */
.contact-section {
  background: var(--blue);
  color: var(--white);
  padding: 32px 48px;
}
.contact-inner {
  display: flex;
  align-items: center;
  gap: 56px;
}
.contact-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}
.contact-links {
  display: flex;
  flex-direction: row;
  gap: 28px;
  align-items: center;
}
.contact-link-item {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}
.contact-link-item:hover { color: #fff; }
.contact-link-dim { color: rgba(255,255,255,0.75); }
.contact-qr {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.contact-qr-placeholder {
  width: 72px;
  height: 72px;
  border: 1px dashed rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
}
.contact-qr-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ── BRAND GRID ── */
.hero-brands {
  display: flex;
  flex-direction: column;
  padding: 32px 36px 36px 0;
  gap: 12px;
}
.brand-label {
  font-size: 11px;
  color: var(--blue);
  opacity: 0.35;
  letter-spacing: 0.08em;
}
.brand-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--blue);
  opacity: 0.35;
  line-height: 1.4;
  border-right: 1px solid rgba(0,2,255,0.1);
  border-bottom: 1px solid rgba(0,2,255,0.1);
  transition: opacity .2s;
  cursor: default;
}
.brand-item:hover { opacity: 0.75; }
.brand-item:nth-child(6n) { border-right: none; }
.brand-item:nth-last-child(-n+6) { border-bottom: none; }


.hero-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 8px;
}
.hero-hi {
  font-size: 15px;
  font-style: italic;
  color: var(--red);
  margin: 0 0 8px;
}
.hero-intro-text {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  color: var(--blue);
  line-height: 1.3;
  margin: 0;
  max-width: 600px;
}
.hero-intro-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--blue);
  opacity: 0.55;
  line-height: 1.7;
  margin: 12px 0 0;
  max-width: 420px;
}

/* ── MATCH JD NAV BUTTON ── */
.nav-jd-btn {
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  padding: 4px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  margin-right: 16px;
  transition: background .15s, color .15s;
}
.nav-jd-btn:hover { background: var(--blue); color: #fff; }

/* ── MATCH MODAL ── */
.match-modal { max-width: 560px; width: 90vw; }
.match-tabs {
  display: flex;
  border-bottom: 1px solid var(--blue);
}
.match-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--blue);
  opacity: 0.4;
  transition: opacity .15s;
}
.match-tab.active { opacity: 1; border-bottom: 2px solid var(--blue); font-weight: 500; margin-bottom: -1px; }
.match-panel { padding: 20px 24px 0; }
.match-project-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}
.match-project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(0,2,255,0.07);
  cursor: pointer;
  font-size: 13px;
  color: var(--blue);
}
.match-project-item input[type=checkbox] { accent-color: var(--blue); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.ai-result-modal {
  display: none;
  margin: 12px 0;
  font-size: 13px;
  color: var(--blue);
  opacity: 0.75;
  line-height: 1.7;
  white-space: pre-line;
  padding: 10px 12px;
  background: #f0f1ff;
}
.ai-result-modal.visible { display: block; }
.modal-share-hidden { display: none; }
.modal-share-hidden.visible { display: inline-flex; }

/* ── SHARE OVERLAY ── */
#share-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  overflow-y: auto;
}
.share-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 48px 80px;
}
.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 52px;
}
.share-logo { font-size: 16px; font-weight: 400; color: var(--blue); }
.share-copy-btn {
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue);
  padding: 5px 16px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.share-copy-btn:hover { background: var(--blue); color: #fff; }
.share-intro { margin-bottom: 12px; }
.share-intro p:first-child { font-size: 15px; font-weight: 300; color: var(--blue); opacity: 0.55; margin-bottom: 6px; }
.share-intro p:last-child { font-size: clamp(20px,2.5vw,30px); font-weight: 700; color: var(--blue); line-height: 1.3; }
.share-reason {
  font-size: 13px;
  color: var(--blue);
  opacity: 0.5;
  font-style: italic;
  margin-bottom: 36px;
}
.share-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  border: 1px solid var(--blue);
  gap: 0;
}
.share-cards .work-card { border-right: 1px solid var(--blue); border-bottom: 1px solid var(--blue); }
.share-footer {
  margin-top: 52px;
  font-size: 15px;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
}
.share-cta {
  background: transparent;
  border: none;
  color: var(--red);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.match-job-input { padding: 12px 4px 4px; }
.match-job-input input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--blue);
  padding: 6px 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--blue);
  background: transparent;
  outline: none;
  opacity: 0.7;
}
.match-job-input input::placeholder { opacity: 0.4; }
.match-job-input input:focus { opacity: 1; border-bottom-color: var(--blue); }
