/* DG TechTools — shared styles for every page.
   Layout: one centered column (max 1240px) with a 16px+ side gutter; grids collapse to one column on phones. */
:root {
  --bg: #f6f8fb; --card: #ffffff; --navy: #0d3b66; --ink: #13233a; --dim: #55657a; --line: #dde3ec; --rule: #c9d6e6;
  --teal: #17a589; --teal-soft: #dff4ee; --blue-soft: #e4ebfb; --green-soft: #e3f3e6; --peach-soft: #fde9e1; --sage-soft: #e3efe9; --purple-soft: #ede7f6;
  --live: #1e8e3e; --live-bg: #e3f4e7; --dev: #b8452a; --dev-bg: #fde3da; --pers: #2c6e63; --pers-bg: #ddefea; --proto: #8a5a00; --proto-bg: #fff1d3;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- header ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px 16px; border-bottom: 1.5px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 58px; height: 58px; border-radius: 50%; flex: none; }
.brand b { display: block; font-family: var(--serif); font-weight: 900; font-size: 25px; line-height: 1.15; }
.brand small { display: block; font-size: 12.5px; color: var(--dim); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 6px 26px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.site-nav a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }
.site-nav a.cta { background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 8px; }
.site-nav a.cta:hover { text-decoration: none; background: #0a2f52; }

/* ---------- shared bits ---------- */
.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: #eef1f6; color: var(--dim); }
.chip.live { color: var(--live); background: var(--live-bg); }
.chip.dev { color: var(--dev); background: var(--dev-bg); }
.chip.pers { color: var(--pers); background: var(--pers-bg); }
.chip.proto { color: var(--proto); background: var(--proto-bg); }
.btn { display: inline-block; text-decoration: none; padding: 12px 22px; border-radius: 9px; font-weight: 600; font-size: 16px; border: 2px solid var(--navy); }
.btn.solid { background: var(--navy); color: #fff; }
.btn.solid:hover { background: #0a2f52; }
.btn.ghost { background: #fff; color: var(--navy); }
.btn.ghost:hover { background: var(--blue-soft); }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.sec-head { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin: 56px 0 22px; }
.sec-head h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 3.2vw, 32px); margin: 0; letter-spacing: -.01em; line-height: 1.2; }
.sec-head .rule { flex: 1 1 80px; height: 1.5px; background: var(--rule); }
.sec-head .note { font-size: 14px; color: var(--dim); }

/* ---------- homepage hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 56px; align-items: center; padding-block: 56px 20px; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(38px, 5vw, 56px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 20px; border-left: 6px solid var(--teal); padding-left: 24px; text-wrap: balance; }
.hero h1 span { color: var(--navy); background: linear-gradient(transparent 68%, var(--teal-soft) 68%); }
.hero .lede { font-size: 19px; color: var(--dim); margin: 0 0 26px 30px; max-width: 30em; }
.hero .btns { margin-left: 30px; }
.facts { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 28px 0 0 30px; font-size: 14px; color: var(--dim); }
.facts b { color: var(--ink); }
.hero-art { position: relative; }
.hero-art::before { content: ""; position: absolute; inset: -22px -16px 40px 50px; background: var(--teal-soft); border-radius: 28px; transform: rotate(2deg); }
.browser { position: relative; background: #fff; border-radius: 14px; box-shadow: 0 24px 50px rgba(13,59,102,.18), 0 2px 6px rgba(13,59,102,.08); overflow: hidden; border: 1px solid var(--line); }
.browser-bar { background: #eef1f6; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; } .dots i { width: 11px; height: 11px; border-radius: 50%; background: #c8cfdb; display: block; }
.url { flex: 1; min-width: 0; background: #fff; border-radius: 7px; padding: 5px 12px; font-size: 12.5px; color: #5f6368; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-pair { position: relative; height: 500px; background: var(--purple-soft); }
.shot { margin: 0; position: absolute; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 14px 30px rgba(13,59,102,.22); border: 1px solid var(--line); }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.shot figcaption { position: absolute; left: 10px; bottom: 10px; background: rgba(13,59,102,.92); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 6px; }
.shot.main { left: 18px; top: 18px; width: 60%; height: 464px; z-index: 2; }
.shot.back { right: 16px; bottom: 30px; width: 50%; height: 222px; }
.shot.back figcaption { left: auto; right: 10px; }
.hero-caption { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: 13.5px; color: var(--dim); padding-left: 40px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(13,59,102,.05); text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(13,59,102,.12); }
.art { height: 178px; display: flex; align-items: center; justify-content: center; padding: 18px; }
.art.photo { padding: 14px 14px 0; align-items: flex-end; }
.art.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; border-radius: 8px 8px 0 0; box-shadow: 0 3px 10px rgba(0,0,0,.1); display: block; }
.art.photo.fit { padding: 14px; align-items: center; }
.art.photo.fit img { object-fit: contain; box-shadow: none; border-radius: 0; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-family: var(--serif); font-weight: 900; font-size: 19px; margin: 0; line-height: 1.25; }
.card p { margin: 0; font-size: 14.5px; color: var(--dim); }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13.5px; color: var(--dim); }
.more { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 14.5px; color: var(--navy); }
.also { margin: 16px 0 0; font-size: 14.5px; color: var(--dim); }
.also b { color: var(--ink); font-weight: 600; }

/* drawn card art for tools without public screenshots */
.flow-art { display: flex; align-items: center; gap: 12px; }
.win { width: 92px; height: 82px; background: #fff; border-radius: 9px; box-shadow: 0 3px 10px rgba(0,0,0,.1); display: grid; place-items: center; font: 800 26px Arial, sans-serif; color: #fff; position: relative; padding-top: 12px; }
.win::before { content: "• • •"; position: absolute; top: 3px; left: 8px; font-size: 9px; color: #9aa4b5; letter-spacing: 1px; }
.win span { width: 54px; height: 46px; border-radius: 8px; display: grid; place-items: center; }
.flow-art .arrow { font-size: 26px; color: var(--dev); font-weight: 700; }
.cls { width: 100%; background: #fff; border-radius: 9px; padding: 12px; box-shadow: 0 3px 10px rgba(0,0,0,.08); font: 12px Arial, sans-serif; color: #3c4043; }
.cls .row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cls .b1 { background: #1a73e8; color: #fff; border-radius: 4px; padding: 4px 9px; font-weight: 600; }
.cls .b2 { border: 1px solid #1a73e8; color: #1a73e8; border-radius: 4px; padding: 3px 9px; font-weight: 600; }
.cls .rev { margin-top: 9px; display: flex; gap: 6px; } .cls .rev span { flex: 1; background: #fef7e0; border-radius: 4px; padding: 4px 6px; font-weight: 600; color: #8a5a00; text-align: center; }

/* ---------- how I work / about / contact ---------- */
.how-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.how-row > div { padding: 24px 28px; display: flex; gap: 18px; align-items: flex-start; }
.how-row > div + div { border-left: 1px solid var(--line); }
.hicon { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; }
.how-row h3 { margin: 4px 0 6px; font-family: var(--serif); font-size: 20px; font-weight: 900; }
.how-row p { margin: 0; font-size: 14.5px; color: var(--dim); }
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.about p { margin: 0 0 14px; font-size: 17px; max-width: 40em; }
.skills { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.skills h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); }
.skills div { display: flex; flex-wrap: wrap; gap: 8px; }
.skills span { font-family: var(--mono); font-size: 12.5px; background: var(--blue-soft); color: var(--navy); padding: 4px 10px; border-radius: 6px; }
.contact { margin-top: 56px; border-radius: 18px; background: var(--navy); color: #fff; padding: 34px clamp(22px, 4vw, 40px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.contact h2 { font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); margin: 0 0 6px; line-height: 1.2; }
.contact p { margin: 0; opacity: .85; }
.contact .email { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.contact code { font-family: var(--mono); font-size: 15px; border: 1px solid rgba(255,255,255,.5); padding: 10px 14px; border-radius: 10px; user-select: all; }
.contact a.btn { border-color: #fff; background: #fff; color: var(--navy); }

/* ---------- footer ---------- */
.site-foot { margin-top: 48px; padding-block: 22px 34px; border-top: 1.5px solid var(--rule); display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; font-size: 14px; color: var(--dim); }
.site-foot b { color: var(--ink); font-weight: 600; }
.site-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--dim); }

/* ---------- case study / project pages ---------- */
.crumb { margin: 24px 0 0; font-size: 14px; color: var(--dim); }
.crumb a { color: var(--dim); }
.crumb b { color: var(--navy); font-weight: 600; }
.cs-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 54px; align-items: center; padding-block: 26px 46px; }
.cs-head .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cs-head h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; text-wrap: balance; }
.tagline { font-size: 19px; color: var(--dim); margin: 0 0 24px; max-width: 30em; }
.cs-facts { display: flex; flex-wrap: wrap; gap: 16px 30px; margin-top: 28px; }
.cs-facts b { display: block; font-family: var(--serif); font-size: 24px; color: var(--navy); line-height: 1.2; }
.cs-facts span { font-size: 13.5px; color: var(--dim); }
.cs-shot { border-radius: 18px; padding: clamp(14px, 2.4vw, 26px); display: flex; justify-content: center; align-items: center; min-height: 240px; }
.cs-shot img { width: 100%; max-height: 440px; object-fit: cover; object-position: 50% 0; border-radius: 10px; box-shadow: 0 18px 40px rgba(13,59,102,.18); display: block; }
.cs-shot.fit img { object-fit: contain; box-shadow: none; }
.blk { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px 40px; padding-block: 38px; border-top: 1.5px solid #d5dfeb; }
.label { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); padding-top: 6px; }
.label h2 { font-family: var(--serif); font-size: 26px; letter-spacing: -.01em; text-transform: none; color: var(--ink); margin: 6px 0 0; line-height: 1.2; }
.prose p { margin: 0 0 14px; max-width: 46em; font-size: 17px; }
.prose p.big { font-size: 20px; line-height: 1.55; }
.prose ul { margin: 0 0 14px; padding-left: 22px; max-width: 46em; font-size: 17px; }
.prose li { margin-bottom: 6px; }
.plain { font-family: var(--mono); font-size: 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: #b3402a; overflow-wrap: anywhere; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.feat img { width: 100%; height: 200px; object-fit: cover; object-position: 50% 0; display: block; border-bottom: 1px solid var(--line); }
.feat div { padding: 14px 16px 16px; }
.feat h3, .box h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 17.5px; line-height: 1.3; }
.feat p, .box p { margin: 0; font-size: 14.5px; color: var(--dim); }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.box p b { color: var(--ink); font-weight: 600; }
.res b { display: block; font-family: var(--serif); font-size: 28px; color: var(--navy); line-height: 1.15; }
.res span { font-size: 14px; color: var(--dim); }
.steps { display: flex; align-items: stretch; gap: 0; margin: 4px 0 20px; flex-wrap: wrap; }
.step { flex: 1 1 180px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.step b { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.step span { font-size: 14.5px; color: var(--dim); }
.step code { font-family: var(--mono); font-size: 12.5px; color: #673ab7; }
.steps .arrow { align-self: center; padding: 0 10px; color: var(--teal); font-size: 22px; font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.split figure { margin: 0; }
.split img { width: 100%; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(13,59,102,.08); display: block; }
.split figcaption { font-size: 13px; color: var(--dim); margin-top: 8px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stack span { font-family: var(--mono); font-size: 12.5px; background: var(--blue-soft); color: var(--navy); padding: 4px 10px; border-radius: 6px; }
.links { display: flex; gap: 12px; flex-wrap: wrap; }
.links a { text-decoration: none; color: var(--navy); font-weight: 600; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; }
.links a:hover { border-color: var(--navy); }
.next { margin-top: 40px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 26px; background: var(--navy); color: #fff; border-radius: 14px; font-weight: 600; text-decoration: none; }
.next span { opacity: .75; font-weight: 500; }
.next:hover { background: #0a2f52; }
.note-box { background: var(--proto-bg); border: 1px solid #f1d58a; border-radius: 12px; padding: 14px 18px; font-size: 15px; color: #5c4300; max-width: 46em; }

/* ---------- privacy / simple text pages ---------- */
.doc { max-width: 760px; padding-block: 30px 10px; }
.doc h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4vw, 42px); line-height: 1.15; margin: 10px 0 8px; }
.doc h2 { font-family: var(--serif); font-size: 22px; margin: 34px 0 10px; }
.doc p, .doc li { font-size: 16.5px; }
.doc .updated { color: var(--dim); margin-top: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { background: var(--blue-soft); }
.doc code { font-family: var(--mono); font-size: 14px; background: #fff; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.doc .table-wrap { overflow-x: auto; }
.policy-list { display: grid; gap: 14px; margin-top: 20px; }
.policy-list a { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; font-weight: 600; color: var(--navy); }
.policy-list a:hover { border-color: var(--navy); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cards, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero, .cs-head, .about, .split { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 36px 10px; gap: 40px; }
  .hero-art::before { right: -4px; }   /* the tilted backdrop otherwise pokes past the screen edge */
  .how-row, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .how-row > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .blk { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .cards, .grid4 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { padding-left: 16px; border-left-width: 5px; }
  .hero .lede, .hero .btns, .facts { margin-left: 21px; }
  .shot-pair { height: 400px; }
  .shot.main { width: 72%; height: 370px; left: 10px; top: 12px; }
  .shot.back { width: 52%; height: 160px; right: 8px; bottom: 16px; }
  .hero-art::before { inset: -14px -8px 40px 30px; }
  .hero-caption { padding-left: 0; }
  .site-nav { gap: 6px 14px; font-size: 14.5px; }
  .site-nav a.cta { padding: 6px 12px; }
  .site-nav a.nav-approach { display: none; }   /* keeps the phone menu on one line; How I Work is still on the homepage */
  .brand img { width: 48px; height: 48px; }
  .brand b { font-size: 21px; }
  .steps .arrow { display: none; }
  .steps { gap: 10px; }
}

/* Five-card row (Web Apps & Personal Projects): 3 cards on top, 2 wider cards below, so no card sits alone. */
.cards.five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cards.five > .card { grid-column: span 2; }
.cards.five > .card:nth-child(n+4) { grid-column: span 3; }
.cards.five > .card:nth-child(n+4) .art { height: 210px; }
@media (max-width: 1080px) {
  .cards.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.five > .card, .cards.five > .card:nth-child(n+4) { grid-column: span 1; }
  .cards.five > .card:last-child { grid-column: span 2; }
}
@media (max-width: 600px) {
  .cards.five { grid-template-columns: minmax(0, 1fr); }
  .cards.five > .card:last-child { grid-column: span 1; }
}
