/* ===== Reagan Pieter — personal site ===== */

:root {
  --bg-light: #F2EFE7;        /* warm off-white */
  --bg-light-2: #EAE6DB;      /* slightly deeper */
  --bg-dark: #0E0E0C;         /* near-black, warm */
  --bg-dark-2: #16160F;
  --ink: #100F0C;             /* primary text on light */
  --ink-2: #5C594F;           /* secondary text on light */
  --ink-3: #8C887C;           /* tertiary */
  --paper: #FBF9F3;           /* lighter accents */
  --light-on-dark: #F2EFE7;
  --light-on-dark-2: #807D72; /* dim text on dark */
  --light-on-dark-3: #4A4843;
  --accent: #FF5C2B;          /* signature orange */
  --accent-deep: #E14512;
  --hairline: rgba(16,15,12,0.12);
  --hairline-dark: rgba(242,239,231,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-light);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-size: 17px;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: white; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
img { display: block; max-width: 100%; }

.display {
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.92;
  text-wrap: balance;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Layout */
.section {
  position: relative;
  padding: clamp(80px, 11vw, 160px) clamp(24px, 5vw, 88px);
}
.container { max-width: 1320px; margin: 0 auto; width: 100%; }

.dark { background: var(--bg-dark); color: var(--light-on-dark); }
.light { background: var(--bg-light); color: var(--ink); }

/* ----- HERO ----- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 32px;
  padding-bottom: 40px;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 56px);
}
.brand {
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 2px;
  vertical-align: middle;
}
.portrait-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.05) contrast(1.02);
  border: 2px solid var(--bg-light);
  box-shadow: 0 2px 8px rgba(16,15,12,0.15);
}
.hero-meta {
  display: flex;
  gap: 22px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.hero-meta .live::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px clamp(24px, 5vw, 56px) 32px;
  gap: 28px;
}

.portrait {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(0.05) contrast(1.02);
  border: 3px solid var(--bg-light);
  box-shadow: 0 18px 50px -16px rgba(16,15,12,0.35);
}

.hero-name {
  font-size: clamp(64px, 13vw, 200px);
  text-transform: uppercase;
  max-width: 14ch;
}

.hero-sub {
  max-width: 30ch;
  font-size: clamp(26px, 2.9vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.018em;
  font-weight: 500;
  color: var(--ink);
  text-wrap: balance;
}
.hero-sub .accent-word { color: var(--accent); }

.hero-fine {
  max-width: 72ch;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: pretty;
}

/* AI command bar */
.cmd-wrap {
  width: 100%;
  max-width: 720px;
  margin-top: 12px;
}
.cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 10px 10px 10px 24px;
  box-shadow: 0 20px 50px -28px rgba(16,15,12,0.45),
              0 1px 0 rgba(255,255,255,0.7) inset;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cmd:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,92,43,0.12),
              0 20px 50px -24px rgba(255,92,43,0.35);
}
.spark {
  width: 20px; height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.cmd input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  padding: 8px 0;
  font-family: inherit;
}
.cmd input::placeholder { color: var(--ink-3); }
.cmd-send {
  background: var(--ink);
  color: var(--bg-light);
  height: 44px; width: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.cmd-send:hover { background: var(--accent); transform: scale(1.04); }
.cmd-send svg { width: 16px; height: 16px; }

.cmd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.chip {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--ink-2);
  transition: all 0.18s ease;
  white-space: nowrap;
}
.chip:hover {
  background: var(--ink);
  color: var(--bg-light);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.chip.dark-chip {
  border-color: var(--hairline-dark);
  color: var(--light-on-dark-2);
}
.chip.dark-chip:hover {
  background: var(--light-on-dark);
  color: var(--ink);
  border-color: var(--light-on-dark);
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(24px, 5vw, 56px);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.scroll-hint .line {
  flex: 0 0 56px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ----- TIMELINE ----- */
.timeline-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 32px;
  margin-bottom: clamp(56px, 9vw, 120px);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light-on-dark-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .num { color: var(--accent); }
.eyebrow.on-light { color: var(--ink-2); }

.timeline-title {
  font-size: clamp(40px, 5.5vw, 80px);
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.timeline-lede {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--light-on-dark-2);
  max-width: 44ch;
  line-height: 1.5;
  text-wrap: pretty;
}

.timeline {
  position: relative;
}
.tl-item {
  display: grid;
  grid-template-columns: 160px 1.2fr 2fr;
  gap: clamp(24px, 4vw, 80px);
  align-items: start;
  padding: clamp(28px, 4vw, 44px) 0;
  border-top: 1px solid var(--hairline-dark);
  cursor: default;
  transition: padding 0.3s ease;
}
.tl-item:last-child { border-bottom: 1px solid var(--hairline-dark); }
.tl-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--light-on-dark-2);
  transition: color 0.3s;
  padding-top: 6px;
}
.tl-role {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--light-on-dark-2);
  transition: color 0.3s;
  line-height: 1.2;
}
.tl-desc {
  font-size: clamp(18px, 1.6vw, 24px);
  color: var(--light-on-dark-3);
  line-height: 1.35;
  letter-spacing: -0.012em;
  transition: color 0.3s;
  text-wrap: pretty;
}
.tl-item:hover .tl-year,
.tl-item:hover .tl-role,
.tl-item.active .tl-year,
.tl-item.active .tl-role { color: var(--light-on-dark); }
.tl-item:hover .tl-desc,
.tl-item.active .tl-desc { color: var(--light-on-dark); }
.tl-item:hover .tl-marker,
.tl-item.active .tl-marker { background: var(--accent); }
.tl-now .tl-year,
.tl-now .tl-role { color: var(--light-on-dark); }
.tl-now .tl-desc { color: var(--light-on-dark); }
.tl-now .tl-year::before {
  content: "● ";
  color: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

/* ----- AI CHAT SECTION ----- */
.ai-section { background: var(--bg-light); }
.ai-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.ai-title {
  font-size: clamp(48px, 7vw, 112px);
  letter-spacing: -0.035em;
}
.ai-title .blink::after {
  content: "_";
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.ai-lede {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--ink-2);
  max-width: 48ch;
  line-height: 1.5;
}

.chat-shell {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  box-shadow: 0 30px 80px -40px rgba(16,15,12,0.35);
}
.chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255,255,255,0.5);
}
.chat-id {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.chat-id .av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg-light);
  display: grid;
  place-items: center;
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: -0.04em;
}
.chat-id strong { display: block; font-weight: 700; }
.chat-id span { color: var(--ink-2); font-size: 11px; }
.chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chat-status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse 2.4s ease-in-out infinite;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
}
.msg {
  max-width: 78%;
  font-size: 16px;
  line-height: 1.5;
  padding: 14px 18px;
  border-radius: 18px;
  white-space: pre-wrap;
  animation: msgIn 0.4s ease both;
  text-wrap: pretty;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg.user {
  background: var(--ink);
  color: var(--bg-light);
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}
.msg.ai {
  background: var(--bg-light-2);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.msg.ai.thinking {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 16px 18px;
}
.msg.ai.thinking span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: dot 1.2s ease-in-out infinite;
}
.msg.ai.thinking span:nth-child(2) { animation-delay: 0.15s; }
.msg.ai.thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1.1); opacity: 1; }
}

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 clamp(20px, 4vw, 48px) 18px;
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--hairline);
  background: var(--paper);
}
.chat-input-row input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  padding: 10px 4px;
  color: var(--ink);
  font-family: inherit;
}
.chat-input-row input::placeholder { color: var(--ink-3); }
.chat-input-row .cmd-send { height: 40px; width: 40px; }

.chat-hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-2);
}

/* Brief drawer */
.brief-card {
  background: white;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 6px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  align-self: stretch;
  max-width: 100%;
  text-wrap: pretty;
  white-space: pre-wrap;
}
.brief-card .label { color: var(--accent); font-weight: 700; }
.brief-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.brief-btn {
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.brief-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.brief-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ----- NOW SECTION ----- */
.now-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.now-title {
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.03em;
}
.now-cards {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.now-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-dark-2);
  border: 1px solid var(--hairline-dark);
  border-radius: 16px;
  transition: border-color 0.2s, transform 0.2s;
}
.now-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.now-card .dot-now {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255,92,43,0.18);
}
.now-card .lbl {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-on-dark-2);
  margin-bottom: 4px;
}
.now-card .title-l {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--light-on-dark);
}
.now-card .meta {
  font-size: 13px;
  color: var(--light-on-dark-2);
  white-space: nowrap;
}

/* ----- SERVICES ----- */
.services-head {
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
}
.service {
  padding: 40px 0 40px;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: start;
  position: relative;
  transition: padding 0.3s;
}
.service:nth-child(odd) { padding-right: 48px; border-right: 1px solid var(--hairline); }
.service:nth-child(even) { padding-left: 48px; }
.service .num-s {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  padding-top: 6px;
}
.service h3 {
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.1;
}
.service p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

/* ----- SELECTED WORK ----- */
.work-head {
  margin-bottom: 64px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.work {
  background: var(--bg-dark-2);
  border: 1px solid var(--hairline-dark);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 340px;
  transition: border-color 0.2s, transform 0.2s;
}
.work:hover { border-color: var(--accent); transform: translateY(-3px); }
.work .work-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light-on-dark-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.work .work-tag::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.work .work-tag.shipped::before { background: #22c55e; }
.work .work-tag.building::before { background: var(--accent); animation: pulse 2s ease-in-out infinite; }
.work h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 3vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.work p {
  color: var(--light-on-dark-2);
  font-size: 15px;
  line-height: 1.55;
  margin-top: 12px;
  text-wrap: pretty;
}
.work .work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--light-on-dark);
  border-top: 1px solid var(--hairline-dark);
  padding-top: 20px;
  margin-top: auto;
}
.work .work-link svg { width: 14px; height: 14px; transition: transform 0.2s; }
.work:hover .work-link svg { transform: translate(2px, -2px); }

/* ----- CONTACT ----- */
.contact {
  text-align: center;
  padding-top: clamp(120px, 14vw, 200px);
  padding-bottom: clamp(80px, 10vw, 140px);
}
.contact-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 36px;
}
.contact-headline {
  font-size: clamp(56px, 11vw, 180px);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 40px;
}
.contact-headline em {
  font-style: italic;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.015em;
  padding: 18px 32px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg-light);
  transition: all 0.2s;
  cursor: pointer;
  font-family: inherit;
}
.contact-email:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--hairline);
  transform: translateY(-2px);
}
.contact-email .arrow {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
}
.contact-email .arrow svg { width: 14px; height: 14px; }

/* ----- FOOTER ----- */
footer {
  padding: 32px clamp(24px, 5vw, 88px);
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
  flex-wrap: wrap;
  gap: 16px;
}
footer .socials { display: flex; gap: 28px; }
footer .socials a { transition: color 0.2s; }
footer .socials a:hover { color: var(--accent); }

/* Floating launcher (mobile) */
.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  background: var(--ink);
  color: var(--bg-light);
  height: 56px;
  padding: 0 22px 0 20px;
  border-radius: 999px;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.4);
  transition: background 0.2s, transform 0.2s;
}
.fab:hover { background: var(--accent); transform: translateY(-2px); }
.fab .spark { width: 16px; height: 16px; color: var(--accent); }
.fab:hover .spark { color: white; }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .timeline-head,
  .ai-head,
  .services-head,
  .now-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .tl-item {
    grid-template-columns: 110px 1fr;
    gap: 18px;
  }
  .tl-desc {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-left: 110px;
  }
  .services-grid { grid-template-columns: 1fr; }
  .service:nth-child(odd) { padding-right: 0; border-right: 0; }
  .service:nth-child(even) { padding-left: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .now-card { grid-template-columns: auto 1fr; }
  .now-card .meta { display: none; }
  .hero-meta { display: none; }
  .fab { display: inline-flex; }
}

@media (max-width: 560px) {
  .hero-name { font-size: 22vw; }
  .tl-item { grid-template-columns: 90px 1fr; }
  .tl-desc { padding-left: 0; }
  .work { padding: 24px; min-height: 280px; }
}
