/* ============================================================
   Lucas Jamali — Portfolio
   Editorial, text-led, restrained.
   ============================================================ */

/* -------- Tokens -------- */
:root {
  /* Colour — paper / ink */
  --paper:        #F7F5F0;
  --paper-alt:    #FFFFFF;
  --paper-deep:   #EFECE5;
  --ink:          #161513;
  --ink-soft:     #2B2823;
  --muted:        #6B655D;
  --muted-soft:   #908A82;
  --hairline:     #E4DFD5;
  --hairline-strong: #D6D0C3;
  --accent:       #9C4B2C;          /* warm terracotta, used sparingly */
  --accent-soft:  #C36A47;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --container:    1120px;
  --container-narrow: 760px;
  --gutter:       clamp(20px, 4vw, 40px);
  --section-y:    clamp(80px, 12vw, 140px);

  /* Motion */
  --ease:         cubic-bezier(.2, .7, .2, 1);
}

/* Dark theme tokens — applied via system preference OR manual override.
   `:root[data-theme="light"]` (set further down) wins via specificity when
   the user explicitly chooses light. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #14130F;
    --paper-alt:    #1B1A16;
    --paper-deep:   #100F0C;
    --ink:          #F2EEE5;
    --ink-soft:     #DDD8CD;
    --muted:        #95908A;
    --muted-soft:   #6E6962;
    --hairline:     #2A2823;
    --hairline-strong: #383530;
    --accent:       #E08766;
    --accent-soft:  #C36A47;
  }
}

:root[data-theme="dark"] {
  --paper:        #14130F;
  --paper-alt:    #1B1A16;
  --paper-deep:   #100F0C;
  --ink:          #F2EEE5;
  --ink-soft:     #DDD8CD;
  --muted:        #95908A;
  --muted-soft:   #6E6962;
  --hairline:     #2A2823;
  --hairline-strong: #383530;
  --accent:       #E08766;
  --accent-soft:  #C36A47;
}

:root[data-theme="light"] {
  --paper:        #F7F5F0;
  --paper-alt:    #FFFFFF;
  --paper-deep:   #EFECE5;
  --ink:          #161513;
  --ink-soft:     #2B2823;
  --muted:        #6B655D;
  --muted-soft:   #908A82;
  --hairline:     #E4DFD5;
  --hairline-strong: #D6D0C3;
  --accent:       #9C4B2C;
  --accent-soft:  #C36A47;
}

/* -------- Reset / base -------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s var(--ease), opacity .25s var(--ease);
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* Visible only on keyboard focus */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -------- Layout primitives -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
  scroll-margin-top: 80px;     /* keep section header clear of sticky nav */
}

#top { scroll-margin-top: 0; }

.section + .section {
  border-top: 1px solid var(--hairline);
}

.section--about     { background: var(--paper-alt); }
.section--toolkit   { background: var(--paper-alt); }
.section--contact   { background: var(--paper); }

@media (prefers-color-scheme: dark) {
  .section--about, .section--toolkit { background: var(--paper-alt); }
}

/* -------- Section heads -------- */
.section__head {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__num {
  color: var(--accent);
  font-weight: 500;
}

.section__label::before {
  content: "—";
  color: var(--muted-soft);
  margin-right: 10px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 0 56px;
}

.section__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 350;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--hairline);
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ---- Wordmark (brand) ---- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  line-height: 1;
}

.wordmark__mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  border-radius: 7px;
  letter-spacing: -0.04em;
  padding-bottom: 2px;          /* optical centring of italic glyphs */
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform .35s var(--ease), background .35s var(--ease);
}

.wordmark:hover .wordmark__mark {
  transform: rotate(-4deg);
  background: var(--ink);
}

.wordmark__mark--sm {
  width: 26px;
  height: 26px;
  font-size: 14px;
  border-radius: 6px;
}

.wordmark__name {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 14, "SOFT" 30;
}

.wordmark__first {
  font-weight: 350;
  font-style: normal;
}

.wordmark__last {
  font-weight: 400;
  font-style: normal;
  margin-left: 0.32em;
  color: var(--ink);
}

.wordmark__dot {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
  margin-left: 1px;
  transition: color .35s var(--ease);
}

.wordmark:hover .wordmark__dot { color: var(--ink); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-soft);
}

.nav__links a {
  position: relative;
  padding: 6px 0;
}

.nav__links a:not(.nav__cta):hover { color: var(--accent); }

.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }

.nav__cta {
  padding: 8px 16px !important;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  transition: all .25s var(--ease);
}
.nav__cta:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ---- Nav tools (theme toggle + mobile menu button) ---- */
.nav__tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.theme-toggle:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle__icon {
  position: absolute;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}

/* Light theme (default) shows the moon (offer to switch to dark) */
.theme-toggle__icon--moon { opacity: 1; transform: rotate(0); }
.theme-toggle__icon--sun  { opacity: 0; transform: rotate(-90deg); }

/* Dark theme (system or manual) shows the sun (offer to switch to light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg); }
  :root:not([data-theme="light"]) .theme-toggle__icon--sun  { opacity: 1; transform: rotate(0); }
}
:root[data-theme="dark"] .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg); }
:root[data-theme="dark"] .theme-toggle__icon--sun  { opacity: 1; transform: rotate(0); }

.nav__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.nav__menu-btn span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__menu-btn { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--hairline);
    font-size: 16px;
  }
  .nav__links a:last-child { border-bottom: none; }
  .nav__cta {
    align-self: flex-start;
    margin-top: 12px;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;                       /* mobile-safe viewport unit */
  padding-top: clamp(120px, 16vh, 200px);
  padding-bottom: clamp(80px, 10vh, 140px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero > .container { width: 100%; }

.hero::before {
  /* Soft "paper grain" — extremely subtle */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 80% 10%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 90%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 70%);
  pointer-events: none;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper-alt) 70%, transparent);
  margin-bottom: 36px;
}

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
  50%      { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 6%, transparent); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(40px, 7.4vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 14ch;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 320;
}

.hero__lead {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 64px;
  font-weight: 400;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  max-width: 880px;
}

.hero__meta > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .hero__meta {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ---- Scroll cue (bottom of hero) ---- */
.scroll-cue {
  position: absolute;
  bottom: clamp(28px, 4vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  z-index: 2;
  transition: color .3s var(--ease), transform .35s var(--ease);
}

.scroll-cue:hover { color: var(--accent); transform: translate(-50%, -2px); }
.scroll-cue:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.scroll-cue__line {
  position: relative;
  display: block;
  width: 1px;
  height: 44px;
  background: var(--hairline-strong);
  overflow: hidden;
}

.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  transform: translateY(-100%);
  animation: scroll-cue-drip 2.4s var(--ease) infinite;
}

@keyframes scroll-cue-drip {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line::after { animation: none; transform: none; opacity: .6; }
}

/* Hide on shorter screens where it would overlap content */
@media (max-height: 640px) {
  .scroll-cue { display: none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about__copy p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 60ch;
}
.about__copy p:last-child { margin-bottom: 0; }

.about__rail {
  position: sticky;
  top: 96px;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.about__rail dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.about__rail dl > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about__rail dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.about__rail dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}

/* "Currently" row — quietly highlighted as a live dateline */
.about__rail-now {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
}
.about__rail-now::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.about__rail-now dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.about__rail-now dt::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.about__rail-now dd {
  font-style: italic;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 350;
  line-height: 1.5;
  color: var(--ink);
}

@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__rail { position: static; }
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.timeline__item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
  position: relative;
}
.timeline__item:last-child { border-bottom: 1px solid var(--hairline); }

.timeline__years {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  padding-top: 6px;
  position: sticky;
  top: 96px;
  align-self: start;
  height: max-content;
}
.timeline__years .muted { color: var(--muted); font-size: 12px; }

.timeline__card header {
  margin-bottom: 14px;
}

.timeline__card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 4px;
}

.timeline__company {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.timeline__summary {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 68ch;
  margin: 0 0 18px;
}

.timeline__bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 70ch;
}

.timeline__bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.timeline__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.timeline__card--soft .timeline__summary { color: var(--muted); }

@media (max-width: 720px) {
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .timeline__years {
    position: static;
    flex-direction: row;
    gap: 8px;
    padding-top: 0;
  }
}

/* ============================================================
   APPROACH / PRINCIPLES
   ============================================================ */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}

.principle {
  background: var(--paper);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background .3s var(--ease);
}
.principle:hover { background: var(--paper-deep); }

.principle__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--accent);
  letter-spacing: .02em;
}

.principle h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.principle p {
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 720px) {
  .principles { grid-template-columns: 1fr; }
}

/* ============================================================
   SELECTED WORK
   ============================================================ */
.work {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.work__item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(28px, 5vw, 64px);
  padding: 44px 0;
  border-top: 1px solid var(--hairline);
}
.work__item:last-child { border-bottom: 1px solid var(--hairline); }

.work__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  position: sticky;
  top: 96px;
  align-self: start;
  height: max-content;
}

.work__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.work__type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.work__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.22;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 14px;
}

.work__lead {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 68ch;
  margin: 0 0 22px;
}

.work__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work__tags li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  padding: 6px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper-alt) 60%, transparent);
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.work__tags li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 720px) {
  .work__item { grid-template-columns: 1fr; gap: 16px; }
  .work__meta { position: static; flex-direction: row; gap: 14px; align-items: center; padding-top: 0; }
}

/* ============================================================
   TOOLKIT
   ============================================================ */
.toolkit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.toolkit__group h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}

.toolkit__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolkit__group li {
  font-size: 16px;
  color: var(--ink);
  font-weight: 400;
}

@media (max-width: 880px) { .toolkit { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .toolkit { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact {
  text-align: left;
}

.contact__title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 28px;
  max-width: 18ch;
}
.contact__title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 350;
}

.contact__lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 44px;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  cursor: pointer;
  font-family: inherit;
}

.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0;
  background: var(--paper);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__brand .wordmark__name {
  font-size: 16px;
}

.footer__meta {
  display: flex;
  gap: 18px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

@media (max-width: 540px) {
  .footer__meta { flex-direction: column; gap: 6px; }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   PRINT — clean one-pager output
   ============================================================ */
@media print {
  :root {
    --paper:        #FFFFFF;
    --paper-alt:    #FFFFFF;
    --paper-deep:   #FFFFFF;
    --ink:          #000000;
    --ink-soft:     #1A1A1A;
    --muted:        #555555;
    --muted-soft:   #777777;
    --hairline:     #CCCCCC;
    --hairline-strong: #999999;
    --accent:       #8A3F22;
  }

  html, body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.45;
  }

  /* Hide chrome that doesn't belong on paper */
  .nav,
  .skip-link,
  .footer,
  .nav__menu-btn,
  .theme-toggle,
  .nav__tools { display: none !important; }

  /* Force-show animated elements */
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .dot { display: none !important; }

  /* Tighter section spacing for paper */
  .section { padding: 24pt 0; border-top: 1px solid var(--hairline) !important; break-inside: avoid; }
  .hero { padding: 18pt 0 24pt; }
  .container { max-width: 100% !important; padding: 0 !important; }

  /* Headline scaling for print */
  .hero__title { font-size: 26pt; line-height: 1.15; max-width: 100%; }
  .hero__lead  { font-size: 11pt; max-width: 100%; }
  .section__title { font-size: 16pt; max-width: 100%; margin-bottom: 14pt; }
  .contact__title { font-size: 18pt; }
  .work__title, .timeline__card h3 { font-size: 13pt; }

  /* Background flushes & consistent borders */
  .section--about, .section--toolkit, .section--contact { background: #FFFFFF !important; }

  /* Add the URL after every link except internal anchors */
  a[href^="http"]:after,
  a[href^="mailto:"]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: var(--muted);
    word-break: break-all;
  }
  a[href^="#"]:after { content: ""; }

  /* Don't break in awkward places */
  .timeline__item, .work__item, .principle, .toolkit__group { break-inside: avoid; page-break-inside: avoid; }

  /* Hairlines through cards */
  .principles { border: 1px solid var(--hairline) !important; }
  .principle { background: #FFFFFF !important; }

  /* Strip button chrome so contact links print cleanly */
  .btn,
  .btn--primary,
  .btn--ghost {
    background: transparent !important;
    border: none !important;
    color: #000 !important;
    padding: 2pt 0 !important;
    text-decoration: underline;
  }
  .btn svg { display: none !important; }
  .work__tags li {
    background: transparent !important;
    border: 1px solid var(--hairline) !important;
    color: #000 !important;
  }

  /* Footer-style print signature line at the bottom of the document */
  body::after {
    content: "Lucas Jamali — hello@lucas.ws — linkedin.com/in/lucasjamali";
    display: block;
    margin-top: 20pt;
    padding-top: 10pt;
    border-top: 1px solid var(--hairline);
    font-size: 9pt;
    color: var(--muted);
    text-align: center;
    font-family: var(--font-mono);
  }
}
