/* yaqzan.dev — hand-written, no framework */

:root {
  --bg: #fcfcfa;
  --ink: #1c1c1a;
  --muted: #66665f;
  --accent: #9a3412;
  --accent-soft: #9a341218;
  --rule: #e4e2db;
  --card: #f6f5f1;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #131311;
  --ink: #e9e7e1;
  --muted: #96948b;
  --accent: #e8964e;
  --accent-soft: #e8964e1f;
  --rule: #2b2b27;
  --card: #1c1c19;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131311;
    --ink: #e9e7e1;
    --muted: #96948b;
    --accent: #e8964e;
    --accent-soft: #e8964e1f;
    --rule: #2b2b27;
    --card: #1c1c19;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.wide { max-width: 58rem; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem 1rem; z-index: 10; }

nav { display: flex; align-items: baseline; justify-content: space-between; padding: 1.5rem 0 0; }
nav .mark { font-family: var(--mono); font-size: .95rem; color: var(--ink); text-decoration: none; }
nav .mark:hover { color: var(--accent); }
nav ul { display: flex; gap: 1.4rem; list-style: none; align-items: baseline; }
nav ul a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav ul a:hover, nav ul a[aria-current="page"] { color: var(--accent); }
#theme { background: none; border: none; cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: .85rem; padding: 0; }
#theme:hover { color: var(--accent); }

header.hero { padding: 4.5rem 0 3rem; }
h1 { font-size: 2.3rem; letter-spacing: -.02em; line-height: 1.15; }
.role { color: var(--accent); font-family: var(--mono); font-size: .95rem; margin: .5rem 0 1.4rem; }
.lede { font-size: 1.06rem; max-width: 40rem; }
.lede + .lede { margin-top: .8rem; }
.contact { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; font-size: .95rem; }
.contact .meta { color: var(--muted); }

section { padding: 2.6rem 0; border-top: 1px solid var(--rule); }
h2 {
  font-family: var(--mono); font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  margin-bottom: 1.8rem;
}
h3 { font-size: 1.06rem; font-weight: 600; }

.job { margin-bottom: 2.2rem; }
.job:last-child { margin-bottom: 0; }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.when { color: var(--muted); font-size: .88rem; font-family: var(--mono); white-space: nowrap; }
.job .org { color: var(--muted); font-size: .92rem; margin-top: .1rem; }
.job ul { margin: .8rem 0 0 1.1rem; }
.job li { margin-bottom: .55rem; }
.job li::marker { color: var(--accent); }

/* project cards */
.cards { display: grid; gap: 1rem; }
/* Two-column masonry: cards with screenshots run tall, text-only cards stack
   beside them to fill the column instead of stretching against one row. */
.grid2 { display: block; columns: 2; column-gap: 1rem; }
.grid2 .card { break-inside: avoid; margin-bottom: 1rem; }
@media (max-width: 700px) { .grid2 { columns: 1; } }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1.1rem 1.25rem; display: block; text-decoration: none; color: var(--ink);
  transition: border-color .15s;
}
a.card:hover { border-color: var(--accent); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: .8rem; color: var(--accent); white-space: nowrap; }
.chip.dim { color: var(--muted); }
.card p { color: var(--muted); font-size: .95rem; margin-top: .45rem; }
.card p strong { color: var(--ink); font-weight: 600; }
.ico { width: 18px; height: 18px; border-radius: 4px; vertical-align: -3px; margin-right: .5rem; }
.shot {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  border: 1px solid var(--rule); border-radius: 6px; margin-bottom: .9rem;
}
.tags { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span {
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
  background: var(--accent-soft); border-radius: 4px; padding: .12rem .45rem;
}
.more { margin-top: 1.2rem; font-size: .95rem; }
.intro { color: var(--muted); max-width: 46rem; margin: -0.8rem 0 2rem; }
.intro strong { color: var(--ink); }

dl.skills { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; }
dl.skills dt { font-family: var(--mono); font-size: .82rem; color: var(--muted); padding-top: .15rem; white-space: nowrap; }
dl.skills dd { font-size: .95rem; }
@media (max-width: 540px) {
  dl.skills { grid-template-columns: 1fr; gap: .2rem; }
  dl.skills dd { margin-bottom: .7rem; }
  h1 { font-size: 1.9rem; }
  header.hero { padding: 3rem 0 2.2rem; }
}

.edu { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.edu p { color: var(--muted); margin-top: .15rem; }

footer { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; color: var(--muted); font-size: .88rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.page-head { padding: 3.5rem 0 1rem; }
.page-head h1 { font-size: 1.8rem; }

@media print {
  nav ul, #theme, footer { display: none; }
  body { font-size: 12px; }
  section, header.hero, .page-head { padding: 1rem 0; }
  a { color: inherit; text-decoration: none; }
}

/* GitHub-style repository view (projects page) */
.gh-profile .gh-line { font-family: var(--mono); font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.gh-profile .sep { margin: 0 .4rem; }
.muted { color: var(--muted); }
.repos { display: grid; gap: 1rem; }
.repos.pinned { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .repos.pinned { grid-template-columns: 1fr; } }
.repos.list { gap: 0; border-top: 1px solid var(--rule); }
.repo {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1rem 1.15rem 1.05rem; color: var(--ink); display: flex; flex-direction: column; gap: .35rem;
  transition: border-color .15s;
}
.repo:hover { border-color: var(--accent); }
.repo.row { background: transparent; border: none; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 1.15rem 0; }
.repo.row:hover { border-color: var(--rule); }
.repo.private { opacity: .82; }
.repo-head { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.repo-head .ico { margin-right: 0; }
.repo-name { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--ink); text-decoration: none; }
a.repo-name:hover { color: var(--accent); text-decoration: underline; }
.repo-name .owner { color: var(--muted); font-weight: 400; }
.vis {
  font-family: var(--mono); font-size: .68rem; color: var(--muted); border: 1px solid var(--rule);
  border-radius: 999px; padding: .05rem .5rem; line-height: 1.5; position: relative; top: -1px;
}
.repo-head .chip { margin-left: auto; text-decoration: none; }
.repo-head .chip.live:hover { text-decoration: underline; }
.repo p { color: var(--muted); font-size: .95rem; margin-top: .2rem; }
.repo-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .4rem; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.repo-meta .lang i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: .35rem; vertical-align: -1px; }
.pulse { display: flex; align-items: flex-end; gap: 2px; height: 22px; margin-top: .5rem; }
.pulse[hidden] { display: none; }
.pulse i { flex: 1; height: var(--h); background: var(--accent); opacity: .55; border-radius: 1px; min-width: 3px; }
.pulse i:hover { opacity: 1; }
.repo .shot { margin: .8rem 0 0; }
