:root {
  --bg: #fbfaf8;
  --surface: #f3f1ed;
  --card: #ffffff;
  --text: #17202a;
  --muted: #62666b;
  --line: #c9c9c6;
  --soft-line: #dededb;
  --accent: #c4471f;
  --accent-dark: #a93b18;
  --placeholder: #e6e4e0;
  --max: 1220px;
}

html[data-theme="dark"] {
  --bg: #17191b;
  --surface: #1d2022;
  --card: #202326;
  --text: #f0efeb;
  --muted: #a8aaa8;
  --line: #4b4d4d;
  --soft-line: #343738;
  --accent: #ef6331;
  --accent-dark: #ff7b47;
  --placeholder: #2a2d2f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  transition: background .25s ease, color .25s ease;
}

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

button { font: inherit; }

.page {
  width: min(calc(100% - 74px), var(--max));
  margin: 0 auto;
}

.site-header {
  height: 91px;
  display: grid;
  grid-template-columns: 1fr auto 36px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
  background: var(--bg);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: max-content;
}

.wordmark strong {
  color: var(--accent);
  font-size: 24px;
  letter-spacing: -.04em;
}

.wordmark span {
  color: var(--muted);
  font-size: 13px;
}

.wordmark small {
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: .04em;
}

.nav {
  display: flex;
  gap: 44px;
  font-size: 10px;
  font-weight: 700;
}

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

.theme-toggle {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 4px;
  justify-self: end;
}

.toggle-track {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--text);
  border-radius: 50%;
  position: relative;
}

.toggle-dot {
  width: 7px;
  height: 7px;
  position: absolute;
  top: 2px;
  right: 2px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform .25s ease;
}

html[data-theme="dark"] .toggle-dot { transform: translate(-7px, 7px); }

.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
  padding: 60px 20px 65px;
}

.kicker,
.section-number {
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .02em;
}

.hero h1 {
  margin: 27px 0 18px;
  font-size: clamp(43px, 4.6vw, 65px);
  line-height: 1.06;
  letter-spacing: -.055em;
  font-weight: 400;
}

.hero h1 span { color: var(--accent); }

.hero-lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 13px 17px;
  font-size: 10px;
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); }

.text-link,
.orange-link {
  font-size: 10px;
  font-weight: 700;
}

.text-link span,
.orange-link span { color: var(--accent); margin-left: 10px; }

.hero-visual {
  min-height: 420px;
  position: relative;
}

.system-map {
  position: absolute;
  inset: 15px 0 80px;
  max-width: 520px;
  margin-left: auto;
  background-image: radial-gradient(var(--soft-line) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: 80% 0;
}

.node {
  position: absolute;
  width: 118px;
  height: 49px;
  border: 1px solid #85898b;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  z-index: 2;
}

.node-icon { font-size: 17px; font-weight: 400; }

.node-content { top: 0; left: 45%; }
.node-social { top: 84px; left: 3%; }
.node-landing { top: 84px; left: 42%; width: 137px; }
.node-crm { top: 84px; right: 2%; }
.node-email { top: 185px; left: 37%; }
.node-automation { top: 185px; right: 0; width: 140px; }
.node-conversion { top: 274px; right: 0; width: 140px; color: var(--accent); border-color: var(--accent); }

.line {
  position: absolute;
  height: 1px;
  background: #7f8384;
  z-index: 1;
  transform-origin: left center;
}

.l1 { width: 46px; left: 45%; top: 49px; transform: rotate(90deg); }
.l2 { width: 94px; left: 23%; top: 108px; }
.l3 { width: 43px; left: 39%; top: 108px; transform: rotate(0deg); }
.l4 { width: 48px; left: 70%; top: 108px; }
.l5 { width: 65px; left: 45%; top: 133px; transform: rotate(90deg); }
.l6 { width: 100px; left: 29%; top: 208px; transform: rotate(0deg); }
.l7 { width: 62px; left: 65%; top: 208px; }
.l8 { width: 66px; left: 71%; top: 234px; transform: rotate(90deg); }
.l9 { width: 45px; left: 17%; top: 132px; transform: rotate(90deg); }
.l10 { width: 44px; left: 72%; top: 208px; background: var(--accent); }
.l11 { width: 40px; left: 79%; top: 257px; transform: rotate(90deg); background: var(--accent); }

.dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #25292a;
  z-index: 3;
}

.d1 { left: 43%; top: 48px; }
.d2 { left: 64%; top: 106px; }
.d3 { left: 70%; top: 208px; }
.d4 { left: 79%; top: 256px; background: var(--accent); }
.d5 { left: 60%; top: 208px; background: var(--accent); }

.hero-location {
  position: absolute;
  left: 28%;
  bottom: 0;
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 10px;
  width: 190px;
  font-size: 9px;
}

.globe { font-size: 22px; grid-row: span 2; }

.hero-location strong {
  display: block;
  font-size: 8px;
  line-height: 1.5;
}

.hero-rule {
  width: 130px;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

.hero-location small {
  grid-column: 2;
  font-family: "Courier New", monospace;
  font-size: 8px;
  line-height: 1.7;
  color: var(--muted);
}

.client-strip {
  min-height: 83px;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 15px;
  padding: 14px 20px;
}

.strip-label {
  font-family: "Courier New", monospace;
  font-size: 8px;
  white-space: nowrap;
}

.client-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-align: center;
}

.client-logo.raven {
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .15em;
}

.client-logo small {
  font-size: 7px;
  letter-spacing: .18em;
}

.section {
  padding: 52px 20px;
  border-bottom: 1px solid var(--soft-line);
}

.about {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 45px;
}

.about-main {
  display: grid;
  grid-template-columns: 1.05fr .85fr 1.05fr .55fr;
  gap: 28px;
  align-items: start;
}

.about-intro h2,
.work-heading h2,
.experience h2,
.contact h2 {
  margin: 25px 0 20px;
  font-weight: 400;
  letter-spacing: -.05em;
}

.about-intro h2 { font-size: 30px; line-height: 1.08; }

.about-intro p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
  max-width: 270px;
  margin-bottom: 28px;
}

.placeholder {
  background:
    linear-gradient(135deg, var(--placeholder), color-mix(in srgb, var(--placeholder) 70%, var(--accent))),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,.25) 13px);
  position: relative;
  overflow: hidden;
}

.placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.55), transparent 35%);
  opacity: .5;
}

.portrait {
  aspect-ratio: .8;
  min-height: 270px;
  position: relative;
  overflow: hidden;
  background: var(--placeholder);
}

.portrait-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.portrait span,
.project-placeholder span {
  position: relative;
  z-index: 2;
}

.skill-stack {
  border-left: 1px solid var(--soft-line);
  padding-left: 20px;
}

.skill {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 9px 0 17px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--soft-line);
}

.skill-icon {
  color: var(--accent);
  font-size: 21px;
}

.skill strong {
  font-size: 10px;
  letter-spacing: .04em;
}

.skill p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.stats {
  border-left: 1px solid var(--soft-line);
  padding-left: 24px;
}

.stats div {
  margin-bottom: 18px;
}

.stats strong {
  display: block;
  color: var(--accent);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -.05em;
}

.stats span {
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
}

.work {
  padding-top: 45px;
}

.work-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 22px;
}

.work-heading h2 {
  font-size: 23px;
  line-height: 1.15;
}

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

.project-card {
  border: 1px solid var(--soft-line);
  background: var(--card);
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.project-image {
  aspect-ratio: 1.7;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 9px;
  text-align: center;

  overflow: hidden;

  overflow: hidden;
}

.project-info {
  padding: 13px 15px 17px;
  position: relative;
  min-height: 160px;
}

.project-info small {
  font-family: "Courier New", monospace;
  font-size: 8px;
  color: var(--muted);
}

.project-info h3 {
  font-size: 15px;
  font-weight: 400;
  margin: 8px 0 5px;
}

.project-info p {
  color: var(--muted);
  font-size: 9px;
  margin: 0;
}

.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tags span {
  border: 1px solid var(--line);
  padding: 4px 6px;
  font-size: 7px;
}

.project-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: var(--accent);
  font-size: 22px;
}

.experience {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 45px;
}

.experience h2 {
  font-size: 35px;
  line-height: 1.05;
  margin-top: 0;
}

.experience-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 30px;
  padding: 23px 0;
  border-top: 1px solid var(--soft-line);
}

.experience-row > span {
  color: var(--accent);
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.experience-row h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 400;
}

.experience-row p {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
}

.contact {
  min-height: 245px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact h2 {
  font-size: 38px;
  line-height: 1;
}

.contact-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.contact-link span { margin-left: 14px; }

.footer {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr 1fr;
  gap: 50px;
  padding: 42px 20px 35px;
}

.footer-brand strong {
  display: block;
  color: var(--accent);
  font-size: 29px;
  letter-spacing: -.05em;
  margin-bottom: 15px;
}

.footer-brand span {
  font-family: "Courier New", monospace;
  font-size: 10px;
  line-height: 1.7;
}

.footer > div:not(.footer-brand) {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer small {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 8px;
  margin-bottom: 4px;
}

.footer a { font-size: 9px; }
.footer a:hover { color: var(--accent); }

.footer-cta {
  font-size: 14px !important;
  line-height: 1.4;
}

.footer-cta a {
  color: var(--accent);
  margin-top: 12px;
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 20px 22px;
  color: var(--muted);
  font-size: 8px;
}

@media (max-width: 1050px) {
  .page { width: min(calc(100% - 40px), var(--max)); }
  .nav { gap: 22px; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; }
  .about-main { grid-template-columns: 1fr 1fr; }
  .skill-stack { border-left: 0; padding-left: 0; }
  .stats { border-left: 1px solid var(--soft-line); }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr 36px; height: 76px; }
  .nav { display: none; }
  .page { width: min(calc(100% - 28px), var(--max)); }
  .hero { padding: 45px 8px; }
  .hero h1 { font-size: clamp(39px, 10vw, 56px); }
  .hero-visual { min-height: 380px; }
  .system-map { transform: scale(.8); transform-origin: top right; width: 125%; }
  .client-strip { overflow-x: auto; justify-content: flex-start; }
  .client-logo { min-width: 95px; }
  .about, .experience { grid-template-columns: 1fr; gap: 25px; }
  .about-main { grid-template-columns: 1fr; }
  .stats { border-left: 0; border-top: 1px solid var(--soft-line); padding: 20px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .work-heading { align-items: start; flex-direction: column; gap: 10px; }
  .contact { align-items: flex-start; flex-direction: column; gap: 35px; padding: 55px 20px; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer-cta { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .wordmark small { display: none; }
  .wordmark span { font-size: 11px; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-visual { min-height: 330px; }
  .system-map { transform: scale(.62); transform-origin: top right; width: 160%; }
  .hero-location { left: 8%; }
  .footer { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

.platform-dot {
  display: inline-block;
  margin: 0 0.35rem;
  opacity: 0.55;
  font-size: 0.75em;
  vertical-align: middle;
}

.project-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* Work Archive uses the same card system as Featured Work */
.work-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 900px) {
  .work-archive-grid { grid-template-columns: 1fr; }
}

.work-archive-grid .project-card {
  max-width: 100%;
}
