/* =============================================================
   widada.id — Fullstack Developer
   Design tokens → base → layout → components → sections → motion
   ============================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;

  --bg:            #0a0a0b;
  --bg-soft:       #0e0e10;
  --surface:       rgba(255, 255, 255, .028);
  --surface-hover: rgba(255, 255, 255, .05);
  --border:        rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .17);

  --text:      #ededf0;
  --text-mid:  #a8a8b2;
  --text-dim:  #86868f;

  --accent:      #35d07f;
  --accent-ink:  #05130c;
  --accent-soft: rgba(53, 208, 127, .10);
  --accent-line: rgba(53, 208, 127, .32);

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --radius:    14px;
  --radius-lg: 20px;

  --shell:   1160px;
  --gutter:  clamp(20px, 5vw, 40px);
  --section: clamp(72px, 9.5vw, 128px);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.025em; line-height: 1.12; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 18px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 3. Layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section); position: relative; }
.section + .section { border-top: 1px solid var(--border); }

.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 60px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .75rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent-line);
}
.eyebrow .num { color: var(--accent); }

h2.section-title { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
.section-sub { margin-top: 16px; color: var(--text-mid); font-size: 1.0625rem; max-width: 40rem; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 100px;
  font-size: .95rem; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #45e08e; }

.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: #fff; background: var(--surface-hover); }

.btn-sm { padding: 9px 18px; font-size: .875rem; }

.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* text link with underline reveal */
.link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent); font-weight: 500; font-size: .95rem;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: border-color .18s ease;
}
.link:hover { border-bottom-color: var(--accent-line); }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.nav {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.brand {
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em;
  margin-right: auto;
}
.brand .dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px;
  font-size: .9rem; color: var(--text-mid);
  transition: color .16s ease, background-color .16s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-hover); }
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links .nav-cta { display: none; }

.nav-toggle {
  display: none; width: 42px; height: 42px; padding: 0;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; inset: 68px 0 auto; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px var(--gutter) 22px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
  }
  .nav-links a { padding: 12px 4px; font-size: 1rem; }
  .nav-links[hidden] { display: none; }

  .nav-links .nav-cta { display: block; margin-top: 12px; }
  .nav-links .nav-cta a {
    display: flex; justify-content: center;
    padding: 13px 20px; border-radius: 100px;
    background: var(--accent); color: var(--accent-ink); font-weight: 600;
  }
  .nav-links .nav-cta a:hover { background: #45e08e; color: var(--accent-ink); }
}

/* Below this the header CTA and the hamburger stop fitting side by side. */
@media (max-width: 430px) { .nav > .btn { display: none; } }

/* ---------- 6. Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  top: -30%; right: -10%; width: min(760px, 90vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(53,208,127,.13), transparent 62%);
  pointer-events: none;
}

.hero-grid {
  display: grid; gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr .92fr; } }

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.35rem);
  letter-spacing: -.035em; line-height: 1.04;
}
@media (min-width: 900px) { .hero h1 { max-width: 15ch; } }
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-sub {
  margin-top: 22px; max-width: 46ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--text-mid);
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 34px;
}
@media (max-width: 420px) { .hero-actions .btn { flex: 1 1 100%; } }

.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  margin-top: 26px;
  font-size: .875rem; color: var(--text-dim);
}
.hero-meta > span { display: inline-flex; align-items: center; gap: 9px; }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-figure { position: relative; justify-self: center; width: min(420px, 100%); }
.hero-figure::after {
  content: ""; position: absolute; inset: auto 0 -1px; height: 40%;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}
.hero-figure img { width: 100%; border-radius: var(--radius-lg); }
@media (max-width: 899px) { .hero-figure { display: none; } }

/* ---------- 7. Proof strip ---------- */
.proof {
  border-block: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.018), transparent);
}
.proof-grid {
  display: grid; gap: 1px;
  background: var(--border);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.proof-item {
  background: var(--bg);
  padding: 30px clamp(20px, 3vw, 34px);
  display: flex; flex-direction: column; gap: 7px;
}
.proof-item .label {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim);
}
.proof-item .value { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; }
.proof-item .note { font-size: .8125rem; color: var(--text-dim); }
.proof-item a.value:hover { color: var(--accent); }

/* ---------- 8. Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 30px);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
a.card:hover, .card--hover:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

/* capability cards */
.cap h3 { font-size: 1.1rem; margin-bottom: 10px; }
.cap p  { color: var(--text-mid); font-size: .9375rem; }
.cap .cap-icon {
  width: 34px; height: 34px; margin-bottom: 18px;
  display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--accent-line);
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- 9. Testimonials ---------- */
.quote { display: flex; flex-direction: column; gap: 20px; }
.quote blockquote { margin: 0; color: var(--text); }
.quote p + p { margin-top: .8em; }

.quote--featured { grid-column: 1 / -1; }
@media (min-width: 820px) {
  .quote--featured { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start; }
  .quote--featured blockquote { font-size: 1.1875rem; line-height: 1.6; }
}

.quote-author { display: flex; align-items: center; gap: 13px; margin-top: auto; }
.quote--featured .quote-author { margin-top: 0; }
.quote-author img {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); flex: none;
}
.quote-author .name { font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; }
.quote-author .role { font-size: .8125rem; color: var(--text-dim); }

.stars { display: flex; gap: 3px; color: var(--accent); }
.stars svg { width: 14px; height: 14px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-dim);
}
.tag--accent { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }

.quote-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Initials stand in when there's no photo for the reviewer. */
.quote-author .initials {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .8125rem; font-weight: 600; color: var(--text-mid);
}

/* Reviews vary a lot in length, so pack them by height instead of by row —
   a grid would leave big holes under the short ones. */
.quote-grid { columns: 1; column-gap: 16px; }
@media (min-width: 680px)  { .quote-grid { columns: 2; } }
@media (min-width: 1040px) { .quote-grid { columns: 3; } }
.quote-grid > .quote { break-inside: avoid; margin-bottom: 16px; }

/* ---------- 10. Work ---------- */
.work-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
.work-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.work-card--wide { grid-column: 1 / -1; }
@media (min-width: 940px) {
  .work-card--wide { flex-direction: row; align-items: stretch; }
  .work-card--wide .work-media { width: 46%; flex: none; }
  .work-card--wide .work-body  { padding: clamp(28px, 3vw, 40px); }
}

/* Covers arrive in a few different ratios — frame them rather than crop the
   text baked into them. */
.work-media {
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
  overflow: hidden; aspect-ratio: 3 / 2;
}
.work-media img {
  width: 100%; height: 100%; object-fit: contain;
  filter: saturate(.9) brightness(.93);
  transition: filter .3s ease;
}
.work-card:hover .work-media img { filter: none; }

@media (min-width: 940px) {
  .work-card--wide .work-media {
    border-bottom: 0; border-right: 1px solid var(--border);
    display: grid; place-items: center; padding: 26px; aspect-ratio: auto;
  }
  .work-card--wide .work-media img { border-radius: 10px; }
}

.work-body { padding: clamp(22px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 16px; flex: 1; }
.work-body h3 { font-size: 1.25rem; }
.work-kicker {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-dim);
}

.work-facts { display: grid; gap: 12px; margin: 0; }
.work-facts dt {
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 3px;
}
.work-facts dd { margin: 0; color: var(--text-mid); font-size: .9375rem; }

.stack-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }
.chip {
  padding: 4px 10px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .75rem; color: var(--text-mid); font-family: var(--font-mono);
}

/* ---------- 11. Tech stack ---------- */
.stack-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.stack-col { background: var(--bg); padding: 26px clamp(20px, 2.4vw, 28px); }
.stack-col h3 {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-dim); font-weight: 500; margin-bottom: 16px;
}
.stack-col li { padding: 5px 0; color: var(--text-mid); font-size: .9375rem; }

/* ---------- 12. Process ---------- */
.steps { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.step { background: var(--bg); padding: 28px clamp(20px, 2.4vw, 28px); }
.step h3 { font-size: 1.0625rem; margin-bottom: 9px; }
.step p  { color: var(--text-mid); font-size: .9375rem; }
.step .step-n {
  font-family: var(--font-mono); font-size: .75rem; color: var(--accent);
  letter-spacing: .1em; margin-bottom: 16px; display: block;
}

/* ---------- 13. About ---------- */
.about-grid { display: grid; gap: clamp(32px, 5vw, 60px); }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.about-copy p + p { margin-top: 1em; }
.about-copy p { color: var(--text-mid); font-size: 1.0625rem; }
.about-copy strong { color: var(--text); font-weight: 600; }

.fact-list { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--bg); padding: 18px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.fact dt { font-size: .875rem; color: var(--text-dim); }
.fact dd { margin: 0; font-size: .9375rem; font-weight: 500; text-align: right; }

/* ---------- 13b. Experience timeline ---------- */
.timeline { border-top: 1px solid var(--border); }
.tl-item {
  display: grid; gap: 6px 32px;
  padding: 22px 2px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 780px) { .tl-item { grid-template-columns: 160px 1fr; gap: 0 32px; } }

.tl-years {
  font-family: var(--font-mono); font-size: .8125rem;
  color: var(--text-dim); letter-spacing: .02em; padding-top: 3px;
}
.tl-item--now .tl-years { color: var(--accent); }

.tl-role { font-weight: 600; font-size: 1.0625rem; letter-spacing: -.015em; }
.tl-role .tl-org { color: var(--accent); }
.tl-place { font-size: .8125rem; color: var(--text-dim); margin-top: 3px; }
.tl-desc  { font-size: .9375rem; color: var(--text-mid); margin-top: 9px; max-width: 62ch; }

/* ---------- 14. Final CTA ---------- */
.cta-panel {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(53,208,127,.10), transparent 58%),
    var(--surface);
  text-align: center;
}
.cta-panel h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); max-width: 18ch; margin-inline: auto; }
.cta-panel p  { margin-top: 18px; color: var(--text-mid); max-width: 48ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
@media (max-width: 420px) { .cta-actions .btn { flex: 1 1 100%; } }

/* ---------- 15. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 48px 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-start; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { font-size: .9375rem; color: var(--text-mid); transition: color .16s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-note { font-size: .8125rem; color: var(--text-dim); }

/* Escape hatch for leads that are too big for one person. Deliberately quiet —
   it must not compete with the page's single call to action. */
.footer-agency {
  margin-top: 34px; padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: .875rem; color: var(--text-dim);
}
.footer-agency a {
  color: var(--text-mid); border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer-agency a:hover { color: var(--accent); border-bottom-color: var(--accent-line); }
.footer-agency svg { display: inline-block; vertical-align: middle; margin-left: 3px; }
.footer-brand { font-weight: 700; letter-spacing: -.02em; }

/* ---------- 16. Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
}
.js .reveal[data-delay="1"].is-visible { transition-delay: .07s; }
.js .reveal[data-delay="2"].is-visible { transition-delay: .14s; }
.js .reveal[data-delay="3"].is-visible { transition-delay: .21s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
