/* ==========================================================================
   jadler.info — executive portfolio
   Ported faithfully from the Claude Design export (Jake Adler.dc.html):
   Inter (UI) + Newsreader (display serif) + monospace kickers,
   hairline editorial layout, dark default + warm-cream light theme.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-var-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-italic-var-latin.woff2") format("woff2");
}

* { box-sizing: border-box; }

:root {
  --bg: #0d0d0f;
  --bg-soft: #111114;
  --panel: rgba(255, 255, 255, .025);
  --panel-2: rgba(255, 255, 255, .045);
  --chip: rgba(255, 255, 255, .035);
  --text: #ececee;
  --text2: #c4c4cc;
  --muted: #8c8c95;
  --hairline: rgba(255, 255, 255, .10);
  --hairline-soft: rgba(255, 255, 255, .06);
  --accent: #7d6cff;
  --accent-quiet: #8f86ff;
  --on-accent: #fff;
  --nav: rgba(13, 13, 15, .72);
  --shadow: 0 30px 70px -34px rgba(0, 0, 0, .7);
  --serif: "Newsreader", Georgia, serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg: #f4f3ef;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --chip: #f0efe9;
  --text: #18181b;
  --text2: #3d3d44;
  --muted: #6c6c74;
  --hairline: rgba(0, 0, 0, .13);
  --hairline-soft: rgba(0, 0, 0, .075);
  --accent: #5a45e0;
  --accent-quiet: #5a45e0;
  --on-accent: #fff;
  --nav: rgba(244, 243, 239, .78);
  --shadow: 0 26px 60px -34px rgba(0, 0, 0, .28);
}

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a { color: inherit; }
input, textarea, button { font-family: inherit; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: 1180px; margin: 0 auto; padding-left: clamp(20px, 5vw, 40px); padding-right: clamp(20px, 5vw, 40px); }
.container-narrow { max-width: 1000px; margin: 0 auto; padding-left: clamp(20px, 5vw, 40px); padding-right: clamp(20px, 5vw, 40px); }

/* ------------------------------- motion -------------------------------- */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

@keyframes drift { 0% { transform: translate(0, 0); } 50% { transform: translate(3%, -4%); } 100% { transform: translate(0, 0); } }
@keyframes floaty { 0% { transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0); } }
@keyframes typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) { [data-collapse] { grid-template-columns: 1fr !important; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  * { animation: none !important; }
}

@media print {
  [data-noprint] { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
}

/* -------------------------------- nav ---------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hairline-soft);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 15px clamp(20px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 27px; height: 27px; display: block; }
.brand span { font-weight: 600; font-size: 15px; letter-spacing: .03em; color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.nav-links { display: flex; align-items: center; gap: 26px; }

.nav-links a {
  font-size: 14px;
  padding: 5px 1px;
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }

.theme-switch {
  width: 48px;
  height: 26px;
  border-radius: 20px;
  background: var(--chip);
  border: 1px solid var(--hairline);
  position: relative;
  cursor: pointer;
  padding: 0;
  flex: none;
}

.theme-switch .knob {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  transition: all .25s;
}

[data-theme="light"] .theme-switch .knob { right: auto; left: 2px; background: var(--accent); }

@media (max-width: 640px) { .nav-links { gap: 16px; } .nav-right { gap: 16px; } }

/* ------------------------------ buttons -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.btn-invert { background: var(--text); color: var(--bg); }
.btn-outline { background: transparent; color: var(--text); font-weight: 500; border: 1px solid var(--hairline); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 14px 34px -12px var(--accent); }
.btn .dim { opacity: .6; }
.btn-sm { padding: 12px 20px; font-size: 14px; font-weight: 500; white-space: nowrap; }

/* ------------------------------- kicker -------------------------------- */

.kicker { display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.kicker span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.mono-label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.serif { font-family: var(--serif); font-weight: 400; }

/* -------------------------------- hero --------------------------------- */

.hero-section { position: relative; overflow: hidden; border-bottom: 1px solid var(--hairline-soft); }

.orb {
  position: absolute;
  top: -120px;
  right: 8%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 108, 255, .12), transparent 66%);
  filter: blur(30px);
  animation: drift 22s ease-in-out infinite;
  pointer-events: none;
}

.hero-pad { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(48px, 6vw, 72px); }

.hero-grid { display: grid; grid-template-columns: 1.05fr .8fr; gap: clamp(40px, 5vw, 64px); align-items: center; }

.hero-copy { max-width: 620px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 100px;
  background: var(--chip);
  border: 1px solid var(--hairline);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 26px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(125, 108, 255, .2); }

.hero-tagline { font-size: 14px; color: var(--muted); margin: 0 0 18px; letter-spacing: .01em; }

h1.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.06;
  letter-spacing: -.014em;
  margin: 0 0 26px;
  color: var(--text);
}
h1.display .amp { font-style: italic; color: var(--text2); }

.hero-lede { font-size: 16.5px; line-height: 1.72; color: var(--text2); margin: 0 0 34px; max-width: 560px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.photo-float { position: relative; animation: floaty 8s ease-in-out infinite; }

.photo-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.photo-card img { display: block; width: 100%; height: auto; }
.photo-card .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 52%, rgba(13, 13, 15, .82)); }
.photo-card .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px; display: flex; justify-content: space-between; align-items: flex-end; }
.photo-card .caption .name { font-family: var(--serif); font-size: 20px; color: #fff; }
.photo-card .caption .role { font-size: 12px; color: #c8c8d0; margin-top: 2px; }
.photo-card .caption .initials { font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, .55); letter-spacing: .18em; }

/* ------------------------------ stat strip ------------------------------ */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(44px, 5vw, 64px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.stat-cell { padding: 26px 26px 26px 0; border-right: 1px solid var(--hairline-soft); }
.stat-cell:last-child { border-right: 0; }
.stat-num { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4vw, 42px); color: var(--text); line-height: 1; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ----------------------------- section heads ---------------------------- */

.section-pad { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(48px, 6vw, 80px); }

h2.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.012em;
  color: var(--text);
  margin: 0;
}

h1.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.04;
  letter-spacing: -.015em;
  color: var(--text);
  margin: 0 0 18px;
}

.page-lede { font-size: 17px; line-height: 1.7; color: var(--text2); margin: 0; }

/* ------------------------------ quick facts ----------------------------- */

.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.fact-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hairline-soft); align-items: flex-start; }
.fact-num { font-family: var(--mono); font-size: 12px; color: var(--accent-quiet); padding-top: 2px; }
.fact-text { font-size: 15.5px; line-height: 1.55; color: var(--text2); text-wrap: pretty; }

/* ------------------------------ project cards --------------------------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }

.project-card {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color .2s;
}
.project-card:hover { border-color: var(--accent); }

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, var(--panel) 0 13px, var(--panel-2) 13px 26px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.card-media > img, .card-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-media .shot-note { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; letter-spacing: .04em; line-height: 1.5; }
.card-media.has-img .shot-note { display: none; }

.media-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-quiet);
  background: var(--bg);
  padding: 5px 9px;
  border-radius: 5px;
  border: 1px solid var(--hairline);
  z-index: 1;
}

.card-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.16; color: var(--text); margin: 0 0 12px; }
.card-copy { font-size: 14px; line-height: 1.62; color: var(--muted); margin: 0 0 18px; flex: 1; }

.card-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 16px; border-top: 1px solid var(--hairline-soft); }
.card-metrics .v { font-family: var(--serif); font-weight: 500; font-size: 19px; color: var(--text); }
.card-metrics .l { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.3; }

.card-go { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--accent-quiet); }

/* ----------------------------- column strips ---------------------------- */

.cols-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: 1px solid var(--hairline); }
.col-group { padding: 28px 24px 30px 0; border-right: 1px solid var(--hairline-soft); }
.col-group:last-child { border-right: 0; }
.col-title { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-quiet); margin-bottom: 18px; }
.col-item { font-size: 14.5px; color: var(--text2); padding: 8px 0; border-bottom: 1px solid var(--hairline-soft); }

/* -------------------------------- CTA band ------------------------------ */

.cta-band { border-top: 1px solid var(--hairline-soft); }
.cta-band-inner { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.14; color: var(--text); margin: 0; max-width: 640px; }

/* ------------------------------ detail pages ---------------------------- */

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; margin-bottom: 34px; text-decoration: none; }

.tag-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-quiet); margin-bottom: 16px; }

.detail-lede { font-size: 18px; line-height: 1.68; color: var(--text2); margin: 0 0 36px; max-width: 760px; }

.detail-media {
  position: relative;
  aspect-ratio: 16 / 8;
  background: repeating-linear-gradient(135deg, var(--panel) 0 15px, var(--panel-2) 15px 30px);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 56px;
  overflow: hidden;
}
.detail-media > img, .detail-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.detail-media.is-embed { aspect-ratio: 16 / 9; }
.detail-media > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.detail-media .shot-note { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.detail-media.has-img .shot-note { display: none; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; }

.overview-text { font-size: 16px; line-height: 1.75; color: var(--text2); margin: 0; }

.outcome-list { border-top: 1px solid var(--hairline); }
.outcome-row { display: flex; align-items: baseline; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--hairline-soft); }
.outcome-row .v { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--text); min-width: 76px; }
.outcome-row .l { font-size: 14px; color: var(--muted); line-height: 1.4; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 15px; border-radius: 100px; border: 1px solid var(--hairline); background: var(--chip); color: var(--text2); font-size: 13.5px; }

.hl-list { border-top: 1px solid var(--hairline); }
.hl-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hairline-soft); align-items: flex-start; }
.hl-row .star { color: var(--accent-quiet); font-size: 15px; padding-top: 1px; }
.hl-row .t { font-size: 15.5px; line-height: 1.55; color: var(--text2); }

/* -------------------------------- resume -------------------------------- */

.timeline { position: relative; padding-left: 34px; border-left: 1px solid var(--hairline); }

.tl-entry { position: relative; margin-bottom: 52px; }
.tl-entry:last-child { margin-bottom: 0; }

.tl-dot { position: absolute; left: -42px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px var(--bg); }
.tl-dot.current { background: var(--accent); }

.tl-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.tl-head h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--text); margin: 0; }
.tl-dates { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-org { font-size: 14.5px; color: var(--accent-quiet); margin-bottom: 8px; }
.tl-meta { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.tl-bullets { display: flex; flex-direction: column; gap: 13px; }
.tl-bullet { display: flex; gap: 13px; align-items: flex-start; }
.tl-bullet .dash { color: var(--accent-quiet); padding-top: 2px; }
.tl-bullet.past .dash { color: var(--muted); }
.tl-bullet .t { font-size: 15px; line-height: 1.6; color: var(--text2); }

/* -------------------------------- about --------------------------------- */

.about-grid { display: grid; grid-template-columns: .72fr 1fr; gap: clamp(36px, 5vw, 56px); align-items: start; }
.about-grid .scrim-soft { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(13, 13, 15, .7)); }

h2.about-hi { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.1; color: var(--text); margin: 0 0 22px; }
.about-para { font-size: 16px; line-height: 1.76; color: var(--text2); margin: 0 0 20px; }

.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-card { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 26px 26px 28px; }
.panel-card h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--text); margin: 0 0 12px; }
.panel-card p { font-size: 14.5px; line-height: 1.66; color: var(--muted); margin: 0; }

.num-list { border-top: 1px solid var(--hairline); }
.num-row { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--hairline-soft); align-items: flex-start; }
.num-row .n { font-family: var(--mono); font-size: 12px; color: var(--accent-quiet); padding-top: 3px; }
.num-row .t { font-size: 16px; line-height: 1.6; color: var(--text2); text-wrap: pretty; }

/* ------------------------------- contact -------------------------------- */

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 4vw, 44px); align-items: start; }

.info-stack { display: flex; flex-direction: column; gap: 20px; }

.info-panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 26px; }
.info-panel .mono-label { margin-bottom: 20px; letter-spacing: .12em; }

.info-field { margin-bottom: 16px; }
.info-field:last-child { margin-bottom: 0; }
.info-field .k { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.info-field .v, .info-field a { font-size: 15px; color: var(--text); text-decoration: none; }

.connect-link { display: flex; align-items: center; justify-content: space-between; font-size: 15px; color: var(--text); text-decoration: none; padding: 10px 14px; border: 1px solid var(--hairline); border-radius: 8px; }
.connect-link .arr { opacity: .5; }

.avail-main { font-size: 14.5px; line-height: 1.66; color: var(--text2); margin: 0 0 12px; }
.avail-sub { font-size: 14.5px; line-height: 1.66; color: var(--muted); margin: 0; }

.form-panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: clamp(26px, 3vw, 36px); }

.form-panel .field-label { display: block; font-size: 12.5px; color: var(--text2); margin-bottom: 8px; }
.form-panel input, .form-panel textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
}
.form-panel textarea { resize: vertical; line-height: 1.5; }
.form-panel input:focus, .form-panel textarea:focus { border-color: var(--accent); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-field { display: block; margin-bottom: 18px; }
.form-field.last { margin-bottom: 24px; }

.btn-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 14px 34px -14px var(--accent);
}

.form-note { text-align: center; font-size: 12.5px; color: var(--muted); margin: 16px 0 0; }
.form-error { text-align: center; font-size: 13px; color: #e07a6a; margin: 14px 0 0; display: none; }
.form-error.show { display: block; }

.form-success { display: none; flex-direction: column; align-items: flex-start; gap: 16px; padding: 40px 0; animation: rise .5s ease; }
.form-success.show { display: flex; }
.form-success .check { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.form-success h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--text); margin: 0; }
.form-success p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 400px; }
.form-success button { margin-top: 6px; padding: 12px 22px; border-radius: 8px; background: transparent; border: 1px solid var(--hairline); color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer; }

/* -------------------------------- footer -------------------------------- */

.footer { border-top: 1px solid var(--hairline); }
.footer-inner { padding-top: clamp(48px, 6vw, 72px); padding-bottom: 34px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; }

.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand .brand img { width: 24px; height: 24px; }
.footer-brand p { font-size: 15px; line-height: 1.6; color: var(--text2); margin: 0 0 20px; }

.pill-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-links a { font-size: 13px; color: var(--text2); text-decoration: none; padding: 8px 14px; border: 1px solid var(--hairline); border-radius: 100px; }

.foot-col .mono-label { margin-bottom: 16px; letter-spacing: .12em; }
.foot-nav { display: flex; flex-direction: column; gap: 11px; }
.foot-nav a { font-size: 14px; color: var(--text2); text-decoration: none; text-align: left; }
.foot-touch p { font-size: 14px; line-height: 1.6; color: var(--text2); margin: 0 0 8px; }
.foot-touch .mail { font-size: 14px; color: var(--accent-quiet); text-decoration: none; }
.foot-touch .loc { font-size: 14px; color: var(--muted); margin-top: 8px; }

.footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--hairline-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom span { font-size: 12.5px; color: var(--muted); }

/* ------------------------------ chat widget ----------------------------- */

.chat-root { position: fixed; bottom: 24px; right: 24px; z-index: 80; }

.chat-closed { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-root.open .chat-closed { display: none; }

.chat-fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  cursor: pointer;
  box-shadow: 0 16px 38px -10px var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.chat-fab span { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.chat-fab span:nth-child(1) { animation: typing 1.4s infinite; }
.chat-fab span:nth-child(2) { animation: typing 1.4s .2s infinite; }
.chat-fab span:nth-child(3) { animation: typing 1.4s .4s infinite; }

.chat-panel {
  display: none;
  width: min(384px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 48px));
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: var(--shadow);
  flex-direction: column;
  overflow: hidden;
  animation: rise .3s ease;
}
.chat-root.open .chat-panel { display: flex; }

.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--hairline-soft); }
.chat-id { display: flex; align-items: center; gap: 11px; }
.chat-avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-size: 16px; }
.chat-name { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.1; }
.chat-close { width: 30px; height: 30px; border-radius: 8px; background: var(--chip); border: 1px solid var(--hairline-soft); color: var(--text2); cursor: pointer; font-size: 15px; }

.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }

.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-line; }
.msg-wrap { display: flex; }
.msg-wrap.bot { justify-content: flex-start; }
.msg-wrap.user { justify-content: flex-end; }
.msg.bot { background: var(--panel-2); border: 1px solid var(--hairline-soft); color: var(--text2); border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }

.typing-bubble { padding: 12px 15px; border-radius: 14px; border-bottom-left-radius: 4px; background: var(--panel-2); border: 1px solid var(--hairline-soft); display: flex; gap: 4px; }
.typing-bubble span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.typing-bubble span:nth-child(1) { animation: typing 1.4s infinite; }
.typing-bubble span:nth-child(2) { animation: typing 1.4s .2s infinite; }
.typing-bubble span:nth-child(3) { animation: typing 1.4s .4s infinite; }

.chat-suggests { margin-top: 4px; }
.chat-suggests .hint { font-size: 11px; color: var(--muted); margin-bottom: 9px; }
.chat-suggests .list { display: flex; flex-direction: column; gap: 8px; }
.chat-suggests button {
  text-align: left;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s;
}
.chat-suggests button:hover { border-color: var(--accent); }

.chat-foot { padding: 12px 14px; border-top: 1px solid var(--hairline-soft); }
.chat-input-row { display: flex; align-items: center; gap: 8px; }
.chat-input-row input { flex: 1; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--hairline); background: var(--bg); color: var(--text); font-size: 13.5px; outline: none; }
.chat-send { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); border: 0; color: #fff; cursor: pointer; font-size: 15px; flex: none; }
.char-count { text-align: right; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
