/* ==========================================================================
   ORIGINAL SITE — warm ivory, charcoal, quiet neutrals and one olive accent.
   Content and behaviour come from concepts/shared (content.js + app.js);
   this file only sets the look. Change the palette and fonts here.
   ========================================================================== */
:root {
  --page: #f6f2e9;
  --ink: #1f1d1a;
  --body: #47423b;
  --muted: #857c70;
  --beige: #e6ded0;
  --taupe: #b9ad9f;
  --accent: #565c3c;
  --on-accent: #f6f2e9;
  --line: rgba(31, 29, 26, 0.15);
  --rule: var(--line);
  --radius: 4px;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --display: var(--serif);

  --pad: clamp(22px, 5vw, 84px);
  --max: 1400px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

html { scroll-padding-top: 96px; }
body { background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; }
h1, h2, h3, p, dd { font-weight: 400; }
::selection { background: var(--accent); color: var(--page); }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; }

/* ---------- shared type ---------- */
.label { font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hand { font-family: var(--hand); font-size: 23px; line-height: 1; color: var(--accent); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 7.6vw, 7.4rem); line-height: 0.94; letter-spacing: -0.02em; }
.display--sm { font-size: clamp(2.2rem, 4.4vw, 4rem); }
.display i, .wordmark i { font-style: italic; }   /* the shared base resets <i>; this site uses it for its italic accents */
.textlink { display: inline-flex; gap: 10px; align-items: baseline; font-size: 15px; padding-bottom: 4px; border-bottom: 1px solid var(--ink); transition: color 0.3s, border-color 0.3s, gap 0.4s var(--ease); }
.textlink:hover { color: var(--accent); border-color: var(--accent); gap: 16px; }
.edit { text-decoration-color: var(--taupe); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 22px var(--pad) 18px; background: rgba(246, 242, 233, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.top__name { font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1; white-space: nowrap; }
.nav { display: flex; gap: clamp(16px, 2.8vw, 44px); }
.nav a { color: var(--ink); padding-bottom: 4px; border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.nav a:hover { color: var(--accent); }
.nav a.active { border-color: var(--ink); }

/* ---------- hero: a warm welcome ---------- */
.hero { min-height: calc(100svh - 70px); max-width: var(--max); margin: 0 auto; padding: clamp(30px, 5vw, 70px) var(--pad) clamp(70px, 9vw, 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.wordmark { position: relative; margin-top: clamp(18px, 2.4vw, 34px); font-family: var(--serif); font-weight: 400; font-size: clamp(3.6rem, 12vw, 12rem); line-height: 0.9; letter-spacing: -0.03em; }
.wordmark i { font-style: italic; }
.bubble { position: absolute; right: -0.2em; top: -0.55em; padding: 0.42em 0.8em 0.5em; border: 1.5px solid var(--accent); border-radius: 50%; background: var(--page); font-size: clamp(20px, 2.6vw, 34px); letter-spacing: 0; transform: rotate(8deg); }
.bubble::after { content: ""; position: absolute; left: 22%; bottom: -0.36em; width: 0.6em; height: 0.6em; background: var(--page); border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: skewX(-28deg) rotate(-45deg); }
.star { position: absolute; left: -0.34em; bottom: 0.02em; width: 0.26em; height: 0.26em; fill: var(--accent); }
.js .bubble { animation: pop 0.7s 0.7s var(--ease) both; }
.js .star { animation: twirl 9s linear infinite; }
@keyframes pop { from { opacity: 0; transform: rotate(-4deg) scale(0.7); } }
@keyframes twirl { to { transform: rotate(360deg); } }
.hero__intro { margin: clamp(28px, 3.4vw, 48px) 0 28px; max-width: 46ch; font-size: clamp(16px, 1.3vw, 18.5px); color: var(--body); text-wrap: balance; }

/* ---------- sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(44px, 6vw, 90px) var(--pad) clamp(60px, 8vw, 120px); border-top: 1px solid var(--line); }
.section--page { border-top: 0; padding-top: clamp(40px, 7vw, 110px); min-height: 60svh; }
.section__head { margin-bottom: clamp(36px, 5vw, 72px); }
.section__head .display { margin-top: 14px; }
.section__head--row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.page-next { margin-top: clamp(40px, 5vw, 70px); display: flex; flex-wrap: wrap; gap: 14px 40px; }

/* ---------- work: an editorial, uneven grid ---------- */
.work { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(18px, 2.4vw, 40px); row-gap: clamp(60px, 8vw, 130px); }
.card { position: relative; display: block; }
.card:nth-child(1) { grid-column: 1 / span 7; --ar: 4 / 3; }
.card:nth-child(2) { grid-column: 9 / span 4; --ar: 4 / 5; margin-top: clamp(60px, 11vw, 180px); }
.card:nth-child(3) { grid-column: 2 / span 4; --ar: 4 / 5; }
.card:nth-child(4) { grid-column: 7 / span 6; --ar: 3 / 2; margin-top: clamp(40px, 7vw, 120px); }
.card:nth-child(5) { grid-column: 1 / span 6; --ar: 3 / 2; }
.card:nth-child(6) { grid-column: 8 / span 4; --ar: 4 / 5; margin-top: clamp(-80px, -5vw, -30px); }
.card-n { display: none; }
.card-media { position: relative; overflow: hidden; }
.card-media .cover { aspect-ratio: var(--ar); transition: transform 1.3s var(--ease); }
.card:hover .cover, .card:focus-visible .cover { transform: scale(1.04); }
.card-type { margin-top: 16px; display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.card-title { margin-top: 6px; font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.5rem); line-height: 1.05; transition: color 0.3s; }
.card-title::after { content: " →"; font-style: italic; opacity: 0; margin-left: 2px; transition: opacity 0.3s, margin 0.4s var(--ease); }
.card:hover .card-title, .card:focus-visible .card-title { font-style: italic; color: var(--accent); }
.card:hover .card-title::after, .card:focus-visible .card-title::after { opacity: 1; margin-left: 10px; }
.card-line { margin-top: 6px; font-size: 15px; color: var(--body); max-width: 44ch; }
.card-tags, .card-cta { display: none; }
/* drawn fallback for a project without an image */
.cover .cover-label { position: relative; margin: 6%; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1; }
.cover .cover-sub { display: none; }

/* ---------- placeholders and the portrait ---------- */
.ph { position: relative; background: var(--c, var(--beige)); aspect-ratio: var(--r, 4 / 5); display: grid; place-items: center; overflow: hidden; }
.ph span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(18px, 2.4vw, 40px); row-gap: clamp(36px, 5vw, 70px); align-items: start; }
/* left: hello + bio + details; right: the photo with fun facts in speech bubbles around it */
.about__quote { grid-column: 1 / span 6; }
.about__quote .about-hello { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 24px; }
.about__quote p { font-size: 17px; line-height: 1.65; color: var(--body); max-width: 58ch; }
.about__quote p + p { margin-top: 16px; }
.about__quote .about-cta { color: var(--ink); margin-top: 26px; }
.about__body { grid-column: 1 / span 6; color: var(--body); }
.about__photo { grid-column: 8 / span 4; grid-row: 1 / span 2; margin: 40px 0 0; }
.about__photo .ph { aspect-ratio: 4 / 5; transform: rotate(2deg); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.5); transition: transform 0.8s var(--ease); }
.about__photo:hover .ph { transform: rotate(0); }
.details { color: var(--ink); }
.details div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.details div:last-child { border-bottom: 1px solid var(--line); }
.about__sub { margin: clamp(30px, 4vw, 48px) 0 12px; }
.facts li { padding: 10px 0 10px 24px; border-top: 1px solid var(--line); font-size: 15px; position: relative; color: var(--ink); }
.facts li::before { content: "✳"; position: absolute; left: 0; color: var(--accent); }

/* ---------- experience + skills ---------- */
.xp-list { border-top: 1px solid var(--ink); }
.xp { border-top: 0; border-bottom: 1px solid var(--line); padding: clamp(22px, 2.6vw, 34px) 0; }
.xp-date { font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.xp-role { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.xp-desc { font-size: 15.5px; color: var(--body); max-width: 52ch; }
.skill-group h3 { font-style: italic; font-size: 1.7rem; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--page); padding: clamp(70px, 10vw, 150px) var(--pad) 28px; }
.contact .label { color: rgba(246, 242, 233, 0.6); }
.contact .display { margin-top: 18px; max-width: 12ch; }
.contact__links { margin-top: clamp(32px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 18px 46px; }
.contact .textlink { font-size: clamp(1rem, 1.5vw, 1.2rem); border-color: rgba(246, 242, 233, 0.5); }
.contact .textlink:hover { color: var(--page); border-color: var(--page); }
.foot { margin-top: clamp(64px, 9vw, 130px); display: flex; justify-content: space-between; gap: 16px; }
.foot a { color: var(--page); }

/* ---------- case study (structure from concepts/shared/kit.css; this is the look) ---------- */
[data-view="case"] { max-width: var(--max); padding-top: clamp(20px, 3vw, 40px); }
.case-back { font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.case-kicker { font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.case-head h1 { font-weight: 400; letter-spacing: -0.02em; }
.case-tag { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2.1rem); color: var(--body); }
.case-meta { border-bottom-color: var(--ink); }
.case-meta dt { font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.case-flag { font-family: var(--hand); font-size: 22px; transform: rotate(-1.5deg); display: inline-block; }
.case-sec h2 { font-weight: 400; }
.case-sec h2 span { font-family: var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: 0.16em; }
.lead { font-weight: 400; }
.kpis b { color: var(--accent); }
.case-next strong { font-weight: 400; }
.case-next:hover strong { font-style: italic; }
.mb-head h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .work { display: flex; flex-direction: column; gap: 56px; }
  .card { margin-top: 0 !important; --ar: 4 / 3 !important; }
  .card:nth-child(even) { width: 84%; align-self: flex-end; --ar: 4 / 5 !important; }
  .about__quote, .about__body { grid-column: 1 / -1; }
  .about__photo { grid-column: 1 / -1; grid-row: 2; max-width: 320px; margin-top: 0; }
  .about__body { grid-row: 3; }
}
@media (max-width: 520px) {
  /* name on its own line, menu underneath, so nothing runs off the edge */
  .top { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 16px 12px; }
  .top__name { font-size: 20px; }
  .nav { gap: 18px; }
  .nav.label { font-size: 10.5px; letter-spacing: 0.12em; }
  /* keep the bubble and star clear of the label above and the intro below */
  .wordmark { margin-top: 56px; }
  .bubble { right: -0.05em; top: -1.35em; font-size: 18px; }
  .star { left: -0.15em; top: -0.2em; bottom: auto; }
  .details div { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .js .bubble, .js .star { animation: none; }
}
