/* Mohammad Miadh Angkad — single-page, monospace */

:root {
  --bg: #faf9f7;
  --text: #1a1a1a;
  --muted: #595959;
  --faint: #8c8c8c;
  --rule: #e5e4e0;
  --col: 34rem;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", "Fira Code", Menlo,
    Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

/* ---------- header ---------- */
.masthead {
  padding-bottom: 2.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.masthead h1 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact {
  margin-top: 0.85rem;
  color: var(--faint);
  font-size: 0.9rem;
}

/* ---------- links ---------- */
a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

a:hover {
  background-color: var(--text);
  color: var(--bg);
  text-decoration: none;
}

::selection { background: var(--text); color: var(--bg); }

code {
  font-family: inherit;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.08em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ---------- sections ---------- */
section { margin-top: 3.5rem; }

h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

h2 a { color: var(--text); text-decoration: none; }
h2 a::before { content: "> "; color: var(--faint); }

p { margin-bottom: 0.9rem; }

/* ---------- entries (experience / education) ---------- */
.entry { margin-bottom: 1.6rem; }
.entry:last-child { margin-bottom: 0; }

.entry__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.1rem 1.5rem;
}

.entry__role { color: var(--text); }
.entry__org { color: var(--muted); }
.entry__date { color: var(--muted); white-space: nowrap; }

.entry__sub { margin-top: 0.35rem; color: var(--faint); font-size: 0.85rem; }

/* ---------- projects ---------- */
.proj { margin-bottom: 1.6rem; }
.proj__title { margin-bottom: 0.5rem; }
.proj__title a { font-weight: 600; }
.proj__desc { color: var(--text); }

/* ---------- footer ---------- */
footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.8rem;
}

footer p { margin: 0; }
footer p + p { margin-top: 0.3rem; }

/* ---------- target highlight ---------- */
:target { scroll-margin-top: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 520px) {
  .wrap { padding: 3rem 1.25rem 3rem; }
  body { font-size: 0.92rem; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- print ---------- */
@media print {
  body { font-size: 11pt; }
  a { background: none; color: #000; }
}
