/* ============================================================
   jyad.me — minimal black + ember, flat and hairline
   Hanken Grotesk (text) · IBM Plex Mono (labels, data)
   ============================================================ */

:root {
  --bg:        #0b0b0b;
  --surface:   #141414;
  --surface-2: #171717;
  --ink:       #ededed;
  --ink-soft:  #b8b8b8;
  --muted:     #8a8a8a;
  --faint:     #6a6a6a;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);
  --accent:    #d6d6d6;   /* light gray — monochrome accent */
  --accent-br: #ffffff;
  --accent-dim:rgba(255,255,255,.1);

  --font: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1080px;
  --nav-h: 60px;
}

*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
svg { display: block; }
h1,h2,h3 { font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
::selection { background: var(--accent); color: #0b0b0b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 28px; }
.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.ext { color: var(--muted); font-size: .85em; }

.skip-link { position: absolute; left: 14px; top: -60px; z-index: 200; background: var(--accent); color: #0b0b0b; padding: 9px 15px; border-radius: 6px; font-family: var(--mono); font-size: 13px; transition: top .15s; }
.skip-link:focus { top: 12px; }

/* ============ NAV ============ */
.nav { position: sticky; top: 0; z-index: 100; height: var(--nav-h); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.brand-mark { color: var(--ink); flex: none; }
.nav-links { display: flex; gap: 26px; justify-self: center; }
.nav-links a { font-size: 14.5px; color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-social { display: flex; align-items: center; gap: 14px; justify-self: end; }
.nav-social > a { color: var(--muted); display: inline-flex; transition: color .15s; }
.nav-social > a:hover { color: var(--ink); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; padding: 8px 4px; }
.nav-toggle span { width: 20px; height: 1.6px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
.mobile-menu { display: none; flex-direction: column; padding: 6px 28px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.mobile-menu a { font-size: 16px; color: var(--ink-soft); padding: 12px 2px; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }

/* ============ HERO ============ */
.hero { padding-top: clamp(52px, 8vw, 96px); padding-bottom: clamp(40px, 5vw, 60px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero-title { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.04; }
.hero-sub { margin-top: 20px; color: var(--muted); max-width: 42ch; font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; transition: color .15s, border-color .15s, background .15s; }
.btn-primary { border: 1px solid var(--line-2); padding: 11px 18px; border-radius: 7px; color: var(--ink); }
.btn-primary:hover { border-color: var(--accent); color: var(--accent); }
.btn-text { color: var(--muted); padding: 11px 2px; }
.btn-text:hover { color: var(--ink); }
.hero-art { display: grid; place-items: center; }
#hero-art { width: 100%; max-width: 360px; height: auto; overflow: visible; }

/* ============ STAT ROW ============ */
.statrow { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.statrow-item { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 18px; padding: 18px 24px 18px 0; }
.statrow-item + .statrow-item { border-left: 1px solid var(--line); padding-left: 24px; }
.statrow-item dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.statrow-item dd { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.statrow-item dd a { color: var(--ink); transition: color .15s; }
.statrow-item dd a:hover { color: var(--accent); }
.statrow-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ============ SECTIONS ============ */
.section { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 500; }
.head-link { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; transition: color .15s; }
.head-link:hover { color: var(--accent); }
.section-sub { margin-top: 14px; color: var(--muted); max-width: 56ch; font-size: 1rem; }
.section-sub-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.section-sub-row .section-sub { margin-top: 0; }
.section-stat { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ============ ROWS (projects) ============ */
.rows { margin-top: 28px; }
.row-project { padding: 22px 0; border-top: 1px solid var(--line); }
.row-project:first-child { border-top: 0; }
.row-name { font-size: 1.2rem; color: var(--ink); transition: color .15s; }
.row-name:hover { color: var(--accent); }
.row-desc { margin-top: 7px; color: var(--muted); max-width: 70ch; }
.row-tags { margin-top: 9px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ============ MODELS TABLE ============ */
.registry-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.filters { display: inline-flex; gap: 22px; }
.filter { font-size: 14px; color: var(--muted); padding: 2px 0; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s; }
.filter:hover { color: var(--ink); }
.filter.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.controls-right { display: flex; gap: 10px; }
.search input, .sortwrap select { font-family: var(--font); font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; transition: border-color .15s; }
.search input { width: 210px; }
.search input::placeholder { color: var(--faint); }
.search input:focus, .sortwrap select:focus { outline: none; border-color: var(--line-2); }
.sortwrap select { cursor: pointer; }
.registry-count { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

.table { margin-top: 6px; }
.thead, .trow { display: grid; grid-template-columns: 2.5fr .9fr 1.7fr .8fr auto; gap: 18px; align-items: center; padding: 14px 0; }
.thead { border-bottom: 1px solid var(--line); }
.thead span { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.thead .num, .trow .t-usage { text-align: right; justify-self: end; }
.thead .end, .trow .t-link { justify-self: end; }
.trow { border-top: 1px solid var(--line); transition: background .14s; }
.trow:first-child { border-top: 0; }
.trow:hover { background: var(--surface); }
.t-name { font-size: 15px; color: var(--ink); overflow-wrap: anywhere; transition: color .15s; }
.t-name:hover { color: var(--accent); }
.t-kind { font-family: var(--mono); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); justify-self: start; }
.t-kind.k-model { color: #e4e4e4; }
.t-kind.k-dataset { color: #a0a0a0; }
.t-kind.k-space { color: #787878; }
.t-task { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.t-usage { font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft); }
.t-usage small { color: var(--faint); font-size: .78em; }
.t-link a { color: var(--muted); display: inline-flex; transition: color .15s; }
.t-link a:hover { color: var(--accent); }
.table-empty { padding: 28px 0; text-align: center; color: var(--muted); }
.linkbtn { color: var(--accent); text-decoration: underline; font-family: var(--mono); font-size: .95em; }
.table-foot { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* ============ CONTACT ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); margin-top: 28px; align-items: start; }
.contact-intro p { color: var(--muted); max-width: 46ch; }
.contact-links { display: flex; gap: 20px; margin-top: 18px; flex-wrap: wrap; }
.contact-links a { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); transition: color .15s; }
.contact-links a:hover { color: var(--accent); }
.email-block + .email-block { margin-top: 24px; }
.email-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.email-line { display: flex; align-items: center; gap: 12px; }
.email-line a { font-size: 1.32rem; color: var(--ink); transition: color .15s; overflow-wrap: anywhere; }
.email-line a:hover { color: var(--accent); }
.copy-btn { color: var(--muted); display: inline-flex; padding: 5px; border-radius: 6px; transition: color .15s, background .15s; }
.copy-btn:hover { color: var(--ink); background: var(--surface); }
.copy-btn.copied { color: var(--accent); }

.contact-actions { margin-top: clamp(32px, 5vw, 52px); }
.row-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 9px; transition: border-color .15s, background .15s; }
.row-action + .row-action { margin-top: 12px; }
.row-action:hover { border-color: var(--line-2); background: var(--surface); }
.row-action-label { display: inline-flex; align-items: center; gap: 12px; font-size: 1rem; color: var(--ink); }
.row-action-icon { color: var(--accent); font-family: var(--mono); }
.row-action-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 26px; flex-wrap: wrap; }
.footer-cr, .footer-top { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.footer-top { transition: color .15s; }
.footer-top:hover { color: var(--ink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { grid-row: 1; max-width: 240px; margin: 0 auto; }
  #hero-art { max-width: 240px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu:not([hidden]) { display: flex; }
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-social { gap: 12px; }
  .statrow { grid-template-columns: 1fr; }
  .statrow-item + .statrow-item { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .registry-controls { flex-direction: column; align-items: stretch; gap: 14px; }
  .controls-right { }
  .search { flex: 1; }
  .search input { width: 100%; }
  /* table -> stacked */
  .thead { display: none; }
  .trow { grid-template-columns: 1fr auto; gap: 6px 14px; padding: 16px 0; }
  .t-name { grid-column: 1 / -1; font-size: 15px; }
  .t-kind { justify-self: start; }
  .t-task { grid-column: 1 / -1; order: 4; }
  .t-usage { justify-self: end; }
  .t-link { grid-column: 1 / -1; order: 5; justify-self: start; }
  .t-link a { justify-self: start; }
}
@media (max-width: 440px) {
  .wrap { padding-inline: 20px; }
  .row-action { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
