/* Soft Machine — a warm, human infrastructure interface */
:root {
  --canvas: #d8d5cd;
  --paper: #f4f0e6;
  --ink: #282a27;
  --muted: #66675f;
  --apricot: #e9a57e;
  --apricot-dark: #b86442;
  --mint: #9fcab8;
  --mint-dark: #39725e;
  --line: #9c9c92;
  --radius-lg: 42px;
  --radius-md: 24px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--apricot-dark); outline-offset: 4px; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1440px, calc(100% - 32px));
  min-height: 74px;
  margin: 16px auto 0;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(244, 240, 230, .58);
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; text-decoration: none; }
.brand-light { width: 13px; height: 13px; border-radius: 50%; background: var(--mint-dark); box-shadow: 0 0 0 5px var(--mint); }
nav { display: flex; gap: clamp(12px, 3vw, 40px); }
nav a { font: 700 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration-thickness: 1px; text-underline-offset: 5px; }

main, footer { width: min(1440px, calc(100% - 32px)); margin-inline: auto; }
.hero {
  min-height: 760px;
  margin-top: 16px;
  padding: clamp(32px, 6vw, 90px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  align-items: center;
  gap: clamp(40px, 8vw, 130px);
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 90px;
  right: -90px;
  top: 60px;
  border: 24px solid var(--mint);
  border-left: 0;
  border-radius: 0 80px 80px 0;
}
.eyebrow, .panel-label {
  margin: 0 0 18px;
  font: 700 .7rem var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow span { color: var(--apricot-dark); margin-right: 12px; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; max-width: 800px; font-size: clamp(4rem, 10vw, 9.8rem); line-height: .82; letter-spacing: -.075em; }
.role { max-width: 650px; margin: 32px 0 24px; font-size: clamp(1.25rem, 2.3vw, 2rem); line-height: 1.15; font-weight: 700; }
.summary { max-width: 700px; color: var(--muted); font-size: 1rem; }
.summary p { margin: .65rem 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { padding: 13px 19px; border: 1px solid var(--ink); border-radius: 999px; font: 700 .75rem var(--mono); text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
.button.primary { color: var(--paper); background: var(--ink); }
.button.secondary { background: transparent; }
.button:hover { background: var(--apricot); color: var(--ink); }

.portrait-machine { position: relative; z-index: 2; padding: 13px; background: var(--ink); border-radius: 90px 90px 38px 38px; box-shadow: 18px 18px 0 var(--apricot); }
.machine-top { padding: 6px 22px 13px; display: flex; justify-content: space-between; color: var(--paper); font: 700 .62rem var(--mono); letter-spacing: .1em; }
.status { color: var(--mint); }
.portrait-wrap { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 2px solid var(--ink); border-radius: 70px 70px 18px 18px; background: var(--mint); }
.portrait-wrap img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.72) contrast(1.04); }
.scanline { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(40,42,39,.08) 8px); pointer-events: none; }
.machine-console { height: 58px; padding: 13px 16px; display: flex; align-items: center; gap: 12px; }
.dial { width: 28px; height: 28px; border: 7px solid var(--mint); border-radius: 50%; }
.console-line { height: 5px; flex: 1; border-radius: 5px; background: #73756d; }
.console-line.short { flex: .4; background: var(--apricot); }
.switch { width: 14px; height: 25px; border-radius: 7px; background: var(--paper); }
.hero-pipe { position: absolute; left: 53%; bottom: 0; width: 20%; height: 13%; border: 7px solid var(--ink); border-bottom: 0; border-radius: 35px 35px 0 0; opacity: .14; }
.pipe-dot { position: absolute; width: 14px; height: 14px; top: -10px; left: 25px; border-radius: 50%; background: var(--apricot-dark); }

.experience-section, .capabilities, .references { padding: clamp(80px, 10vw, 150px) clamp(0px, 4vw, 60px); }
.section-heading { margin-bottom: 50px; display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.section-heading h2, footer h2 { margin: 0; font-size: clamp(2.6rem, 6vw, 6rem); line-height: .95; letter-spacing: -.055em; }
.section-note { max-width: 250px; color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.pipeline { position: relative; display: grid; gap: 24px; }
.pipeline::before { content: ""; position: absolute; left: 64px; top: -60px; bottom: -60px; width: 12px; background: var(--ink); border: 3px solid var(--canvas); box-shadow: 0 0 0 1px var(--ink); }
.job {
  position: relative;
  min-height: 300px;
  padding: 34px 34px 34px 120px;
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: clamp(30px, 6vw, 100px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 34px;
}
.job:nth-child(even) { background: #cfdfd5; }
.job-route { position: absolute; left: 47px; top: 50%; width: 42px; display: flex; align-items: center; transform: translateY(-50%); }
.port { position: absolute; width: 22px; height: 22px; border: 5px solid var(--ink); border-radius: 50%; background: var(--apricot); }
.port.input { left: -3px; }
.port.output { right: -3px; }
.route-track { width: 100%; height: 5px; background: var(--ink); overflow: hidden; }
.route-signal { display: block; width: 10px; height: 5px; background: var(--paper); animation: route 2.8s linear infinite; }
@keyframes route { from { transform: translateX(-12px); } to { transform: translateX(44px); } }
.job-head { display: flex; gap: 18px; align-items: start; }
.sequence { min-width: 38px; padding: 6px; text-align: center; background: var(--ink); color: var(--paper); border-radius: 8px; font: 700 .65rem var(--mono); }
.job h3 { margin: 7px 0 5px; font-size: clamp(1.4rem, 3vw, 2.3rem); line-height: 1; }
.job-dates, .company { margin: 0; font: 700 .72rem var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.company { color: var(--apricot-dark); text-underline-offset: 4px; }
.job-details { margin: 0; padding: 0; list-style: none; }
.job-details li { position: relative; margin-bottom: 13px; padding-left: 22px; }
.job-details li::before { content: "→"; position: absolute; left: 0; color: var(--apricot-dark); font-family: var(--mono); }
.tech-list { margin: 25px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.tech-list li { padding: 5px 9px; border: 1px solid var(--ink); border-radius: 99px; font: 700 .62rem var(--mono); }

.capabilities { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); }
.capabilities .eyebrow span { color: var(--mint); }
.control-panel { display: grid; grid-template-columns: 1.1fr .9fr; border: 1px solid #686a63; border-radius: 28px; overflow: hidden; }
.skills-panel, .credentials-panel { padding: clamp(24px, 5vw, 60px); }
.skills-panel { border-right: 1px solid #686a63; }
.panel-label { color: var(--apricot); }
.skill-bank { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); list-style: none; }
.skill-bank li { padding: 17px 8px; display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #575951; font-weight: 700; }
.skill-led { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(159,202,184,.14); }
.credential-group + .credential-group { margin-top: 45px; }
.credential { padding: 22px; border: 1px solid #686a63; border-radius: 18px; background: #30322f; }
.credential + .credential { margin-top: 12px; }
.credential > span { color: var(--mint); font: 700 .6rem var(--mono); }
.credential h3 { margin: 10px 0 4px; line-height: 1.15; }
.credential p { margin: 0; color: #bfc0b7; }

.reference-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.reference-feed figure { margin: 0; padding: clamp(26px, 4vw, 50px); border: 1px solid var(--line); border-radius: 60px 20px 60px 20px; background: var(--paper); }
.reference-feed figure:nth-child(3n+2) { background: var(--apricot); border-radius: 20px 60px 20px 60px; }
blockquote { margin: 0; font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.45; }
blockquote p { margin-top: 0; }
figcaption { display: flex; flex-direction: column; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .7rem; }
figcaption span { color: var(--muted); }

footer { position: relative; margin-bottom: 16px; padding: clamp(45px, 8vw, 110px); color: var(--paper); background: var(--ink); border-radius: var(--radius-lg); overflow: hidden; }
footer .eyebrow span { color: var(--apricot); }
.email-link { display: inline-block; margin: 40px 0 80px; color: var(--mint); font-size: clamp(1.05rem, 3vw, 2.6rem); text-underline-offset: 8px; }
.footer-bottom { padding-top: 18px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #5c5e57; color: #aaaca3; font: .65rem var(--mono); text-transform: uppercase; }
.footer-socket { position: absolute; right: 7%; top: 20%; display: flex; gap: 14px; }
.footer-socket span { width: 27px; height: 27px; border: 7px solid var(--apricot); border-radius: 50%; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 80px; }
  .portrait-machine { width: min(100%, 440px); justify-self: center; }
  .hero-pipe { display: none; }
  .job { grid-template-columns: 1fr; padding-left: 96px; }
  .pipeline::before { left: 45px; }
  .job-route { left: 28px; }
  .control-panel { grid-template-columns: 1fr; }
  .skills-panel { border-right: 0; border-bottom: 1px solid #686a63; }
}
@media (max-width: 580px) {
  :root { --radius-lg: 28px; }
  .site-header { align-items: flex-start; }
  nav { flex-direction: column; gap: 3px; align-items: flex-end; }
  nav a { padding: 2px; }
  h1 { font-size: clamp(3.5rem, 20vw, 6rem); }
  .hero { min-height: auto; padding: 42px 22px 65px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-note { margin: 0; }
  .experience-section, .capabilities, .references { padding-block: 80px; }
  .capabilities { padding-inline: 16px; }
  .job { padding: 28px 20px 28px 70px; border-radius: 24px; }
  .pipeline::before { left: 29px; }
  .job-route { left: 12px; }
  .sequence { display: none; }
  .skill-bank, .reference-feed { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-socket { opacity: .25; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .route-signal { width: 55%; transform: translateX(18px); background: var(--apricot); }
}
