/* =========================================================
   style.css — layout details, components, motion
   (colours/fonts come from brand-theme.css tokens)
   ========================================================= */

:root {
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: .35s;
  --t-med: .6s;
  --radius: 14px;
}

html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(var(--jd-accent-rgb), .07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(var(--jd-accent-rgb), .05), transparent 60%);
  background-attachment: fixed;
}

/* ---------- First fold: profile + tabs ---------- */
.fold {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3.4vh, 44px);
  padding-top: clamp(24px, 6vh, 72px);
}

.hero-name {
  font-family: var(--jd-font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, min(7.2vw, 11vh), 6.2rem);
  line-height: 1;
  letter-spacing: -.025em;
  margin-bottom: clamp(10px, 1.8vh, 22px);
}
.hero-name em { font-style: normal; color: var(--jd-accent); font-weight: 300; }

.hero-intro {
  font-size: clamp(.95rem, min(1.25vw, 2.1vh), 1.15rem);
  line-height: 1.6;
  color: var(--jd-ink-soft);
  max-width: 38rem;
  margin-bottom: clamp(12px, 2.2vh, 26px);
}
.hero-intro strong { color: var(--jd-ink); font-weight: 600; }

.read-more {
  display: inline-flex; align-items: center; gap: .35em;
  font-weight: 600; color: var(--jd-accent); text-decoration: none;
  white-space: nowrap;
}
.read-more svg { transition: transform var(--t-fast) var(--ease); }
.read-more:hover svg, .read-more:focus-visible svg { transform: translateX(5px); }

.btn-resume {
  border-radius: 999px;
  padding: .55rem 1.9rem;
  border-width: 1.5px;
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}

.hero-photo {
  height: clamp(190px, 35vh, 360px);
  width: auto;
  max-width: 100%;
  aspect-ratio: 19 / 20;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 4px;
  box-shadow: 0 22px 40px -24px rgba(29, 24, 20, .45);
  outline: 1px solid var(--jd-line); outline-offset: 8px;
  margin-left: auto;
  display: block;
}

.btn-expand { gap: .9rem; padding: .78rem 1.35rem; }
.btn-outline-dark .when-open { display: none; }
.btn-outline-dark[aria-expanded="true"] .when-open { display: inline; }
.btn-outline-dark[aria-expanded="true"] .when-closed { display: none; }

/* ---------- Image tabs ---------- */
.chapter-tabs {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.3vw, 18px);
  border: 0;
  margin: 0; padding: 0; list-style: none;
}
.chapter-tabs .nav-item { min-width: 0; }

.tab-card {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(130px, 35vh, 230px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--jd-ink);
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.tab-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1);
  filter: grayscale(0) saturate(1.05);
  transition: transform .8s var(--ease), filter var(--t-med) var(--ease);
  z-index: -1;
}
.tab-card::after {               /* bottom gradient behind title */
  content: ""; position: absolute; inset: 40% 0 0 0;
  background: linear-gradient(to bottom, rgba(20,15,12,0) 0%, rgba(20,15,12,.82) 100%);
  z-index: 0;
}
.tab-title {
  position: absolute; left: 0; right: 0; bottom: clamp(12px, 2.2vh, 22px);
  z-index: 1;
  text-align: center;
  color: #fff;
  font-family: var(--jd-font-display);
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  letter-spacing: .01em;
}
.tab-title::after {              /* active underline */
  content: ""; display: block; height: 2px; width: 0;
  margin: 6px auto 0; background: #fff;
  transition: width var(--t-fast) var(--ease);
}

/* hover: gentle zoom */
.tab-card:hover img, .tab-card:focus-visible img { transform: scale(1.08); }
.tab-card:focus-visible { outline: 3px solid rgba(var(--jd-accent-rgb), .55); outline-offset: 3px; }

/* once a tab is chosen: others go B&W, active stays colourful */
.chapters-engaged .tab-card:not(.active) img { filter: grayscale(1) contrast(1.02); }
.chapters-engaged .tab-card:not(.active):hover img { filter: grayscale(.35); }
.tab-card.active { box-shadow: 0 14px 30px -14px rgba(var(--jd-accent-rgb), .7); transform: translateY(-3px); }
.tab-card.active .tab-title::after { width: 32px; }

/* ---------- Panels ---------- */
.panel-wrap {
  background: var(--jd-paper-2);
  border-radius: var(--radius);
  margin-top: clamp(14px, 2.2vh, 24px);
  position: relative;
  overflow: hidden;
}
.panel-hint {
  padding: 1.1rem 1.5rem;
  text-align: center;
  color: var(--jd-ink-soft);
  font-size: .95rem;
  transition: opacity var(--t-fast) var(--ease);
}
.chapters-engaged .panel-hint { display: none; }

.tab-content > .tab-pane { padding: clamp(24px, 4vw, 56px); }
/* smooth reveal (extends Bootstrap .fade) */
.tab-content > .tab-pane.fade { transition: opacity .5s var(--ease), transform .5s var(--ease); transform: translateY(14px); }
.tab-content > .tab-pane.fade.show { transform: none; }

.panel-kicker {
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--jd-accent); font-weight: 600; margin-bottom: .6rem;
}
.panel-title { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 400; line-height: 1.1; margin-bottom: 1rem; }
.panel-title em { font-style: normal; color: var(--jd-accent); }
.tab-pane h3 { font-size: 1.45rem; font-weight: 500; margin: 1.6rem 0 .8rem; }
.tab-pane p, .tab-pane li { line-height: 1.75; }
.tab-pane .lead-copy { font-size: 1.08rem; color: var(--jd-ink-soft); }

.pull-quote {
  font-family: var(--jd-font-display);
  font-style: normal; font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.4;
  border-left: 3px solid var(--jd-accent);
  padding: .2rem 0 .2rem 1.2rem;
  margin: 1.8rem 0;
}

.value-tile {
  height: 100%;
  padding: 1rem 1.1rem;
  background: var(--jd-paper);
  border-radius: 10px;
  border: 1px solid var(--jd-line);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.value-tile:hover { transform: translateY(-3px); border-color: rgba(var(--jd-accent-rgb), .45); }
.value-tile strong { display: block; font-size: .78rem; letter-spacing: .14em; color: var(--jd-accent); margin-bottom: .25rem; }
.value-tile.is-sentence strong { letter-spacing: 0; font-size: .95rem; }
.value-tile span { font-size: .93rem; color: var(--jd-ink-soft); line-height: 1.5; }

.stat { font-family: var(--jd-font-display); font-size: 2.6rem; line-height: 1; color: var(--jd-accent); }
.stat-label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--jd-ink-soft); }

.thumb-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb-strip img, .award-img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.thumb-strip a { display: block; overflow: hidden; border-radius: 8px; }
.thumb-strip a:hover img { transform: scale(1.06); }

.project-num { font-family: var(--jd-font-display); font-size: 3rem; color: rgba(var(--jd-accent-rgb), .35); line-height: 1; }
.project-card { background: var(--jd-paper); border-radius: 12px; padding: clamp(20px, 3vw, 36px); height: 100%; border: 1px solid var(--jd-line); }

.award-row {
  display: flex; gap: 14px; align-items: center;
  padding: .75rem; border-radius: 10px; background: var(--jd-paper);
  border: 1px solid var(--jd-line);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.award-row:hover { transform: translateX(4px); border-color: rgba(var(--jd-accent-rgb), .45); }
.award-row .award-img { width: 84px; flex: 0 0 84px; aspect-ratio: 1; }
.award-pos { font-weight: 700; color: var(--jd-accent); font-size: .9rem; }
.award-date { font-size: .82rem; color: var(--jd-ink-soft); }

.week-card { background: var(--jd-paper); border-radius: 12px; padding: 1.4rem; height: 100%; border: 1px solid var(--jd-line); }
.week-score { font-family: var(--jd-font-display); font-size: 2.2rem; color: var(--jd-accent); line-height: 1; }
.week-score small { font-size: 1rem; color: var(--jd-ink-soft); }

.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4em; align-items: center; }
.link-arrow svg { transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

.site-footer { color: var(--jd-ink-soft); font-size: .9rem; }

/* ---------- Load-in motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise .9s var(--ease) forwards; }
.reveal.d1 { animation-delay: .08s; } .reveal.d2 { animation-delay: .18s; }
.reveal.d3 { animation-delay: .28s; } .reveal.d4 { animation-delay: .4s; }
.chapter-tabs .nav-item { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; }
.chapter-tabs .nav-item:nth-child(1) { animation-delay: .45s; }
.chapter-tabs .nav-item:nth-child(2) { animation-delay: .52s; }
.chapter-tabs .nav-item:nth-child(3) { animation-delay: .59s; }
.chapter-tabs .nav-item:nth-child(4) { animation-delay: .66s; }
.chapter-tabs .nav-item:nth-child(5) { animation-delay: .73s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Modal (Read more) ---------- */
.modal-content { border: 0; border-radius: var(--radius); }
.modal-body { padding: clamp(22px, 4vw, 48px); }
.modal-body p { line-height: 1.8; }
.modal.fade .modal-dialog { transition: transform .45s var(--ease), opacity .45s var(--ease); }

/* ---------- Responsive ---------- */
/* Tablet portrait: photo column narrower, keeps fold */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-photo { height: clamp(200px, 35vh, 300px); }
  .tab-card { height: clamp(140px, 19vh, 210px); }
  .tab-title { font-size: 1.05rem; }
}
/* Short laptop screens (e.g. 1366×657 usable) */
@media (min-width: 992px) and (max-height: 760px) {
  .hero-photo { height: 30vh; }
/*  .tab-card { height: 21vh; }*/
  .hero-intro { line-height: 1.5; }
}
/* Phones: fold rule relaxed, tabs scroll sideways */
@media (max-width: 767.98px) {
  .fold { min-height: auto; }
  .hero-photo { margin: 0 0 .5rem; height: 190px; }
  .chapter-tabs {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
    scrollbar-width: none;
  }
  .chapter-tabs::-webkit-scrollbar { display: none; }
  .chapter-tabs .nav-item { scroll-snap-align: start; }
  .tab-card { height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .chapter-tabs .nav-item { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

#chapterPanels > .tab-pane {
    display: none;
}

#chapterPanels > .tab-pane.active.show {
    display: block;
}

#myStorySection[hidden],
#myJourneySection[hidden] {
    display: none !important;
}

/* Journey timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 1.45rem; top: .6rem; bottom: .6rem; width: 1px; background: var(--line-color); }
.timeline li { display: grid; grid-template-columns: 3rem 1fr; gap: 1.6rem; padding-bottom: 1.8rem; position: relative; }
.t-no {
  width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--bg-color); border: 1px solid #d7b9c1; color: var(--primary-color);
  font-family: var(--font-heading); font-size: 1.05rem;
  transition: background .5s var(--ease-smooth), color .5s var(--ease-smooth), transform .6s var(--ease-smooth);
}
.timeline li:hover .t-no { background: var(--primary-color); color: #fff; transform: scale(1.08); }
.timeline h3 { font-size: 1.5rem; margin: .55rem 0 .4rem; }
.timeline p { color: #4a3f44; max-width: 90ch; margin: 0; }


