/* ULXN v2.1.5 — Editorial Utility UI. No remote font requests. */
:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --surface: #efeae0;
  --surface-strong: #e6dfd3;
  --ink: #1c1a16;
  --muted: #655f56;
  --line: #dcd4c8;
  --line-strong: #8c8275;
  --accent: #800000;
  --accent-hover: #650000;
  --on-accent: #fff;
  --selection-bg: #800000;
  --selection-ink: #fff;
  --focus: #800000;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1200px;
  --gutter: clamp(20px, 3.5vw, 48px);
  --radius-sm: 4px;
  --radius-md: 8px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1916;
  --surface: #25221d;
  --surface-strong: #302b24;
  --ink: #f3eee4;
  --muted: #bdb3a4;
  --line: #484036;
  --line-strong: #8d8070;
  --accent: #d394a5;
  --accent-hover: #e5afbd;
  --on-accent: #1b1916;
  --selection-bg: #800000;
  --selection-ink: #fff;
  --focus: #d394a5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
::selection { color: var(--selection-ink); background: var(--selection-bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 100; top: 16px; left: 16px; padding: 12px 16px; transform: translateY(-180%); background: var(--bg); border: 1px solid var(--line-strong); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: fixed; z-index: 30; inset: 0 0 auto; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; min-height: 28px; font-size: 18px; font-weight: 700; letter-spacing: -.04em; }
.brand span { color: var(--accent); }
.brand-question { display: block; color: var(--muted); font: 11px/1.4 var(--font-mono); }
.header-actions, .nav { display: flex; align-items: center; }
.header-actions { gap: 24px; }
.nav { gap: 32px; }
.nav, .section-label, .primary-link, .contact-endnote, .site-footer { font-family: var(--font-mono); font-weight: 400; }
.nav { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 6px; }
.nav a:hover, .nav a:focus-visible, .site-footer a:hover { color: var(--accent); text-decoration: underline; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink); cursor: pointer; transition: background 180ms, border-color 180ms; }
.theme-toggle:hover { background: var(--surface); border-color: var(--line-strong); }
.theme-toggle:active { background: var(--surface-strong); }
.theme-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
html:not([data-theme="dark"]) .sun-icon, html[data-theme="dark"] .moon-icon { display: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }
.hero { display: flex; align-items: center; min-height: 100svh; padding-block: 108px 48px; }
.hero-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .7fr); gap: 48px; width: 100%; align-items: end; }
.hero h1 { margin: 0; font-size: clamp(56px, 6.8vw, 88px); line-height: 1.12; letter-spacing: -.035em; }
.hero-line { display: block; white-space: nowrap; }
.hero-line-serif { font-style: italic; }
.hero-secret { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; pointer-events: none; }
.hero-aside { padding-bottom: 12px; }
.hero-note { max-width: 26ch; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.section { border-top: 1px solid var(--line); }
.section-label { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.stuffs-section { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding-block: 100px 32px; }
.section-header { display: flex; align-items: baseline; gap: 32px; margin-bottom: 24px; }
.section-header h2, .contact-heading h2 { margin: 0; font-size: 36px; line-height: 1.18; letter-spacing: -.025em; }
.project { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.project + .project { margin-top: 16px; }
.project-compact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.project-intro { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 24px; }
.project h3 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; }
.project-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.project-description { max-width: 46ch; margin: 0; font-size: 15px; line-height: 1.6; }
.project-actions { display: flex; margin-top: auto; padding-top: 4px; }
.primary-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: var(--radius-sm); background: var(--ink); color: var(--bg); font-size: 11px; line-height: 1.4; letter-spacing: .04em; transition: background 180ms, border-color 180ms; }
.primary-link:hover { background: var(--muted); border-color: var(--muted); }
.primary-link:active { background: var(--ink); border-color: var(--ink); }
.project-preview { display: grid; place-items: center; min-width: 0; padding: 24px; border-left: 1px solid var(--line); background: var(--bg); }
.preview-frame { width: 100%; max-width: 480px; border: 1px solid #b3aa9c; border-radius: 6px; overflow: hidden; background: #f7f7f3; color: #171715; }
.pdflane-frame { background: #f5f5f4; font-family: Arial, Helvetica, sans-serif; }
.contact-screen { display: flex; flex-direction: column; min-height: 100svh; }
.contact { display: grid; flex: 1; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-rows: 1fr; gap: 24px 64px; align-items: center; padding-block: 108px 24px; }
.contact-heading h2 { margin-top: 24px; max-width: 13ch; font-size: clamp(36px, 4vw, 48px); }
.contact-copy { max-width: 44ch; margin: 0 0 32px; font-size: 16px; line-height: 1.65; }
.contact-links { border-top: 1px solid var(--line); }
.contact-links a { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--line); transition: background 180ms, color 180ms; }
.contact-links a:hover { background: var(--surface); color: var(--accent); }
.contact-name { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.contact-name svg { width: 16px; height: 16px; flex: 0 0 auto; fill: currentColor; }
.contact-detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; text-align: right; }
.contact-endnote { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.site-footer { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 24px; align-items: center; flex: none; border-top: 1px solid var(--line); padding-block: 16px; font-size: 11px; line-height: 1.5; }
.site-footer p { margin: 0; }
.footer-note { text-align: center; color: var(--muted); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; justify-self: end; }

.error-page { display: flex; flex-direction: column; min-height: 100svh; }
.error-main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 64px; }
.error-main h1 { margin: 24px 0 32px; font-size: clamp(48px, 8vw, 88px); line-height: 1.12; letter-spacing: -.035em; }
.error-page .site-footer { margin-top: auto; }
@media (max-width: 900px) {
  .hero-main { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: clamp(48px, 8.5vw, 76px); }
  .hero-note { max-width: 36ch; }
  .project-compact { grid-template-columns: 1fr; }
  .project-preview { display: none; }
  .contact { grid-template-columns: 1fr; grid-template-rows: auto; align-content: center; gap: 32px; }
  .contact-heading h2 { max-width: 20ch; }
  .contact-body { max-width: 640px; }
}
@media (max-width: 620px) {
  :root { --gutter: 20px; }
  .header-inner { min-height: 72px; gap: 8px; }
  .header-actions { gap: 8px; }
  .nav { gap: 16px; }
  .hero { padding-block: 96px 40px; }
  .hero h1 { font-size: clamp(36px, 10vw, 60px); }
  .hero-note { font-size: 15px; }
  .section-header { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 20px; }
  .section-header h2 { font-size: 28px; }
  .stuffs-section { padding-block: 96px 24px; }
  .project-intro { padding: 16px; gap: 8px; }
  .project h3 { font-size: 25px; }
  .project-actions, .primary-link { width: 100%; }
  .contact { padding-block: 96px 20px; gap: 24px; }
  .contact-heading h2 { margin-top: 12px; font-size: 32px; max-width: 15ch; }
  .contact-copy { margin-bottom: 20px; font-size: 15px; }
  .contact-links a { grid-template-columns: 1fr; gap: 4px; padding-block: 10px; }
  .contact-detail { padding-left: 28px; text-align: left; }
  .site-footer { grid-template-columns: 1fr auto; gap: 4px 12px; padding-block: 12px 20px; }
  .footer-note { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .nav { gap: 12px; font-size: 10px; }
  .header-actions { gap: 4px; }
}
@media (max-height: 700px) {
  .hero, .contact { padding-top: 88px; }
  .stuffs-section { padding-block: 88px 24px; }
  .contact { gap: 16px 48px; padding-bottom: 16px; }
  .contact-copy { margin-bottom: 16px; }
}

/* Existing character effect: timing and word-only triggers preserved. */
.word-switch { display: inline-block; white-space: nowrap; pointer-events: auto; cursor: pointer; }
.word-clip {
  display: inline-block;
  overflow: visible;
  vertical-align: baseline;
}
.flip-char {
  display: inline-block;
  position: relative;
  vertical-align: top;
  width: var(--from-w, max-content);
  transition: width .10s cubic-bezier(.16, 1, .3, 1) var(--flip-stagger, 0s);
}
.headline--hovered .flip-char { width: var(--to-w, max-content); }
.flip-char-back,
.flip-char-front {
  display: inline-block;
  transition: opacity .10s cubic-bezier(.16, 1, .3, 1) var(--flip-stagger, 0s),
    filter .10s cubic-bezier(.16, 1, .3, 1) var(--flip-stagger, 0s),
    transform .10s cubic-bezier(.16, 1, .3, 1) var(--flip-stagger, 0s);
}
.flip-char-front { opacity: 1; filter: blur(0); transform: translateY(0); }
.flip-char-back {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  filter: blur(5px);
  transform: translateY(4px);
}
.headline--hovered .flip-char-front {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(-4px);
}
.headline--hovered .flip-char-back { opacity: 1; filter: blur(0); transform: translateY(0); }


/* Illustrations of the projects retain their own product UI. */
.pdflane-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #d6d6d3;
  background: #f5f5f4;
}
.pdflane-mini-header strong { font-size: 0.78rem; letter-spacing: -0.04em; }
.pdflane-mini-header strong span { font-weight: 400; }
.pdflane-mini-header > span { color: #666; font-size: 0.56rem; white-space: nowrap; }
.pdflane-preview-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.22rem;
  padding: 0.85rem;
}
.pdflane-preview-content > strong {
  color: #1d1d1d;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.05em;
}
.pdflane-preview-content > span { color: #626262; font-size: 0.58rem; }
.pdflane-mini-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.7rem;
  border: 1px solid #d6d6d3;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
  text-align: center;
  font-size: 0.55rem;
}
.pdflane-mini-tools > * { padding: 0.45rem 0.1rem; border-right: 1px solid #d6d6d3; font-weight: 400; }
.pdflane-mini-tools > :last-child { border-right: 0; }
.pdflane-mini-tools b { background: #1d1d1d; color: #fff; }
.pdflane-mini-workspace { display: grid; grid-template-columns: 39% 61%; margin-top: 0.25rem; border: 1px solid #d6d6d3; border-radius: 3px; background: #fff; }
.pdflane-mini-source, .pdflane-mini-panel { display: flex; flex-direction: column; min-width: 0; padding: 0.65rem; }
.pdflane-mini-source { border-right: 1px solid #d6d6d3; }
.pdflane-mini-source b { display: flex; justify-content: space-between; gap: 0.2rem; font-size: 0.52rem; }
.pdflane-mini-source b span { color: #626262; font-weight: 400; }
.pdflane-mini-drop { display: grid; place-items: center; min-height: 3.7rem; margin-top: 0.5rem; padding: 0.4rem; border: 1px dashed #aaa; color: #626262; font-size: 0.52rem; text-align: center; }
.pdflane-mini-panel small { color: #626262; font-size: 0.44rem; letter-spacing: 0.06em; }
.pdflane-mini-panel b { margin-top: 0.18rem; font-size: 0.61rem; font-weight: 500; letter-spacing: -0.025em; }
.pdflane-mini-panel span { margin-top: 0.22rem; color: #626262; font-size: 0.48rem; }
.preview-bar {
  min-height: 2.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #d4d4ce;
  background: #ecece7;
}

.preview-bar strong {
  font-size: 0.68rem;
  letter-spacing: -0.02em;
}

.preview-bar span {
  min-width: 0;
  overflow: hidden;
  color: #666662;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-content {
  padding: clamp(1rem, 3vw, 1.8rem);
}

.preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.preview-heading small {
  color: #6f6f6a;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.preview-heading p {
  margin: 0.32rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.preview-status {
  padding: 0.34rem 0.45rem;
  border: 1px solid #aebd62;
  border-radius: var(--radius-sm);
  background: #e8f4ae;
  font-size: 0.48rem;
  font-weight: 700;
  white-space: nowrap;
}

.preview-fields {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.preview-fields > div {
  border: 1px solid #d2d2cc;
  background: #fff;
}

.preview-fields > div {
  padding: 0.75rem;
}

.preview-fields span {
  color: #6f6f6a;
  font-size: 0.52rem;
}

.preview-fields strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.58rem;
}


/* Classic framed panels: fine outer rule, dashed inset and corner marks. */
.project { position: relative; background: var(--bg); padding: 12px; gap: 0; }
.project::before { content: ""; position: absolute; inset: 12px; border: 1px dashed var(--line-strong); border-radius: 6px; pointer-events: none; }
.project::after { content: ""; position: absolute; inset: 20px; pointer-events: none;
  background: linear-gradient(var(--ink),var(--ink)) left top/10px 1px,
    linear-gradient(var(--ink),var(--ink)) left top/1px 10px,
    linear-gradient(var(--ink),var(--ink)) right top/10px 1px,
    linear-gradient(var(--ink),var(--ink)) right top/1px 10px,
    linear-gradient(var(--ink),var(--ink)) left bottom/10px 1px,
    linear-gradient(var(--ink),var(--ink)) left bottom/1px 10px,
    linear-gradient(var(--ink),var(--ink)) right bottom/10px 1px,
    linear-gradient(var(--ink),var(--ink)) right bottom/1px 10px;
  background-repeat: no-repeat;
}
.project-intro { padding: 24px; }
.project-preview { border-left-style: dashed; background: var(--surface); border-radius: 0 6px 6px 0; }
.preview-frame { border-radius: 4px; }



.theme-toggle:hover { background: transparent; border-color: transparent; }
.theme-icon { transition: transform 420ms cubic-bezier(.2,.8,.2,1); }
.theme-toggle:hover .theme-icon, .theme-toggle:focus-visible .theme-icon { transform: rotate(360deg); }
.footer-identity { white-space: nowrap; }
.site-version { color: var(--muted); }
@media (max-width: 620px) {
  .project { padding: 8px; }
  .project::before { inset: 8px; }
  .project::after { inset: 15px; width: auto; }
  .project-intro { padding: 20px 16px; }
  .site-footer { column-gap: 8px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; transition-delay: 0ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .flip-char-front, .flip-char-back { filter: none !important; transform: none !important; }
}

/* Night palette for the original project illustrations. */
html[data-theme="dark"] .project-preview .preview-frame { background:#252624; color:#f2f1ed; border-color:#555650; }
html[data-theme="dark"] .project-preview :is(.preview-bar,.pdflane-mini-header) { background:#30312e; border-color:#53554e; }
html[data-theme="dark"] .project-preview :is(.preview-fields>div,.pdflane-mini-tools,.pdflane-mini-workspace) { background:#21221f; border-color:#52544e; }
html[data-theme="dark"] .project-preview :is(.preview-bar span,.preview-heading small,.preview-fields span,.pdflane-mini-header>span,.pdflane-preview-content>span,.pdflane-mini-source b span,.pdflane-mini-drop,.pdflane-mini-panel small,.pdflane-mini-panel span) { color:#c2c4bb; }
html[data-theme="dark"] .pdflane-preview-content>strong { color:#f2f1ed; }
html[data-theme="dark"] .pdflane-mini-tools b { background:#e8e9e4; color:#20221e; }
html[data-theme="dark"] .pdflane-mini-tools>*, html[data-theme="dark"] .pdflane-mini-source { border-color:#52544e; }
html[data-theme="dark"] .preview-status { background:#384826; border-color:#697d48; color:#e5f1cc; }
