:root {
  --bg: #f6f4ef;
  --bg-2: #ede9e0;
  --surface: #ffffff;
  --surface-tint: #faf8f4;
  --ink: #141413;
  --ink-2: #1c1e1d;
  --text: #181715;
  --muted: #5c5852;
  --accent: #c84b31;
  --accent-hover: #a93b24;
  --accent-soft: rgba(200, 75, 49, 0.1);
  --forest: #1e3a34;
  --line: rgba(20, 20, 19, 0.12);
  --line-strong: rgba(20, 20, 19, 0.24);
  --danger: #c62828;
  --ok: #1b6e4a;
  --shadow-sm: 0 4px 14px rgba(20, 20, 19, 0.05);
  --shadow: 0 22px 54px rgba(20, 20, 19, 0.08);
  --radius: 16px;
  --radius-lg: 24px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -50px;
  z-index: 90;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 14px;
}

.container {
  width: min(1200px, calc(100% - 44px));
  margin: 0 auto;
}

/* ==================== Floating Editorial Header ==================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 0 0;
  transition: padding 0.25s ease;
}

.site-header.is-scrolled {
  padding-top: 10px;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled .header-shell {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--line-strong);
  box-shadow: 0 12px 32px rgba(20, 20, 19, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.logo-text {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

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

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.75;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--bg-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 10px;
  padding: 11px 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease;
}

.nav-toggle span + span {
  margin-top: 7px;
}

body.nav-open .nav-toggle span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* ==================== Buttons ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(200, 75, 49, 0.22);
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow {
  transform: translate(2px, -1px);
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 20px rgba(20, 20, 19, 0.12);
}

.btn-full {
  width: 100%;
}

/* ==================== Typography ==================== */

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
  color: var(--ink);
}

h1 {
  margin-top: 14px;
  font-size: clamp(2.85rem, 5.6vw, 4.7rem);
  font-weight: 600;
  line-height: 0.98;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

h2 {
  font-size: clamp(2.05rem, 3.8vw, 3.15rem);
  max-width: 15ch;
}

.kicker {
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.lede {
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
  margin: 22px 0 0;
}

/* ==================== Hero (Asymmetric Editorial Dossier) ==================== */

.hero {
  position: relative;
  padding: 46px 0 72px;
  background-image: radial-gradient(rgba(20, 20, 19, 0.085) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 54px;
  align-items: start;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 4.5;
  background: var(--bg-2);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.photo-frame img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.photo-frame.has-photo img {
  display: block;
}

.availability-pill {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(20, 20, 19, 0.14);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1b8a5a;
  box-shadow: 0 0 0 0 rgba(27, 138, 90, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(27, 138, 90, 0);
  }
}

.photo-upload {
  display: none;
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 14px;
  background: rgba(20, 20, 19, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

body.is-admin .photo-upload {
  display: inline-flex;
}

.admin-only {
  display: none;
}

body.is-admin .admin-only {
  display: block;
}

body.is-admin .photo-upload.admin-only {
  display: inline-flex;
}

.photo-upload input {
  display: none;
}

.dossier-body {
  padding: 20px 22px 22px;
}

.profile-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
}

.profile-meta strong {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.profile-meta small {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.facts span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.facts b {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.more-info-btn {
  display: flex;
  width: 100%;
  margin-top: 14px;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.more-info-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

.more-info-btn::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--accent);
}

.more-info-btn.is-open::after {
  content: "–";
}

.more-info-panel {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.more-info-panel[hidden] {
  display: none;
}

.more-info-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.more-info-panel a:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.more-info-panel span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--ink);
}

.more-info-panel a:hover span {
  background: var(--accent);
  color: #ffffff;
}

.hero-copy {
  padding-top: 12px;
}

.hero-role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-role::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--accent);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.hero-tags li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hero-tags li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-tags li:last-child {
  background: var(--forest);
  border-color: var(--forest);
  color: #f6f4ef;
}

.hero-tags li:last-child::before {
  background: #f2c97d;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  display: grid;
  gap: 3px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pillar:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.pillar span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
}

.pillar strong {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}

.pillar small {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ==================== Sections ==================== */

.section {
  position: relative;
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 42px;
}

.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.section-note {
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

/* ==================== About & Editorial Split ==================== */

.editorial-split {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 48px;
  align-items: start;
}

.editorial-split .section-head {
  position: sticky;
  top: 102px;
  margin-bottom: 0;
}

.about-lead {
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 2.3vw, 1.95rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  padding-left: 22px;
  border-left: 3px solid var(--accent);
}

.about-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.98rem;
}

.about-copy p {
  margin: 0;
}

.stats {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.stats li {
  padding: 28px 24px;
  display: grid;
  gap: 4px;
  transition: background 0.25s ease;
}

.stats li + li {
  border-left: 1px solid var(--line);
}

.stats li:hover {
  background: var(--surface);
}

.stats small {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}

.stats b {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.stats span {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

/* ==================== Skills (2x2 Bento Matrix) ==================== */

.skills-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-group:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.skill-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.skill-group-head h3 {
  font-size: 1.38rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.skill-index {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
}

.skill-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.skill-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.skill-row:last-child {
  margin-bottom: 0;
}

.skill-row > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.93rem;
}

.skill-row i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.skill-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
}

.skill-name b {
  font-weight: 600;
}

.skill-logos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 8px;
  background: var(--ink-2);
  flex-shrink: 0;
}

.skill-logo {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink) 0%, var(--accent) 100%);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== Work / Projects ==================== */

.project-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.chip .chip-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.72;
}

.chip:hover {
  color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 4px 12px rgba(20, 20, 19, 0.14);
}

.chip.is-active .chip-count {
  color: #f4b29f;
  opacity: 1;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--card-accent, var(--accent));
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  border-top-color: var(--accent);
  box-shadow: var(--shadow);
}

.project-card.is-featured {
  background: linear-gradient(180deg, #ffffff 0%, #faf6f0 100%);
}

.project-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
}

.project-card.is-featured .project-badge {
  background: var(--accent-soft);
  border-color: rgba(200, 75, 49, 0.28);
  color: var(--accent);
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-body h3 {
  font-size: 1.24rem;
  line-height: 1.2;
}

.project-body p {
  color: var(--muted);
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface-tint);
  border-radius: 6px;
  padding: 3px 8px;
}

.project-links {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.project-links:empty {
  display: none;
}

.live-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
  word-break: break-word;
  transition: gap 0.2s ease, color 0.2s ease;
}

.live-link::after {
  content: "↗";
  font-family: var(--font-mono);
}

.live-link:hover {
  color: var(--ink);
  gap: 9px;
}

/* ==================== Dark Contrast Research Band ==================== */

.section-ink {
  background: var(--ink-2);
  color: #f4f1ea;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.section-ink h2,
.section-ink h3 {
  color: #f6f4ef;
}

.section-ink h2 em {
  color: #ef7c63;
}

.section-ink .kicker {
  color: #ef7c63;
}

.section-ink .section-note {
  color: #a9a49c;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.research-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.research-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 124, 99, 0.55);
  background: rgba(255, 255, 255, 0.07);
}

.research-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.research-top .kicker {
  margin: 0;
}

.research-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  color: rgba(246, 244, 239, 0.28);
}

.research-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.research-card p {
  color: #b7b2aa;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ==================== Path / Vertical Connected Timeline ==================== */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  position: relative;
  display: grid;
  gap: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--line-strong);
}

.timeline li {
  position: relative;
  display: grid;
  gap: 10px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.when {
  display: inline-flex;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.timeline-card:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
}

.timeline-card h3 {
  font-size: 1.32rem;
}

.timeline-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ==================== Contact Split Sheet ==================== */

.contact-sheet {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-dossier {
  background: var(--ink-2);
  color: #f6f4ef;
  padding: 42px 38px;
  display: flex;
  flex-direction: column;
}

.contact-dossier h2 {
  color: #f6f4ef;
}

.contact-dossier h2 em {
  color: #ef7c63;
}

.contact-dossier .kicker {
  color: #ef7c63;
}

.contact-dossier .lede {
  color: #b7b2aa;
  margin-top: 16px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  padding-top: 32px;
}

.contact-list li {
  display: grid;
  gap: 3px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-list span {
  font-family: var(--font-mono);
  color: #a9a49c;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-list a,
.contact-list b {
  color: #f6f4ef;
  font-weight: 600;
  font-size: 1rem;
  word-break: break-word;
}

.contact-list a:hover {
  color: #ef7c63;
}

.contact-form {
  background: var(--surface);
  padding: 40px 38px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.contact-form[hidden],
#owner-panel[hidden] {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-tint);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.form-status.is-ok {
  color: var(--ok);
}

.form-status.is-error {
  color: var(--danger);
}

/* ==================== Admin Panel Compatibility ==================== */

.admin-wrap {
  max-width: 760px;
}

.admin-wrap .contact-form {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 22px;
  box-shadow: var(--shadow-sm);
}

.admin-photo-frame {
  width: min(220px, 100%);
  aspect-ratio: 4 / 5;
  margin: 8px 0 16px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
}

.admin-photo-frame img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.admin-photo-frame.has-photo img {
  display: block;
}

.admin-projects {
  margin-top: 38px;
}

.admin-projects h3 {
  margin: 6px 0 8px;
  font-size: 1.5rem;
}

#project-link-list,
#message-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.admin-link-row {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-link-row small {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.admin-link-row strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
}

.link-editor {
  display: flex;
  gap: 8px;
}

.link-editor input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: var(--surface-tint);
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 12px;
}

.link-editor button {
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
}

.link-editor button:hover {
  background: var(--accent);
}

.live-link.is-empty,
.add-link,
.edit-link {
  color: var(--muted);
  font-weight: 700;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.edit-link:hover,
.add-link {
  color: var(--accent);
}

/* ==================== Footer ==================== */

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-strong);
  background: var(--bg);
  padding: 36px 0 44px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}

.footer-brand p {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.back-top {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-top:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.loading,
.empty {
  color: var(--muted);
}

/* ==================== Motion & Reveal ==================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

/* ==================== Responsive ==================== */

@media (max-width: 1040px) {
  .projects,
  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    grid-template-columns: 0.92fr 1.08fr;
    gap: 36px;
  }

  .editorial-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .editorial-split .section-head {
    position: static;
  }
}

@media (max-width: 880px) {
  .hero-grid,
  .contact-sheet,
  .skills-board {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 460px;
    width: 100%;
    order: 2;
  }

  .hero-copy {
    order: 1;
    padding-top: 0;
  }

  .header-shell {
    position: relative;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }

  body.nav-open .nav {
    display: flex;
  }

  .header-actions .btn-small {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .about-copy,
  .form-row {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stats li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .projects,
  .research-grid,
  .hero-pillars {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(1200px, calc(100% - 28px));
  }

  .section {
    padding: 72px 0;
  }

  .contact-dossier,
  .contact-form {
    padding: 28px 22px;
  }

  .logo-text {
    font-size: 0.86rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
