/* Self-hosted variable fonts, latin subset. Replaces the Google Fonts request.
   Filenames are not fingerprinted, so this file is served with no-cache and
   revalidated on each load. See _headers. */

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

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/space-grotesk.woff2") format("woff2");
}

/* ==========================================================================
   hasibbillah.com
   Palette and type scale live in :root; everything below reads from it.
   ========================================================================== */

:root {
  --accent: #a1141b;
  --bg: #efeae0;
  --panel: #f8f5ee;
  --panel-lift: #fffdf8;
  --ink: #1a1714;
  --soft: #423c35;
  --muted: #716960;
  --line: #ddd4c5;

  --radius: 16px;
  --rail-width: 350px;
  --shell-max: 1180px;

  --display:
    "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Two soft accent washes so the sand background isn't flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      700px 440px at 10% 0%,
      color-mix(in srgb, var(--accent) 9%, transparent),
      transparent 70%
    ),
    radial-gradient(
      520px 380px at 95% 92%,
      color-mix(in srgb, var(--accent) 6%, transparent),
      transparent 72%
    );
}

a {
  color: inherit;
}

h1,
h2,
h3,
.stat b {
  font-family: var(--display);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}
.skip:focus {
  left: 0;
}

/* ---------- shell ---------- */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  /* Shrink the gap first (64px -> 16px) as the viewport narrows toward the
     1000px single-column breakpoint, so the columns keep their width until
     the gap is spent. */
  gap: clamp(16px, calc(16px + (100vw - 1000px) * 0.267), 64px);
  align-items: start;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- left rail ---------- */

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  padding: 48px 0;
}

.avatar {
  width: 92px;
  height: 92px;
  margin-bottom: 26px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 1px var(--line),
    0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent),
    0 18px 34px -18px rgba(60, 40, 20, 0.5);
}

h1 {
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}
h1 a {
  color: inherit;
  text-decoration: none;
}

.role {
  margin-top: 14px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.tagline {
  max-width: 30ch;
  margin-top: 22px;
  color: var(--soft);
  font-size: 1.06rem;
  line-height: 1.5;
}

.railnav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 38px;
}
.railnav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.18s;
}
.railnav a i {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--line);
  transition:
    width 0.22s,
    background 0.22s;
}
.railnav a:hover {
  color: var(--ink);
}
.railnav a:hover i {
  width: 54px;
  background: var(--accent);
}

.railcta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-top: 38px;
}

.railfoot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: auto;
  padding-top: 34px;
  color: var(--muted);
  font-size: 13px;
}
.railfoot a {
  text-decoration: none;
  transition: color 0.16s;
}
.railfoot a:hover {
  color: var(--accent);
}

/* ---------- shared bits ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 12px 28px -12px
    color-mix(in srgb, var(--accent) 85%, transparent);
  transition:
    transform 0.15s,
    filter 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 16px 32px -12px
    color-mix(in srgb, var(--accent) 85%, transparent);
}

.eyebrow {
  margin-bottom: 22px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow-spaced {
  margin-top: 36px;
}

/* ---------- main column ---------- */

main {
  min-width: 0;
  padding: 64px 0 0;
}

section {
  margin-bottom: 64px;
  scroll-margin-top: 24px;
}
section:last-child {
  margin-bottom: 48px;
}

.intro {
  max-width: 54ch;
  margin-bottom: 26px;
  color: var(--soft);
  font-size: 15.5px;
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.stat:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 14px 30px -20px rgba(60, 40, 20, 0.5);
}
.stat b {
  display: block;
  color: var(--accent);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat small {
  display: inline-block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.45;
}

/* ---------- services ---------- */

.svc {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.svc:last-of-type {
  border-bottom: none;
}

.svc .n {
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--accent);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}
.svc h3 {
  margin-bottom: 7px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.svc p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- about ---------- */

.about p {
  margin-bottom: 17px;
  color: var(--soft);
}
.reach {
  position: relative;
  margin: 60px 0 0;
  padding-left: 48px;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}
.reach::before {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-bottom: 16px;
  background: var(--accent);
  border-radius: 2px;
}
.reach .mark {
  position: absolute;
  left: 0;
  font-family: var(--display);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--accent);
}
.reach b {
  font-weight: 600;
  color: var(--accent);
}

/* ---------- experience ---------- */

.job {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.job:first-of-type {
  border-top: none;
}

.job .when {
  padding-top: 5px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.job h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.job .co {
  color: var(--accent);
}
.job .co a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: border-color 0.16s;
}
.job .co a:hover {
  border-bottom-color: var(--accent);
}
.job .where {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.job .ctx {
  margin-top: 12px;
  padding-left: 13px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.55;
}
.job ul {
  margin: 13px 0 0;
  padding-left: 17px;
  color: var(--soft);
  font-size: 14.8px;
}
.job li {
  margin-bottom: 7px;
}
.job li::marker {
  color: var(--accent);
}
.job strong {
  color: var(--ink);
  font-weight: 600;
}

.earlier .job {
  padding: 18px 0;
}
.earlier h3 {
  font-size: 1rem;
}
.earlier p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14.2px;
}

/* ---------- contact ---------- */

.endcard {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-lift), var(--panel));
}
.endcard h2 {
  margin-bottom: 10px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.endcard p {
  max-width: 48ch;
  color: var(--muted);
  font-size: 15px;
}
.endcard-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 24px;
}

.clist {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 22px 28px;
  margin-top: 24px;
  font-size: 14.5px;
}
.clist > div {
  flex-shrink: 0;
}
.clist a {
  text-decoration: none;
  transition: color 0.16s;
}
.clist a:hover {
  color: var(--accent);
}
.clist small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.copyright {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 48px;
  }
  .rail {
    position: static;
    align-items: center;
    height: auto;
    padding: 52px 0 8px;
    text-align: center;
  }
  h1 {
    font-size: 2.3rem;
  }
  .tagline {
    margin-left: auto;
    margin-right: auto;
  }
  .railnav,
  .railfoot {
    display: none;
  }
  .railcta {
    align-items: center;
    margin-bottom: 18px;
  }
  main {
    padding: 24px 0 0;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 22px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .job {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

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