/* Hallmark · custom · editorial portfolio and technical index */
:root {
  --paper: #fdfcf9;
  --ink: #282420;
  --muted: #625952;
  --faint: #6d635b;
  --line: #ded9d0;
  --line-strong: #51483f;
  --rule: var(--line);
  --accent: #91472f;
  --panel: #373330;
  --on-panel: #fff8ef;
  --panel-muted: #dbcac0;
  --wash: #f4efe9;
  --warm: var(--wash);
  --purple: var(--accent);
  --purple-soft: var(--wash);
  --yellow: var(--accent);
  --yellow-soft: var(--wash);
  --gutter: clamp(24px, 6vw, 88px);
  --header-h: 70px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

:root[data-theme="dark"] {
  --paper: #1d1b19;
  --ink: #f6f0e7;
  --muted: #c8bcb0;
  --faint: #baada0;
  --line: #49413a;
  --line-strong: #a99686;
  --accent: #efb097;
  --panel: #302923;
  --wash: #312b26;
  --warm: var(--wash);
  --purple: var(--accent);
  --purple-soft: var(--wash);
  --yellow: var(--accent);
  --yellow-soft: var(--wash);
}

html, body { overflow-x: clip; }
html { scroll-padding-top: calc(var(--header-h) + 12px); scroll-behavior: auto; }
body { font-size: 1rem; line-height: 1.55; }
h1, h2, h3, p { word-break: keep-all; overflow-wrap: anywhere; }
a { text-decoration: none; text-underline-offset: .23em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--wash); color: var(--ink); }
.wrap { width: min(1320px, 100% - 2 * var(--gutter)); padding-inline: 0; }
.skip-link { position: fixed; }
.mast-shell { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--rule); }
.mast, .mast-tools, .mast nav, .taste-footer, .taste-footer nav { display: flex; align-items: center; flex-wrap: wrap; }
.mast, .taste-footer { justify-content: space-between; min-height: 69px; gap: 0 16px; }
.mast-tools, .taste-footer nav { gap: 0 16px; }
.mast nav { gap: 0 clamp(12px, 3vw, 36px); }
.mast a, .taste-footer a, .taste-section-head a { display: inline-flex; align-items: center; min-height: 44px; }
.mast nav a, .taste-footer nav a, .taste-section-head a { color: var(--muted); font-size: .875rem; }
.mast nav a[aria-current="page"] { position: relative; color: var(--accent); font-weight: 750; text-decoration: none; }
.mast nav a[aria-current="page"]::after { content: ""; position: absolute; inset: auto 0 5px; height: 2px; background: var(--accent); }
.mast button.theme-toggle { display: inline-grid; place-items: center; min-height: 36px; padding: 0 9px; color: var(--ink); }
.theme-toggle span { grid-area: 1 / 1; }
.theme-label-light, [data-theme="dark"] .theme-label-dark { visibility: hidden; }
[data-theme="dark"] .theme-label-light { visibility: visible; }
.wordmark { font-size: 1.22rem; font-weight: 800; letter-spacing: -.04em; }
.taste-footer { margin-top: 60px; border-top: 1px solid var(--rule); }

.taste-intro { padding-block: clamp(28px, 5vw, 68px) clamp(24px, 4vw, 44px); }
.taste-intro h1 { font-size: clamp(2.15rem, 5vw, 4rem); font-weight: 820; letter-spacing: -.06em; line-height: 1.1; text-wrap: balance; }
.taste-intro p { color: var(--muted); margin-top: 8px; }
.taste-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 16px; border-top: 2px solid var(--ink); padding-top: 4px; }
.taste-section-head h2 { font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -.04em; }
.taste-section-head small { margin-inline-start: .4em; font-size: .75rem; font-weight: 600; color: var(--muted); }
.taste-selection { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1fr); gap: clamp(24px, 5.7vw, 88px); align-items: stretch; }
.taste-lead {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: clamp(24px, 4vw, 56px);
  color: var(--on-panel);
  background: var(--panel);
  border-top: 4px solid var(--accent);
}
.taste-lead:hover { text-decoration: none; }
.taste-lead:focus-visible { outline-color: var(--accent); }
.taste-lead-copy { align-self: center; }
.taste-topic { font-size: .75rem; color: var(--accent); font-weight: 750; overflow-wrap: anywhere; }
.taste-lead .taste-topic, .taste-lead p { color: var(--panel-muted); }
.taste-lead h3 { font-size: clamp(1.9rem, 3.35vw, 3.45rem); line-height: 1.18; letter-spacing: -.05em; text-wrap: balance; }
.taste-lead p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 20px; max-width: 45ch; }
.taste-action { width: fit-content; display: flex; align-items: center; gap: 16px; font-size: .875rem; font-weight: 700; }
.taste-lead:hover .taste-action { text-decoration: underline; }
.taste-arrow { flex: none; width: 7px; height: 7px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.taste-entries { border-top: 1px solid var(--rule); }
.taste-entries a, .taste-feed a { border-bottom: 1px solid var(--rule); }
.taste-entries a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; min-height: 53px; padding: 8px 8px 8px 0; }
.taste-entries a:hover { text-decoration: none; }
.taste-entries a:hover h3 { text-decoration: underline; }
.taste-entries .taste-arrow { grid-area: 1 / 2 / 3; color: var(--accent); }
.taste-entries h3, .taste-feed h3 { font-size: 1rem; line-height: 1.35; letter-spacing: -.022em; }
.taste-reading-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); gap: clamp(24px, 5.7vw, 88px); margin-top: clamp(44px, 7vw, 92px); }
.taste-work { display: grid; gap: 28px; }
.taste-feed a { display: flex; flex-direction: column; min-height: 44px; padding: 8px 0; gap: 4px; }
.taste-feed time { order: 2; font: .75rem/1.5 var(--mono); color: var(--muted); }
.taste-feed p { color: var(--muted); font-size: .875rem; }

@media (prefers-reduced-motion: no-preference) {
  .taste-lead:active .taste-action, .taste-entries a:active h3 { transform: translateY(1px); }
  .taste-entries li { animation: taste-enter .44s var(--ease) both; animation-delay: calc(var(--entry-index) * 45ms); }
  @keyframes taste-enter { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 767px) {
  .taste-selection, .taste-reading-grid { grid-template-columns: minmax(0, 1fr); }
  .taste-selection { gap: 20px; }
  .taste-lead { min-height: 236px; }
}
@media (max-width: 380px) {
  .mast { padding-block: 4px; }
  .mast nav { column-gap: 12px; }
}

.project-showcase, .career-resume { max-width: 1140px; }
.work-intro {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-block: clamp(28px, 4vw, 52px) 28px;
}
.work-intro h1 { font-size: clamp(2.15rem, 4vw, 3.35rem); line-height: 1.12; letter-spacing: -.04em; }
.work-intro > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: .9rem;
  text-decoration: underline;
}
.project-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(20px, 3.5vw, 40px);
  background: var(--wash);
  color: var(--ink);
}
.project-lead h2 { font-size: clamp(1.65rem, 3vw, 2.75rem); letter-spacing: -.035em; line-height: 1.17; text-wrap: balance; }
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 12px;
  text-decoration: underline;
}
.case-link { color: var(--accent); }
.project-lead-context { padding-left: 24px; border-left: 1px solid var(--rule); }
.project-lead-context p { color: var(--muted); }
.project-lead-context .taste-tech { margin-block: 8px 0; color: var(--ink); }
.project-duration { margin-top: 16px; font: .82rem/1.5 var(--mono); }
.project-index, .resume-credentials { margin-top: clamp(40px, 6vw, 72px); }
.project-index h2, .resume-credentials h2 { font-size: clamp(1.45rem, 2.3vw, 1.85rem); letter-spacing: -.025em; margin: 0 0 12px; }
.project-index-list, .resume-credentials .certification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.project-index-list a {
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 4px 12px;
  padding: 16px 4px 20px 0;
  border-top: 1px solid var(--rule);
}
.project-index-list h3 { font-size: clamp(1.075rem, 1.6vw, 1.22rem); line-height: 1.35; text-wrap: pretty; }
.project-index-list p { color: var(--muted); font-size: .88rem; grid-column: 1 / -1; }
.project-index-list .taste-arrow { grid-area: 2 / 2; align-self: center; color: var(--accent); }
.project-index-list a:hover { text-decoration: none; }
.project-index-list a:hover h3 { text-decoration: underline; }
.resume-overview {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 24px clamp(32px, 6vw, 80px);
  padding-top: 24px;
  border-top: 2px solid var(--ink);
}
.resume-overview header h2 { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.16; letter-spacing: -.032em; }
.resume-role { margin: 8px 0; font-weight: 700; }
.resume-contributions h3 { font-size: 1.25rem; }
.resume-contributions ul { padding-left: 1.2em; margin: 8px 0 0; }
.resume-contributions li { margin-bottom: 8px; max-width: 68ch; overflow-wrap: anywhere; }
.resume-details { grid-column: 1 / -1; }
.resume-details h3 { font-size: 1.25rem; margin: 24px 0 8px; }
.resume-details .career-page-details { margin: 0; border-bottom: 1px solid var(--rule); }
.resume-details summary { min-height: 48px; }
.resume-credentials .certification-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.resume-credentials .certification-grid > li { padding: 12px 0 16px; border: 0; border-top: 1px solid var(--rule); }
.credential-details { display: grid; color: var(--muted); font-size: .87rem; }
@media (max-width: 767px) {
  .project-lead, .project-index-list, .resume-overview { grid-template-columns: minmax(0, 1fr); }
  .project-lead-context { padding: 16px 0 0; border: 0; border-top: 1px solid var(--rule); }
  .resume-credentials .certification-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
}
.project-index-list .taste-period { grid-area: 1 / 1; }
.project-index-list h3 { grid-area: 2 / 1; }
.project-index-list p { grid-row: 3; }
.resume-credentials h3 { font-size: 1.25rem; line-height: 1.35; }
@media (max-width: 767px) {
  .project-lead-context { padding-left: 8px; }
}

.taste-empty, .taste-feed p { color: var(--muted); }
.taste-empty { padding-block: 16px; }
.taste-tech { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--accent); font-size: .85rem; }
.taste-period { color: var(--muted); font: .82rem/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.resume-overview.career-page-company { padding-block: 24px; scroll-margin-top: 12px; }
.resume-overview + .resume-overview { margin-top: 24px; }
.resume-overview > .resume-employment { display: block; }
.resume-overview .resume-contributions h3 { font-size: 1.25rem; letter-spacing: -.015em; }
.resume-contributions h3:not(:first-child) { margin-top: 20px; }
.resume-contributions ul:not(.taste-tech) { list-style: disc; }
.resume-contributions .taste-tech { padding-left: 0; }
.resume-overview .career-page-details { border: 0; border-block: 1px solid var(--rule); border-radius: 0; }
.resume-overview .career-page-details > summary { display: list-item; min-height: 48px; padding: 12px 0; background: transparent; list-style: revert; font-weight: 700; }
.resume-details .career-page-details .career-content { padding-inline: 0; }
.resume-credentials.credentials { padding: 0; border: 0; }
.resume-scope ul { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); margin: 16px 0 24px; }
.taste-page-intro { padding-block: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 44px); }
.taste-page-intro h1 { line-height: 1.12; font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.04em; text-wrap: balance; }
.taste-page-intro p { margin-top: 12px; color: var(--muted); max-width: 64ch; }
.taste-detail-intro h1 { max-width: 36ch; font-size: clamp(2rem, 4vw, 3.3rem); }
.taste-detail-intro .article-back { min-height: 44px; margin-bottom: 4px; color: var(--accent); font-size: .875rem; }
.taste-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 12px; color: var(--muted); font-size: .875rem; }
.taste-meta time { font-family: var(--mono); font-size: .78rem; font-variant-numeric: tabular-nums; }
.taste-kb-grid, .taste-detail-grid { display: grid; align-items: start; gap: clamp(24px, 5vw, 76px); grid-template-columns: minmax(165px, .58fr) minmax(0, 2.2fr); }
.taste-article-grid { grid-template-columns: minmax(145px, .57fr) minmax(0, 2fr) minmax(140px, .62fr); column-gap: clamp(24px, 4vw, 60px); }
.taste-detail-grid { grid-template-columns: minmax(0, 2.3fr) minmax(185px, .7fr); }
.taste-kb-grid .kb-sidebar { padding: 8px 0 0; border: 0; border-top: 1px solid var(--ink); }
.taste-kb-grid .kb-nav-title { display: none; }
.taste-kb-grid .kb-nav a { align-items: baseline; min-height: 40px; padding: 9px 8px; border: 0; font-size: .875rem; }
.taste-kb-grid .kb-nav a[aria-current] { color: var(--accent); background: var(--wash); font-weight: 750; }
.taste-kb-grid .kb-nav { margin-bottom: 10px; }
.taste-kb-grid .kb-mobile { margin-bottom: 16px; }
.taste-list-panel, .taste-article-main, .taste-project-main { min-width: 0; }
.taste-search-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 12px; }
.taste-search-toolbar .kb-search { min-width: 0; margin: 0; }
.taste-search-toolbar .label-filter-controls { margin: 0; }
.taste-search-toolbar .label-filter-toolbar { display: grid; grid-template-columns: 9rem 6rem; gap: 8px; }
.taste-search-toolbar .kb-search input, .taste-search-toolbar .label-filter summary { min-height: 44px; border-color: var(--line-strong); background: var(--paper); }
.taste-search-toolbar .kb-search input:disabled { opacity: 1; }
.taste-search-toolbar .kb-search label { font-size: .875rem; }
.taste-search-toolbar .label-filter summary > span:last-child { margin-inline-start: auto; }
.taste-search-toolbar .label-filter-panel { inset-inline: auto 0; background: var(--paper); }
.taste-search-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; min-height: 60px; }
.taste-search-meta #list-count { margin: 0; font-size: .875rem; color: var(--muted); }
.taste-search-meta .selected-labels { min-width: 0; height: 60px; margin: 0; padding: 6px 5px; align-items: center; scrollbar-width: thin; }
.taste-article-result { display: block; padding-block: 14px 16px; border-top: 1px solid var(--rule); }
.taste-article-result:hover { text-decoration: none; }
.taste-article-result:hover .post-title, .taste-article-result:focus-visible .post-title { text-decoration: underline; }
.taste-article-result .doc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 5px; }
.taste-article-result .cat { font-size: .78rem; font-weight: 750; color: var(--accent); }
.taste-article-result time { color: var(--muted); font: .78rem/1.5 var(--mono); }
.taste-article-result .doc-title { font-size: clamp(1.13rem, 2vw, 1.4rem); line-height: 1.32; text-wrap: pretty; }
.taste-article-result .doc-summary { color: var(--muted); max-width: 72ch; font-size: .9rem; }
.taste-article-main .article-body, .taste-project-section .article-body { margin-top: 0; font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.taste-article-grid .article-body [id], #career-certifications { scroll-margin-top: 24px; }
.taste-toc, .taste-detail-facts { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100dvh - var(--header-h) - 44px); overflow: auto; }
.taste-toc h2, .taste-detail-facts h2 { font-size: 1.15rem; margin-bottom: 12px; }
.taste-toc-mobile { display: none; }
.taste-toc-tree { margin: 0; padding: 0; }
.taste-toc-tree ol { margin-left: 14px; }
.taste-toc-tree > li + li { margin-top: 8px; }
.taste-toc-tree ol > li + li { margin-top: 0; }
.taste-toc-tree a { position: relative; isolation: isolate; display: block; padding: 5px 4px; color: var(--ink); font-size: .95rem; font-weight: 750; line-height: 1.42; overflow-wrap: anywhere; }
.taste-toc-tree ol a { color: var(--muted); font-size: .85rem; font-weight: 400; }
.taste-toc-tree a::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 3px; background: var(--wash); opacity: 0; }
.taste-toc-tree a[aria-current="location"] { color: var(--accent); font-weight: 750; text-decoration: underline; }
.taste-toc-tree a[aria-current="location"]::before { opacity: 1; }
.taste-project-section + .taste-project-section { margin-top: 24px; }
.taste-project-section h2 { font-size: 1.55rem; letter-spacing: -.03em; margin-bottom: 10px; }
.taste-project-section > ul:not(.taste-tech) { list-style: disc; padding-left: 1.2em; }
.taste-detail-facts { padding-block: 12px; border-top: 1px solid var(--ink); }
.taste-detail-facts .field-facts { position: static; padding: 0; border: none; background: transparent; }
.taste-detail-facts .record-facts > div { border-top: 1px solid var(--rule); padding-block: 8px; }
.taste-detail-facts dt { font-size: .82rem; color: var(--muted); }
.taste-detail-facts a, .taste-detail-tail a, .taste-recovery a { color: var(--accent); text-decoration: underline; }
.taste-detail-facts section + section, .taste-detail-tail { margin-top: 20px; }
.taste-detail-tail, .taste-recovery { display: flex; gap: 16px; border-top: 1px solid var(--rule); padding-block: 14px; }

@media (max-width: 1050px) {
  .taste-article-grid { grid-template-columns: minmax(155px, .55fr) minmax(0, 2fr); }
  .taste-toc { display: none; }
  .taste-toc-mobile { display: block; margin-bottom: 16px; }
  .taste-toc-mobile summary, .taste-toc-mobile .taste-toc-tree a { min-height: 44px; padding-block: 10px; }
}
@media (max-width: 900px) {
  .taste-kb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .taste-search-toolbar { grid-template-columns: minmax(0, 1fr); }
  .taste-search-toolbar .label-filter-panel { inset-inline: 0 auto; }
}
@media (max-width: 767px) {
  .taste-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .taste-detail-facts { position: static; grid-row: 1; max-height: none; }
  .mast nav { gap: 0 12px; }
}
@media (max-width: 520px) {
  .mast.wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: calc(100% - 32px); min-height: 0; padding-block: 4px; gap: 0 12px; }
  .mast-tools { display: contents; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.taste-action, .taste-entries, .project-index-list, .case-link) .taste-arrow { transition: transform 160ms var(--ease); }
  :is(.taste-lead, .taste-entries a, .project-index-list a, .case-link):is(:hover, :focus-visible) .taste-arrow { transform: translateX(4px) rotate(45deg); }
  .taste-toc-tree a::before { transition: opacity 150ms ease-out; }
}
