/* Nolan Martin portfolio — Ukiyo-e + Swiss grid */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Kaisei Decol";
  src: url("../fonts/KaiseiDecol-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #EEE1C6;
  --paper: #E8DCC2;
  --ink: #1C1A22;
  --muted: #4A4552;
  --purple: #5A2D81;
  --plum: #3A1A55;
  --vermilion: #A3301F;
  --indigo: #2E3A5C;
  --indigo-soft: #5B6B8C;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Kaisei Decol", "Times New Roman", serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5.5rem; }
@media (max-width: 840px) {
  html { scroll-padding-top: 0; }
  .section { scroll-margin-top: var(--nav-h, 11.5rem); }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.36 0 0 0 0 0.28 0 0 0 0 0.16 0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>");
  min-height: 100%;
}

img, svg { max-width: 100%; height: auto; }
button, a { font-family: inherit; }
h1, h2, h3, .display, .title-face, .role-face {
  font-family: var(--font-display);
  font-weight: 700;
  font-synthesis: none;
}
h3 { margin: 0; }
dl, dd, dt { margin: 0; }
a { color: var(--purple); }
.hero-meta a { color: var(--ink); font-weight: 700; }
.btn:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.btn:hover { color: inherit; }


/* Skip link */
.skip {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 80;
  transform: translateY(-160%);
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--purple);
  padding: 10px 16px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}
.skip:focus { transform: translateY(12px); outline: 3px solid var(--purple); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 20px 44px;
  overflow: visible;
}

/* Focus */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.cred-card a:focus-visible { outline-color: var(--cream); }

/* Type helpers */
.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.body { font-size: 16px; line-height: 1.6; color: var(--ink); margin: 0; }
.col { border-top: 3px solid var(--ink); padding-top: 14px; min-width: 0; }

/* Buttons */
.btn {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 12px 20px;
  min-height: 44px;
  box-sizing: border-box;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--purple); color: var(--cream); border-color: var(--purple); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  align-items: end;
}
.hero h1 {
  margin: 10px 0 0;
  font-size: clamp(48px, 9vw, 116px);
  letter-spacing: 0.03em;
  line-height: 0.95;
  font-weight: 700;
}
.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.hero-bar { width: 64px; height: 8px; background: var(--purple); display: inline-block; }
.hero-role-name { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; }
.hero-role-sub { font-size: 14px; color: var(--muted); }
.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.hero-meta div { border-top: 1px solid var(--ink); padding-top: 6px; }
.hero-meta dd { margin: 2px 0 0; font-size: 14px; }
.hero-art { position: relative; min-width: 0; }
.hero-art svg { display: block; width: 100%; height: auto; }
.hanko-nm {
  position: absolute;
  right: 4px;
  bottom: 22px;
  background: var(--vermilion);
  color: var(--cream);
  width: clamp(48px, 6vw, 64px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: 0.02em;
  border-radius: 4px;
  box-shadow: inset 0 0 0 3px var(--vermilion), inset 0 0 0 5px #EEE1C699;
  transform: rotate(-4deg);
  font-family: var(--font-sans);
}

/* Idle motion */
.uk-crest { transform-box: fill-box; transform-origin: 50% 100%; animation: uk-bob 8s ease-in-out infinite; }
@keyframes uk-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-0.8deg); }
}
.uk-foam { transform-box: fill-box; transform-origin: center; animation: uk-foam 7s ease-in-out infinite; }
@keyframes uk-foam {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(2px, -3px); }
}
.uk-cloud { animation: uk-cloud 12s linear infinite; }
@keyframes uk-cloud { from { transform: translateX(0); } to { transform: translateX(-60px); } }

.cloud-band { display: block; margin-top: 26px; width: 100%; height: 28px; }
.cloud-band-mobile { display: none; }

/* Nav */
.section-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 8px;
  margin-top: 6px;
  border-bottom: 1px solid rgba(28, 26, 34, 0.2);
  background: var(--cream);
}
.section-nav a {
  background: transparent;
  border: none;
  border-top: 5px solid transparent;
  padding: 12px 10px 10px;
  min-height: 48px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
}
.section-nav a[aria-current="true"],
.section-nav a.is-active { border-top-color: var(--purple); }
.section-nav .num { font-size: 11px; font-weight: 800; color: var(--muted); }
.section-nav a.is-active .num,
.section-nav a[aria-current="true"] .num { color: var(--purple); }
.section-nav .lab { font-size: clamp(14px, 1.6vw, 17px); font-weight: 600; letter-spacing: 0.01em; }
.section-nav a.is-active .lab,
.section-nav a[aria-current="true"] .lab { font-weight: 900; }

@media (max-width: 840px) {
  .cloud-band-desktop { display: none !important; }
  .cloud-band-mobile { display: block !important; }
  .section-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: var(--cream);
    border-bottom: 1px solid rgba(28, 26, 34, 0.25);
  }
  .section-nav a { min-height: 44px; padding: 8px; }
}

/* Section heads */
.section { margin-top: 56px; }
#main { outline: none; }
.section-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(28, 26, 34, 0.2);
}
.hanko {
  background: var(--vermilion);
  color: var(--cream);
  width: 40px;
  padding: 8px 0 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--vermilion), inset 0 0 0 4px #EEE1C680;
  flex: 0 0 auto;
  transform: rotate(-1.5deg);
}
.hanko .n { font-size: 13px; font-weight: 900; font-family: var(--font-sans); }
.hanko .l {
  writing-mode: vertical-rl;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink);
  font-weight: 700;
}
.rule { height: 8px; width: 64px; background: var(--purple); margin-top: 14px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-metrics { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid-lede { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.lede {
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-family: var(--font-sans);
}

.metric-v {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--purple);
  font-family: var(--font-sans);
}
.metric-l { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--muted); margin-top: 4px; }

/* Open box */
.open-box {
  background-color: #E8DCC2;
  color: var(--ink);
  border: 1px solid rgba(28, 26, 34, 0.25);
  border-left: 6px solid var(--purple);
  padding: 14px 18px;
  margin-top: 32px;
}
.open-box .kicker { color: var(--purple); }
.open-avail { margin: 4px 0 0; font-weight: 800; }

/* Cases */
.case-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.case-tabs button[aria-pressed="true"] {
  background: var(--purple);
  color: var(--cream);
  border-color: var(--purple);
}
.case-panel { display: none; }
.case-panel.is-on { display: block; }
.figure {
  display: inline-block;
  background: var(--plum);
  color: var(--cream);
  padding: 10px 14px;
  margin-top: 16px;
}
.figure .v { font-size: 28px; font-weight: 900; line-height: 1; font-family: var(--font-sans); }
.figure .l { font-size: 12px; margin-top: 4px; }
.owned, .outcomes { display: grid; gap: 10px; margin-top: 10px; }
.owned-row, .enh-row { display: flex; gap: 10px; }
.num-accent { font-weight: 900; color: var(--purple); font-size: 13px; flex: 0 0 auto; padding-top: 2px; }
.outcome { font-size: 14.5px; border-left: 4px solid var(--purple); padding-left: 12px; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { border: 1px solid var(--ink); padding: 3px 8px; font-size: 11.5px; font-weight: 600; }
.ext-link { display: inline-block; margin-top: 12px; color: var(--purple); font-weight: 800; font-size: 14px; text-underline-offset: 4px; }
.title-face { font-size: 22px; line-height: 1.2; margin-top: 8px; letter-spacing: 0.02em; font-weight: 700; }
.role-face { font-size: 18px; line-height: 1.25; letter-spacing: 0.02em; font-weight: 700; }

/* Ledger */
.intro { margin: 0 0 24px; max-width: 640px; }
.ledger { border-top: 3px solid var(--ink); }
.ledger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(28, 26, 34, 0.2);
}
.ledger-when {
  flex: 0 0 190px;
  max-width: 100%;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.dot { width: 9px; height: 9px; background: var(--vermilion); border-radius: 2px; flex: 0 0 auto; }
.when { font-size: 13px; font-weight: 800; color: var(--vermilion); letter-spacing: 0.02em; }
.ledger-body { flex: 1 1 260px; min-width: 0; }

/* Capabilities */
.cap-title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.cap-title .t { font-weight: 900; font-size: 17px; }
.cap-item { font-size: 15px; padding: 6px 0; border-top: 1px solid rgba(28, 26, 34, 0.13); }

/* Credentials */
.cred-card { background: var(--plum); color: var(--cream); padding: 22px; }
.cred-card .kicker { color: var(--cream); }
.cred-card a { color: var(--cream); font-size: 14px; font-weight: 800; text-underline-offset: 4px; }

/* Contact */
.email-xl {
  font-size: clamp(20px, 3.4vw, 34px);
  font-weight: 900;
  margin-top: 6px;
  word-break: break-word;
  letter-spacing: -0.02em;
  font-family: var(--font-sans);
}

footer.site-foot {
  margin-top: 44px;
  border-top: 3px solid var(--ink);
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 13px;
}
footer.site-foot .name { font-weight: 800; }
footer.site-foot a { color: var(--muted); font-weight: 700; }
footer.site-foot a.resume { color: var(--purple); font-weight: 800; }

/* Wave transition */
.uk-flood {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}
.uk-flood-inner {
  position: absolute;
  top: 0; bottom: 0;
  left: -6%;
  width: 145%;
  animation: uk-roll 0.48s cubic-bezier(0.55, 0, 0.35, 1) both;
}
@keyframes uk-roll {
  0% { transform: translateX(-100%); }
  42% { transform: translateX(0); }
  56% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .uk-crest, .uk-foam, .uk-cloud, .uk-sun, .uk-flood-inner { animation: none !important; }
  .uk-flood { display: none; }
}
