/* ---------- Tokens ---------- */
:root {
  --navy: #0d2545;
  --navy-dark: #081a33;
  --navy-mid: #14305a;
  --gold: #d4a437;
  --gold-soft: #e8c97a;
  --gold-rule: #d9b964;
  --paper: #ffffff;
  --ink: #1f2937;
  --ink-soft: #4b5563;
  --line: #e5e7eb;
  /* Responsive vars — overridden per breakpoint below */
  --sidebar-w: 300px;
  --main-pad-x: 56px;
  --main-pad-y: 56px;
  --text-max: 68ch;       /* readable text column cap */
  --project-min: 260px;   /* min project-card width before grid drops a col */
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--navy);
  color: #ffffff;
  padding: 40px 32px 48px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--navy-mid);
  border-radius: 3px;
}

.brand {
  display: block;
  border: 0;
  color: #ffffff;
}
.brand:hover {
  color: var(--gold-soft);
}

.brand-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0.5px;
}
.brand-name .last {
  color: var(--gold);
  display: block;
}

.brand-sub {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold-soft);
  text-transform: uppercase;
}

.brand-script {
  margin-top: 18px;
  font-family: "Snell Roundhand", "Brush Script MT", "Lucida Handwriting", cursive;
  font-style: italic;
  font-size: 28px;
  color: var(--gold-soft);
  line-height: 1.1;
}

.divider {
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  margin: 28px 0;
  border: 0;
}

.side-block {
  margin-bottom: 28px;
}

.side-label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}

.side-text {
  font-size: 14px;
  color: #e6ebf2;
  line-height: 1.6;
}

.side-icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.side-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav a {
  display: block;
  padding: 8px 10px;
  color: #e6ebf2;
  font-size: 14px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}
.nav a:hover {
  background: var(--navy-dark);
  color: var(--gold-soft);
}
.nav a.active {
  border-left-color: var(--gold);
  color: var(--gold);
  background: var(--navy-dark);
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: #e6ebf2;
}
.checklist li::before {
  content: "✓ ";
  color: var(--gold);
  margin-right: 4px;
  font-weight: 700;
}

/* ---------- Main ---------- */
.main {
  padding: var(--main-pad-y) var(--main-pad-x);
  padding-bottom: calc(var(--main-pad-y) + 24px);
  min-width: 0; /* allow grid child to shrink */
}

.page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  margin-bottom: 36px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-lede {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 60ch;
}

.page-stamp {
  font-family: "Snell Roundhand", "Brush Script MT", cursive;
  font-style: italic;
  font-size: 26px;
  color: var(--navy);
  text-align: right;
  line-height: 1.1;
}
.page-stamp small {
  display: block;
  font-family: -apple-system, sans-serif;
  font-style: normal;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 1px;
  margin-top: 6px;
}

/* Section header with numbered "01 OBJECTIVE" treatment */
.section {
  margin-top: 44px;
}
.section:first-of-type {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.section-num {
  color: var(--gold);
  font-weight: 800;
  font-size: 22px;
}
.section-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.section-rule {
  height: 2px;
  background: var(--gold-rule);
  border: 0;
  margin: 0 0 20px;
  opacity: 0.65;
}

/* ---------- Home page bits ---------- */
.objective {
  font-size: 16px;
  color: var(--ink);
  max-width: var(--text-max);
}

.page-lede {
  max-width: var(--text-max);
}

.strengths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px 24px;
  font-size: 14.5px;
  max-width: 1100px;
}
.strengths li::before {
  content: "✓ ";
  color: var(--gold);
  font-weight: 700;
  margin-right: 4px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}
.fact-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.fact-value {
  font-size: 15px;
  color: var(--ink);
}

/* ---------- Experience timeline ---------- */
.role {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}
.role:last-child {
  border-bottom: 0;
}

.role-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
  padding-top: 2px;
}

.role-body h3 {
  margin: 0 0 2px;
  font-size: 17px;
  color: var(--navy);
  font-weight: 800;
}

.role-company {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.role-body p {
  margin: 0 0 10px;
  color: var(--ink);
}

.role-body ul.bullets {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 10px;
  color: var(--ink);
}
.role-body ul.bullets li {
  margin-bottom: 4px;
}

.role-leave {
  font-style: italic;
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 14px;
}

.role-clients {
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- Projects grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--project-min), 1fr));
  gap: 18px;
}

.project {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.project:hover {
  box-shadow: 0 6px 16px rgba(13, 37, 69, 0.08);
  transform: translateY(-1px);
}

.project-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.project-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
}

.project-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
}

.project-desc {
  font-size: 14px;
  color: var(--ink);
  margin: 0;
}

.value-badge {
  align-self: flex-start;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--gold-rule);
  border-radius: 4px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  background: #fffaee;
}
.value-badge.marquee {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.value-badge .star {
  color: var(--navy);
}

/* ---------- Credentials cards ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.cert-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: #ffffff;
}
.cert-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--navy);
  font-weight: 800;
}
.cert-card .cert-issuer {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.cert-card p {
  margin: 2px 0;
  font-size: 14px;
  color: var(--ink);
}

.award {
  border-left: 3px solid var(--gold);
  padding: 12px 18px;
  background: #fffaee;
  border-radius: 4px;
}
.award h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 16px;
}
.award p {
  margin: 0;
  color: var(--ink);
}
.award strong {
  color: var(--navy);
}

/* ---------- Photo slot + gallery ---------- */
.project-photo-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.project-photo-slot.is-empty::after {
  content: "📷";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  opacity: 0.25;
}
.project-photo-slot.is-clickable {
  cursor: pointer;
}
.project-photo-slot .project-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.project-photo-slot.is-clickable:hover .project-photo {
  transform: scale(1.03);
}

.more-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(13, 37, 69, 0.85);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

/* ---------- Lightbox ---------- */
body.lightbox-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.lightbox.is-open {
  opacity: 1;
}
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
}
.lightbox-img {
  max-width: min(92vw, 1600px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-align: center;
  max-width: 80vw;
}
.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.lightbox-btn:hover {
  background: rgba(212, 164, 55, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 24px;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-prev {
  left: 18px;
}
.lightbox-next {
  right: 18px;
}
@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 18px;
    transform: none;
  }
  .lightbox-prev {
    left: 24px;
  }
  .lightbox-next {
    right: 24px;
  }
  .lightbox-img {
    max-height: 70vh;
  }
}

/* ---------- Utility ---------- */
.muted {
  color: var(--ink-soft);
}
.spacer-lg {
  height: 24px;
}

/* ---------- Responsive ladder ----------
   Default (above) is tuned for ~1024–1440px desktops.
   Each breakpoint below adjusts the responsive vars or layout.        */

/* Large desktop — a bit more breathing room */
@media (min-width: 1280px) {
  :root {
    --sidebar-w: 320px;
    --main-pad-x: 72px;
    --project-min: 280px;
  }
}

/* Wide desktop — bigger sidebar, more padding */
@media (min-width: 1600px) {
  :root {
    --sidebar-w: 360px;
    --main-pad-x: 96px;
    --main-pad-y: 72px;
    --project-min: 300px;
  }
  .page-title {
    font-size: 32px;
  }
  body {
    font-size: 17px;
  }
}

/* Ultrawide — keep text readable but let cards spread */
@media (min-width: 2000px) {
  :root {
    --sidebar-w: 400px;
    --main-pad-x: 120px;
    --main-pad-y: 88px;
    --text-max: 78ch;
    --project-min: 320px;
  }
}

/* Tablet landscape — slightly tighter sidebar, less padding */
@media (max-width: 1100px) {
  :root {
    --sidebar-w: 270px;
    --main-pad-x: 40px;
    --main-pad-y: 44px;
  }
}

/* Tablet portrait & below — collapse sidebar into a compact header band */
@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 24px 28px 26px;
  }
  .brand-name {
    font-size: 26px;
  }
  .sidebar .divider {
    margin: 18px 0;
  }
  .side-block {
    margin-bottom: 16px;
  }
  /* Nav becomes a horizontal row of pills */
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .nav a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 4px;
    padding: 6px 12px;
    background: var(--navy-dark);
  }
  .nav a.active {
    border-left: 0;
    border-bottom-color: var(--gold);
  }
  /* Group meta blocks (location, languages, education) into a wrap row */
  .sidebar > .side-block:nth-of-type(n + 3) {
    display: inline-block;
    width: auto;
    min-width: 160px;
    margin-right: 24px;
    margin-bottom: 8px;
    vertical-align: top;
  }
  .main {
    padding: 36px 28px 56px;
  }
  .page-header {
    grid-template-columns: 1fr;
  }
  .page-stamp {
    text-align: left;
  }
}

/* Large mobile — projects start to feel tight, switch to single column */
@media (max-width: 640px) {
  :root {
    --project-min: 100%;
  }
  .role {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .role-date {
    color: var(--gold);
  }
  .strengths {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 16px;
  }
}

/* Small mobile — tighten everything */
@media (max-width: 480px) {
  .main {
    padding: 28px 20px 48px;
  }
  .sidebar {
    padding: 22px 20px 18px;
  }
  .page-title {
    font-size: 20px;
    line-height: 1.25;
  }
  .page-lede {
    font-size: 14px;
  }
  .section-title,
  .section-num {
    font-size: 17px;
  }
  .brand-name {
    font-size: 20px;
  }
  .strengths {
    grid-template-columns: 1fr;
  }
  .nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* Tiny screens (e.g. iPhone SE width) — squeeze last bit of padding */
@media (max-width: 360px) {
  .main {
    padding: 24px 16px 40px;
  }
  .sidebar {
    padding: 18px 16px 14px;
  }
  .page-title {
    font-size: 18px;
  }
}
