/* danielyoung.work: shared styles for Home, About, Work, Journal and Contact.
   Idea: the machine speaks in mono, the person speaks in serif, and the orange mark is the human hand.
   To change fonts, edit --serif, --sans and --mono below. */
:root {
  --bg: #e7e1d7; --text: #0c0c0b; --muted: rgba(12,12,11,.6); --line: rgba(12,12,11,.16); --card: rgba(12,12,11,.06);
  --panel: #fcfcfb; --button: #0c0c0b; --button-text: #fcfcfb;
  --accent: #ff4b1f;
  --sans: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --pad: clamp(16px, 3vw, 40px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d0d0c; --text: #ede8df; --muted: rgba(237,232,223,.6); --line: rgba(237,232,223,.16); --card: rgba(237,232,223,.07);
  --panel: #171716; --button: #ede8df; --button-text: #0d0d0c; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0c; --text: #ede8df; --muted: rgba(237,232,223,.6); --line: rgba(237,232,223,.16); --card: rgba(237,232,223,.07);
    --panel: #171716; --button: #ede8df; --button-text: #0d0d0c; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--sans); letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.page { padding: 0 var(--pad); }
.wrap { max-width: 1280px; margin: 0 auto; }
.label, .kicker { margin: 0; font: 400 12px/16px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kicker b { color: var(--accent); font-weight: 400; }
.display { margin: 0; font: 400 clamp(48px, 9vw, 148px)/.94 var(--serif); letter-spacing: -.025em; }
.display em, .h2 em, .big em { font-style: italic; color: var(--accent); }
.h2 { margin: 0; font: 400 clamp(36px, 5.6vw, 84px)/1 var(--serif); letter-spacing: -.02em; }
.lede { margin: 0; font: 400 clamp(19px, 1.9vw, 26px)/1.3 var(--sans); letter-spacing: -.015em; max-width: 34em; }
.lede span, .muted { color: var(--muted); }
.link { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease); padding-bottom: 2px; }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.section { margin-top: clamp(96px, 14vw, 200px); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-top: 16px; border-top: 1px solid var(--line); margin-bottom: clamp(32px, 5vw, 72px); }

/* word masks */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .1em 0; margin-bottom: -.1em; }
.wi { display: inline-block; }
html.anim [data-fade] { opacity: 0; transform: translateY(24px); }

/* progress line and cursor */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 120; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.cursor { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); mix-blend-mode: normal; display: grid; place-items: center; opacity: 0; transition: opacity .3s; }
.cursor.is-on { opacity: 1; }
.cursor span { font: 400 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.cursor.is-big span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; background: var(--button); color: var(--button-text); font: 500 15px/1 var(--sans); border: 0; cursor: pointer; will-change: transform; }
.btn--line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s; }
.btn--line:hover { box-shadow: inset 0 0 0 1px var(--text); }
.btn i { display: inline-block; transition: transform .5s var(--ease); font-style: normal; }
.btn:hover i { transform: translateX(4px); }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--pad) clamp(32px, 5vw, 64px); isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__inner { max-width: 1280px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(20px, 3vw, 40px); }
.hero__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__hint { display: flex; align-items: center; gap: 10px; }
.hero__hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { transform: scale(1.8); opacity: .3; } }

/* marquee */
.marquee { margin-top: clamp(48px, 7vw, 96px); overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); padding-right: clamp(24px, 3vw, 48px); font: 400 clamp(28px, 4vw, 56px)/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.marquee__item .m { font: 400 clamp(12px, 1.2vw, 14px)/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.marquee__item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }

/* draft versus crafted */
.cmp { position: relative; aspect-ratio: 16 / 9; min-height: 340px; overflow: hidden; border-radius: 10px; background: var(--panel); --pos: 50%; user-select: none; touch-action: pan-y; }
.cmp__layer { position: absolute; inset: 0; padding: clamp(20px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.cmp__draft { background: #d9d9d6; color: #6b6b68; font-family: var(--mono); background-image: linear-gradient(rgba(0,0,0,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.08) 1px, transparent 1px); background-size: 32px 32px; }
.cmp__draft { padding-right: 53%; }
.cmp__final { padding-left: 53%; }
.cmp__draft h3 { margin: 0; font: 500 clamp(19px, 2.7vw, 40px)/1.1 var(--sans); letter-spacing: -.02em; max-width: 14em; color: #55554f; }
.cmp__draft p { margin: 0; font-size: clamp(12px, 1.2vw, 14px); line-height: 1.6; max-width: 38em; }
.cmp__bars { display: flex; gap: 10px; }
.cmp__bars i { display: block; height: 64px; flex: 1; border: 1px dashed #9a9a95; border-radius: 4px; }
.cmp__draft .fake { align-self: flex-start; padding: 10px 18px; border-radius: 4px; background: #8b8b86; color: #e9e9e6; font-size: 13px; }
.cmp__final { background: #14110e; color: #f2ece1; clip-path: inset(0 0 0 var(--pos)); }
.cmp__final h3 { margin: 0; font: 400 clamp(30px, 4.8vw, 76px)/.96 var(--serif); letter-spacing: -.02em; max-width: 11em; }
.cmp__final h3 em { color: var(--accent); }
.cmp__final p { margin: 0; font: 400 clamp(15px, 1.5vw, 19px)/1.4 var(--sans); color: rgba(242,236,225,.7); max-width: 28em; }
.cmp__final .real { align-self: flex-start; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; font: 500 14px/1 var(--sans); }
.cmp__tag { position: absolute; top: 16px; padding: 6px 10px; border-radius: 999px; font: 400 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; z-index: 3; }
.cmp__tag--l { left: 16px; background: rgba(0,0,0,.12); color: #55554f; }
.cmp__tag--r { right: 16px; background: rgba(255,255,255,.14); color: #f2ece1; }
.cmp__bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); z-index: 4; pointer-events: none; }
.cmp__knob { position: absolute; top: 50%; left: var(--pos); width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; z-index: 5; pointer-events: none; font: 400 18px/1 var(--mono); box-shadow: 0 8px 32px rgba(255,75,31,.45); }
.cmp input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 6; }
.cmp input:focus-visible ~ .cmp__knob { outline: 2px solid var(--text); outline-offset: 3px; }
.cap { margin: 16px 0 0; max-width: 60ch; color: var(--muted); }

/* process */
.mode { display: inline-flex; padding: 4px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.mode button { font: 400 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 10px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background .3s, color .3s; }
.mode button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.step { position: relative; display: grid; grid-template-columns: 90px 1.1fr 1fr 1fr; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); }
.step::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.step__no { font: 400 12px/24px var(--mono); color: var(--muted); }
.step__name { margin: 0; font: 400 clamp(32px, 4vw, 56px)/1 var(--serif); letter-spacing: -.02em; }
.step__col { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.step__col h4 { margin: 0 0 8px; font: 400 12px/16px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.step__col p { margin: 0; }
.step__col--ai p { font: 400 14px/1.6 var(--mono); color: var(--muted); }
.step__col--me h4 { color: var(--accent); }
.step__col--me p { font: 400 clamp(19px, 1.7vw, 24px)/1.25 var(--serif); }
.steps[data-show="ai"] .step__col--me, .steps[data-show="me"] .step__col--ai { opacity: .18; transform: translateY(6px); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; border-top: 1px solid var(--line); }
.stat { padding: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 24px; }
.odo { display: flex; height: 1em; overflow: hidden; font: 400 clamp(96px, 20vw, 300px)/1 var(--serif); letter-spacing: -.04em; }
.odo__col { display: flex; flex: none; flex-direction: column; height: 20em; will-change: transform; }
.odo__col span { flex: none; height: 1em; line-height: 1; display: block; }
.stat p { margin: 0; max-width: 24em; color: var(--muted); }

/* work rail */
.rail { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--pad); margin: 0 calc(var(--pad) * -1); scroll-snap-type: x proximity; scroll-padding-left: var(--pad); cursor: grab; }
.rail::-webkit-scrollbar { display: none; }
.rail.is-drag { cursor: grabbing; scroll-snap-type: none; }
.rail.is-drag * { pointer-events: none; }
.rcard { flex: 0 0 auto; width: clamp(260px, 30vw, 440px); display: flex; flex-direction: column; gap: 14px; scroll-snap-align: start; }
.rcard__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 8px; background: var(--card); }
.rcard__media > * { transition: transform 1s var(--ease); }
.rcard:hover .rcard__media > * { transform: scale(1.05); }
.rcard__media img, .rcard__media > div { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.rcard__meta { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.rcard__meta h3 { margin: 0; font: 400 28px/1 var(--serif); letter-spacing: -.01em; }
.rcard__meta span { color: var(--muted); font-size: 14px; text-align: right; }

/* stand-in tiles */
.t-lawn { background: repeating-linear-gradient(90deg, #2f5d3a 0 22px, #3a6d46 22px 44px); }
.t-lawn2 { background: repeating-linear-gradient(0deg, #1f4429 0 14px, #26502f 14px 28px); }
.t-sky { background: linear-gradient(180deg, #f3c58a, #f7e7cf 70%); }
.t-ink { background: #161616; }
.t-navy { background: #16254d; }
.t-clock { background: #f2f2ef; }
.t-clock::after { content: ""; position: absolute; inset: 0; margin: auto; width: 34%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(#161616 0 62%, #d7d7d2 0); -webkit-mask: radial-gradient(circle, transparent 38%, #000 40%); mask: radial-gradient(circle, transparent 38%, #000 40%); }
.t-glow { background: #0b0b12; }
.t-glow::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 14px, rgba(120,170,255,.55) 14px 15px, transparent 15px 30px), repeating-linear-gradient(115deg, transparent 0 22px, rgba(255,140,200,.4) 22px 23px, transparent 23px 44px); }
.t-lights { background: #0a0b10 radial-gradient(circle at 30% 40%, rgba(255,60,40,.55) 0 3px, transparent 4px) 0 0 / 38px 38px, radial-gradient(circle at 70% 70%, rgba(255,200,120,.5) 0 2px, transparent 3px) 0 0 / 26px 26px; }

/* journal rows and generic index rows */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.row > a, .row > div { position: relative; display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; align-items: baseline; padding: clamp(20px, 2.6vw, 36px) 0; }
.row::before { content: ""; position: absolute; inset: 0; background: var(--text); transform: translateY(101%); transition: transform .6s var(--ease); }
.row:hover::before { transform: none; }
.row > * { transition: color .4s, padding .6s var(--ease); }
.row:hover > a { color: var(--bg); padding-left: 16px; padding-right: 16px; }
.row .row__t { font: 400 clamp(26px, 3.6vw, 52px)/1.04 var(--serif); letter-spacing: -.015em; }
.row .row__k { color: var(--muted); font-size: 15px; text-align: right; transition: color .4s; }
.row:hover .row__k { color: inherit; opacity: .7; }
.row--static::before { display: none; }
.peek { position: fixed; left: 0; top: 0; width: 260px; aspect-ratio: 4 / 5; z-index: 60; pointer-events: none; overflow: hidden; border-radius: 8px; opacity: 0; transform: scale(.8); transition: opacity .3s, transform .5s var(--ease); }
.peek.is-on { opacity: 1; transform: none; }
.peek > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .peek { display: none; } }

/* about + cv */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.principle { padding: 28px 24px 40px 0; border-bottom: 1px solid var(--line); }
.principle:nth-child(even) { padding-left: 24px; padding-right: 0; border-left: 1px solid var(--line); }
.principle b { display: block; font: 400 12px/16px var(--mono); color: var(--accent); margin-bottom: 20px; }
.principle h3 { margin: 0 0 12px; font: 400 clamp(28px, 3.2vw, 44px)/1.04 var(--serif); letter-spacing: -.015em; }
.principle p { margin: 0; color: var(--muted); max-width: 30em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 400 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 10px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .3s, color .3s, box-shadow .3s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.cv { margin-top: 32px; }
.cv__item { display: grid; grid-template-columns: 160px 1fr 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); transition: opacity .4s, transform .6s var(--ease); }
.cv__item:last-child { border-bottom: 1px solid var(--line); }
.cv__item.is-off { display: none; }
.cv__when { font: 400 12px/24px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cv__what { margin: 0; font: 400 clamp(24px, 2.6vw, 36px)/1.1 var(--serif); letter-spacing: -.01em; }
.cv__what span { display: block; margin-top: 6px; font: 400 14px/1.4 var(--sans); color: var(--muted); letter-spacing: 0; }
.cv__text { margin: 0; color: var(--muted); }

/* journal post */
.post { max-width: 720px; margin: 0 auto; padding: 160px var(--pad) 0; }
.post h1 { margin: 16px 0 40px; font: 400 clamp(40px, 6.4vw, 84px)/.98 var(--serif); letter-spacing: -.02em; }
.post p { margin: 0 0 1.3em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; }
.post h2 { margin: 2em 0 .6em; font: 400 clamp(26px, 3vw, 36px)/1.1 var(--serif); letter-spacing: -.01em; }
.post a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post__back { margin-top: 64px; display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* contact */
.pick { margin-top: 40px; display: flex; flex-direction: column; gap: 32px; max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field input[type=text], .field textarea { font: inherit; font-size: clamp(20px, 2vw, 28px); color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; width: 100%; transition: border-color .3s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--accent); }
.field ::placeholder { color: var(--muted); }
.big { margin: 0; font: 400 clamp(48px, 10vw, 168px)/.92 var(--serif); letter-spacing: -.03em; }
.mail { display: inline-flex; align-items: center; gap: 12px; font: 400 clamp(20px, 3vw, 40px)/1.1 var(--serif); }
.copy { font: 400 12px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 8px 12px; border: 0; border-radius: 999px; background: var(--card); color: var(--text); cursor: pointer; }

/* footer */
.foot { margin-top: clamp(96px, 14vw, 200px); padding: 24px var(--pad) 32px; border-top: 1px solid var(--line); }
.foot__in { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; color: var(--muted); font-size: 14px; }
.foot__in a { color: var(--text); }
.foot__top { background: none; border: 0; padding: 0; font: inherit; color: var(--text); cursor: pointer; }

.cta { text-align: left; }
.cta .big { margin-bottom: 40px; }

@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .cv__item { grid-template-columns: 1fr; gap: 8px; }
  .row > a, .row > div { grid-template-columns: 1fr; gap: 6px; }
  .row .row__k { text-align: left; }
  .principles { grid-template-columns: 1fr; }
  .principle:nth-child(even) { padding-left: 0; border-left: 0; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .cmp { aspect-ratio: auto; height: 480px; }
  .cmp__layer { padding-top: 56px; padding-bottom: 24px; justify-content: flex-start; }
  .cmp__draft { padding-left: 16px; padding-right: 54%; }
  .cmp__final { padding-right: 16px; padding-left: 54%; }
  .cmp__bars { display: none; }
  .cmp__draft p { display: none; }
  .cmp__tag--l, .cmp__tag--r { font-size: 9px; padding: 5px 8px; }
  .section__head { flex-direction: column; gap: 16px; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html.anim [data-fade] { opacity: 1; transform: none; }
  .hero__hint::before { animation: none; }
  * { transition-duration: .01ms !important; }
}

.pagehead { padding-top: clamp(128px, 16vw, 220px); }
.pagehead .lede { margin-top: 32px; }
