/* ==========================================================================
   Portfolio — black & gold override on the Industry design system.
   Tokens per the handoff spec; Industry supplies the base components
   (.blueprint, .corner, .btn, .card, .tag) from css/industry.css.
   ========================================================================== */

:root {
  --color-bg: #0c0c0d;
  --color-surface: #151517;
  --color-text: #f0ece2;
  --color-accent: #c9a227;
  --color-accent-2: #c9a227;
  --color-divider: color-mix(in srgb, #f0ece2 18%, transparent);

  --color-accent-100: #f7efd2;
  --color-accent-200: #ecdda8;
  --color-accent-300: #dfc87c;
  --color-accent-400: #d4b552;
  --color-accent-500: #c9a227;
  --color-accent-600: #a8871f;
  --color-accent-700: #856b18;
  --color-accent-800: #5c4a11;
  --color-accent-900: #3a2f0a;
  --color-accent-2-100: #f7efd2;
  --color-accent-2-200: #ecdda8;
  --color-accent-2-800: #5c4a11;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .6);
  --shadow-md: 0 3px 12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .6);

  /* muted text ramp */
  --text-body: #b3aea4;
  --text-mut: #a9a49a;
  --text-meta: #8d887c;
  --text-label: #7d7871;
  --text-faint: #615c54;
  --text-tag: #cfcabd;

  --mono: ui-monospace, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-300); }

h1, h2, h3 { font-family: var(--font-heading); }

.tag-accent { background: color-mix(in srgb, var(--color-accent) 16%, transparent); color: var(--color-accent-300); }
.tag-neutral { background: color-mix(in srgb, #f0ece2 8%, transparent); color: var(--text-tag); }
.btn-primary { color: #0c0c0d; background: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-300); }
.shot { background-image: repeating-linear-gradient(45deg, color-mix(in srgb, #f0ece2 4%, transparent) 0 8px, transparent 8px 16px); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-accent); color: #0c0c0d;
  padding: 10px 16px; z-index: 100;
  font-family: var(--font-heading);
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ==========================================================================
   Shell — sidebar + scrolling main
   ========================================================================== */

.shell {
  display: grid;
  grid-template-columns: 288px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--color-divider);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}

.sidebar__id { display: flex; flex-direction: column; gap: 14px; }

.portrait {
  width: 84px; height: 84px;
  display: grid; place-items: center;
}
.portrait span { font: 11px var(--mono); color: var(--text-meta); }

.sidebar__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.05;
}
.sidebar__role {
  font-size: 13px;
  color: var(--color-accent);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.sidebar__bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-mut);
  margin: 0;
}

.snav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  padding: 16px 0;
}
.snav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--color-text);
}
.snav a:hover { color: var(--color-accent); }
.snav a[aria-current="true"] { color: var(--color-accent); }
.snav span { font: 10px var(--mono); opacity: .5; }
.snav a[aria-current="true"] span { opacity: .6; }

.main { min-width: 0; }

.section { padding: 40px 48px; border-bottom: 1px solid var(--color-divider); }
.section--overview { padding: 44px 48px 36px; }
.section--contact {
  padding: 44px 48px 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  border-bottom: 0;
}
.section h2 { margin: 0 0 26px; font-size: 34px; }

/* ==========================================================================
   Hero + stats
   ========================================================================== */

.hero { max-width: 640px; }
.hero__kicker {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: 12px;
}
.hero h1 { font-size: 52px; margin: 0 0 14px; text-wrap: balance; }
.hero__sub {
  font-size: 16px; line-height: 1.65; color: var(--text-body);
  max-width: 56ch; margin: 0;
}
.hero__actions {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-top: 24px;
}
.hero__note { font-size: 12.5px; color: var(--text-meta); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-divider);
  margin-top: 34px;
}
.stat {
  background: var(--color-bg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat__n {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--color-accent);
}
.stat__label {
  font: 10.5px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-label);
}

/* ==========================================================================
   Projects
   ========================================================================== */

.projects__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px;
}
.projects__head h2 { margin: 0; font-size: 34px; }
.projects__count { font: 11px var(--mono); color: var(--text-label); }
.projects__sub { font-size: 14px; color: var(--text-mut); margin: 0 0 26px; }

.pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.pcard {
  display: flex; flex-direction: column; gap: 0;
  transition: background .15s;
  cursor: pointer;
  text-align: left;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  width: 100%;
}
.pcard:hover { background: color-mix(in srgb, #f0ece2 3%, transparent); }

.pcard__shot {
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--color-divider);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
/* 500% + scale(.2): percentages resolve against the card box, so the frame
   renders a 5x-wide desktop viewport and fits at any card width with no JS
   measurement. Do not replace with a measured version — it render-loops. */
.pcard__shot iframe {
  position: absolute; top: 0; left: 0;
  width: 500%; height: 500%;
  border: 0;
  transform: scale(.2);
  transform-origin: top left;
  pointer-events: none;
}
.pcard__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(12,12,13,.5) 0, rgba(12,12,13,.08) 34%, rgba(12,12,13,.62) 100%);
}
.pcard__year {
  position: absolute; top: 12px; left: 12px;
  background: rgba(12, 12, 13, .72);
}
.pcard__hint {
  position: absolute; bottom: 12px; right: 12px;
  font: 11px var(--mono);
  color: var(--color-accent-300);
  letter-spacing: .06em;
}

.pcard__body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.pcard__title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.pcard__title h3 { margin: 0; font-size: 23px; }
.pcard__sector {
  font: 10px var(--mono); color: var(--text-label);
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.pcard__line { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-mut); }
.pcard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pcard__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--color-divider);
  padding-top: 12px; margin-top: 6px;
}
.pcard__result { font-size: 12px; color: var(--text-meta); }
.pcard__host {
  font-family: var(--font-heading);
  font-size: 14px; letter-spacing: .03em; white-space: nowrap;
}

/* ==========================================================================
   Services + process
   ========================================================================== */

.sgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.sgrid .card { padding: 22px; background: transparent; }
.sgrid .card-body { font-size: 13.5px; line-height: 1.6; color: var(--text-mut); opacity: 1; }
.sgrid .card-title { font-size: 21px; }
.service__from {
  font-size: 12px; color: var(--text-meta);
  border-top: 1px solid var(--color-divider);
  padding-top: 10px; margin-top: 4px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-divider);
  border: 1px solid var(--color-divider);
}
.step {
  background: var(--color-bg);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.step__no { font: 11px var(--mono); color: var(--color-accent); }
.step__title { font-family: var(--font-heading); font-size: 19px; }
.step p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-mut); }

.contact__copy { max-width: 520px; }
.contact__copy h2 { margin: 0 0 10px; font-size: 34px; }
.contact__copy p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-mut); }

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lb {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .78);
  display: grid; place-items: center;
  padding: 40px;
}
.lb[hidden] { display: none; }

.lb__panel {
  width: min(1240px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--color-bg);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.lb__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 22px;
  border-bottom: 1px solid var(--color-divider);
}
.lb__id { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.lb__name { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.lb__sector {
  font: 10px var(--mono); color: var(--text-label);
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.lb__controls { display: flex; align-items: center; gap: 8px; }
.lb__counter { font: 10px var(--mono); color: var(--text-label); margin-right: 6px; white-space: nowrap; }
.lb__controls .btn { padding: 6px 12px; white-space: nowrap; }

.lb__body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.lb__stage { padding: 22px; display: flex; flex-direction: column; gap: 10px; }

.chrome {
  border: 1px solid var(--color-divider);
  display: flex; flex-direction: column;
  background: #f2f2f3;
}
.chrome__bar {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px; row-gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(29, 31, 32, .14);
  background: #e6e6e7;
}
.chrome__lights { display: flex; gap: 5px; }
.chrome__lights span { width: 8px; height: 8px; border: 1px solid rgba(29, 31, 32, .35); }
.chrome__url {
  flex: 1 1 90px; min-width: 0;
  border: 1px solid rgba(29, 31, 32, .18);
  background: #f2f2f3;
  padding: 3px 9px;
  font: 10.5px var(--mono);
  color: #4a4e52;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chrome__vp { display: flex; gap: 4px; flex-shrink: 0; }
.chrome__vp button {
  border: 1px solid rgba(29, 31, 32, .25);
  background: transparent;
  color: #4a4e52;
  font: 10px var(--mono);
  padding: 3px 6px;
  cursor: pointer;
  white-space: nowrap;
}
.chrome__vp button[aria-pressed="true"] {
  border-color: var(--color-accent);
  color: var(--color-accent-700);
}

/* transform-origin must stay top left — scaling from top center displaces
   the frame horizontally while it overflows its box. */
.well { height: 520px; overflow: hidden; background: #dcdcde; position: relative; }
.well iframe {
  position: absolute; top: 0;
  border: 0; background: #f2f2f3;
  transform-origin: top left;
}

.lb__caption {
  display: flex; align-items: center; gap: 8px;
  font: 10px var(--mono); color: var(--text-label);
}
.lb__dot { color: var(--color-accent-400); }

.lb__aside {
  border-left: 1px solid var(--color-divider);
  padding: 22px;
  display: flex; flex-direction: column; gap: 20px;
}
.lb__block { display: flex; flex-direction: column; gap: 8px; }
.lb__block p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-mut); }
.lb__label {
  font: 10px var(--mono); color: var(--text-label); letter-spacing: .12em;
}

.flow { display: flex; flex-direction: column; }
.flow__row { display: flex; align-items: center; gap: 11px; }
.flow__icon {
  flex: 0 0 30px; height: 30px;
  border: 1px solid var(--color-divider);
  display: grid; place-items: center;
}
.flow__row--out .flow__icon { border-color: var(--color-accent-700); }
.flow__label { font: 11px var(--mono); color: var(--text-tag); }
.flow__row--out .flow__label { color: var(--color-accent-300); }
.flow__link { width: 1px; height: 14px; background: var(--color-divider); margin-left: 15px; }

.lb__result {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--color-divider);
  padding-top: 16px;
}
.lb__result-text { font-family: var(--font-heading); font-size: 19px; }

.lb__cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.lb__hint { font: 9.5px var(--mono); color: var(--text-faint); text-align: center; }

/* ==========================================================================
   Responsive — the portfolio is a desktop-first dashboard shell; below
   1000px the sidebar unpins and becomes a normal block above the content.
   ========================================================================== */

@media (max-width: 1180px) {
  .lb__body { grid-template-columns: 1fr; }
  .lb__aside { border-left: 0; border-top: 1px solid var(--color-divider); }
  .lb { padding: 20px; }
}

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--color-divider);
  }
  .pgrid { grid-template-columns: 1fr; }
  .sgrid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section, .section--overview, .section--contact { padding-left: 26px; padding-right: 26px; }
  .hero h1 { font-size: 40px; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .section h2, .projects__head h2, .contact__copy h2 { font-size: 27px; }
  .lb { padding: 0; }
  .lb__panel { max-height: 100vh; }
  .lb__head { flex-wrap: wrap; gap: 12px; }
  .well { height: 420px; }
}
