/* aditlal.dev homepage. Scoped under .al-home so Source's own pages are untouched.
   Values come from the approved mock (docs/mockup/index.html). */

.al-home {
    --al-ink: #15171a;
    --al-mute: #5b6168;
    --al-line: #e6e8eb;
    --al-soft: #f4f5f6;
    --al-accent: #3d5afe;
    --al-max: 1200px;
    color: var(--al-ink);
    font-family: Inter, system-ui, sans-serif;
}
.al-home a { color: inherit; text-decoration: none; }
/* Same width and gutter as Source's header (.gh-outer + .gh-inner) so every edge lines up. */
.al-home .al-wrap { box-sizing: border-box; max-width: calc(var(--container-width, 1320px) + 2 * max(4vmin, 20px)); margin: 0 auto; padding: 0 max(4vmin, 20px); }
.al-home .al-section { padding: 56px 0; border-bottom: 1px solid var(--al-line); }
.al-home .kicker { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--al-accent); }
.al-home .meta { font-size: 13px; color: var(--al-mute); }
.al-home .al-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; }
.al-home .al-btn.primary { background: var(--al-btn, #3d5afe); color: #fff; }
.al-home .al-btn.ghost { border-color: var(--al-line); }

/* section heads */
.al-home .section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 32px; }
.al-home .section-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin: 0; }
.al-home .section-head p { font-size: 17px; color: var(--al-mute); margin: 8px 0 0; }
.al-home .section-head a { color: var(--al-accent); font-size: 15px; font-weight: 600; white-space: nowrap; }

/* intro bar */
.al-home .intro-bar { border-bottom: 1px solid var(--al-line); background: var(--al-soft); }
.al-home .intro-bar .al-wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; font-size: 15px; color: var(--al-mute); }
.al-home .intro-bar b { color: var(--al-ink); }
.al-home .intro-bar a { margin-left: auto; color: var(--al-accent); font-weight: 600; white-space: nowrap; }

/* blog hero: the newest post */
.al-home .bloghero { padding: 40px 0 8px; }
.al-home .bloghero-link { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 21 / 9; background: #0f1222; }
.al-home .bloghero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.al-home .bloghero-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78)); }
.al-home .bloghero-text { position: absolute; left: 40px; right: 40px; bottom: 36px; color: #fff; z-index: 1; max-width: 860px; }
.al-home .bloghero .kicker { color: #aab6ff; }
.al-home .bloghero h1 { font-size: 50px; line-height: 1.06; letter-spacing: -.03em; margin: 12px 0; color: #fff; }
.al-home .bloghero p { font-size: 19px; line-height: 1.5; margin: 0 0 12px; color: #e8e9ec; }
.al-home .bloghero .meta { color: #c8cbd0; }
/* no cover: plain text hero, no dark box */
.al-home .bloghero.no-cover .bloghero-link { aspect-ratio: auto; background: none; }
.al-home .bloghero.no-cover .bloghero-link::after { display: none; }
.al-home .bloghero.no-cover .bloghero-text { position: static; color: var(--al-ink); padding: 24px 0; }
.al-home .bloghero.no-cover h1 { color: var(--al-ink); }
.al-home .bloghero.no-cover p { color: var(--al-mute); }
.al-home .bloghero.no-cover .kicker { color: var(--al-accent); }
.al-home .bloghero.no-cover .meta { color: var(--al-mute); }

/* more writing + updates box */
.al-home .writing-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.al-home .writing-list .item { display: grid; grid-template-columns: 180px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--al-line); }
.al-home .writing-list img, .al-home .thumb-empty { width: 180px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: var(--al-soft); display: block; }
.al-home .writing-list h3 { margin: 6px 0 8px; font-size: 19px; line-height: 1.25; }
.al-home .updates-box { position: sticky; top: 96px; background: var(--al-soft); border-radius: 10px; padding: 24px; }
.al-home .updates-box h4 { margin: 0 0 8px; font-size: 17px; }
.al-home .updates-box p { margin: 0 0 14px; color: var(--al-mute); font-size: 14px; line-height: 1.5; }
.al-home .updates-box input { width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid var(--al-line); border-radius: 999px; font: inherit; margin-bottom: 10px; box-sizing: border-box; }
.al-home .updates-box .al-btn { width: 100%; justify-content: center; }
.al-home .updates-box .form-ok, .al-home .updates-box .form-err { display: none; margin: 10px 0 0; }
.al-home .updates-box form.success .form-ok, .al-home .updates-box form.error .form-err { display: block; }

/* pitch */
.al-home .pitch { background: var(--al-soft); }
.al-home .pitch-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.al-home .pitch-title { font-size: 42px; line-height: 1.05; letter-spacing: -.03em; margin: 14px 0 18px; }
.al-home .lede { font-size: 19px; line-height: 1.55; color: var(--al-mute); margin: 0 0 28px; max-width: 560px; }
.al-home .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.al-home .stats { display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.al-home .stat b { display: block; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.al-home .stat span { font-size: 13px; color: var(--al-mute); }
.al-home .pitch-shots { display: grid; gap: 16px; }
.al-home .pitch-shots img { width: 100%; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.12); }

/* offers */
.al-home .offers { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--al-line); }
.al-home .offer { padding: 28px 32px; border-right: 1px solid var(--al-line); }
.al-home .offer:last-child { border-right: 0; }
.al-home .offer h3 { margin: 0 0 6px; font-size: 17px; }
.al-home .offer p { margin: 0; color: var(--al-mute); font-size: 14px; line-height: 1.5; }

/* apps */
.al-home .app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.al-home .app { border: 1px solid var(--al-line); border-radius: 14px; overflow: hidden; }
.al-home .app .shots { background: var(--al-soft); }
.al-home .app .shots img { width: 100%; display: block; }
.al-home .app .body { padding: 22px 24px 24px; }
.al-home .app h3 { margin: 0 0 6px; font-size: 22px; }
.al-home .app p { margin: 0 0 14px; color: var(--al-mute); font-size: 15px; line-height: 1.5; }
.al-home .stack { display: flex; flex-wrap: wrap; gap: 6px; }
.al-home .pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--al-soft); color: var(--al-mute); }
.al-home .more { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--al-accent); }

/* tools */
.al-home .tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.al-home .tool { border: 1px solid var(--al-line); border-radius: 14px; overflow: hidden; display: block; }
.al-home .tool img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; border-bottom: 1px solid var(--al-line); }
.al-home .tool .body { padding: 18px 22px 22px; }
.al-home .tool h3 { margin: 6px 0; font-size: 19px; }
.al-home .tool p { margin: 0; color: var(--al-mute); font-size: 14px; line-height: 1.5; }

/* repo cards (small tools, libraries) */
.al-home .repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.al-home .repo { border: 1px solid var(--al-line); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.al-home .repo .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.al-home .repo h4 { margin: 0; font-size: 16px; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; overflow-wrap: anywhere; }
.al-home .stars { font-size: 13px; color: var(--al-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.al-home .repo .kind { font-size: 12px; color: var(--al-accent); font-weight: 600; }
.al-home .repo p { margin: 0; font-size: 14px; color: var(--al-mute); line-height: 1.45; }
.al-home .repo.soon { background: linear-gradient(135deg, #0f1222, #2a1f5c); border: 0; color: #fff; }
.al-home .repo.soon .kind { color: #9d93ff; }
.al-home .repo.soon p { color: #d6d3f0; }
.al-home .experiments { margin-top: 48px; }
.al-home .experiments h3 { font-size: 24px; margin: 0; }
.al-home .experiments p { color: var(--al-mute); margin: 6px 0 16px; }
.al-home .gh-more { margin-top: 24px; text-align: center; }

/* phones and small tablets */
@media (max-width: 900px) {

    .al-home .writing-grid, .al-home .pitch-grid, .al-home .app-grid { grid-template-columns: 1fr; }
    .al-home .tool-grid, .al-home .repo-grid, .al-home .offers { grid-template-columns: 1fr; }
    .al-home .offer { border-right: 0; border-bottom: 1px solid var(--al-line); padding: 20px 16px; }
    .al-home .updates-box { position: static; }
    .al-home .bloghero-link { aspect-ratio: 4 / 5; }
    .al-home .bloghero-text { left: 20px; right: 20px; bottom: 20px; }
    .al-home .bloghero h1 { font-size: 30px; }
    .al-home .bloghero p { font-size: 16px; }
    .al-home .section-head { flex-direction: column; align-items: flex-start; }
    .al-home .section-head h2 { font-size: 28px; }
    .al-home .pitch-title { font-size: 32px; }
    .al-home .writing-list .item { grid-template-columns: 96px 1fr; gap: 14px; }
    .al-home .writing-list img, .al-home .thumb-empty { width: 96px; }
    .al-home .intro-bar .al-wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
}

/* pitch: companies line */
.al-home .worked-with { margin: 20px 0 0; font-size: 15px; font-weight: 600; color: var(--al-ink); }
.al-home .worked-with span { font-weight: 400; color: var(--al-mute); }

/* offer cards: booking link */
.al-home .offer-cta { display: inline-block; margin-top: 12px; padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--al-accent); }

/* footer: plain text links (works on Ghost 5 and 6) */
.al-footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.al-footer-links a { padding: 10px 4px; font-weight: 600; }

/* ---------- theme toggle + dark mode (data-theme on <html>, set before first paint) ---------- */
.al-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
    background: transparent; color: var(--color-darker-gray); cursor: pointer;
}
.al-theme-toggle:hover { background: var(--color-lighter-gray); }
.al-theme-toggle:focus-visible { outline: 2px solid #3d5afe; outline-offset: 2px; }
.al-theme-toggle svg { display: none; }
html:not([data-theme-pref]) .al-theme-toggle .i-auto,
html[data-theme-pref="auto"] .al-theme-toggle .i-auto,
html[data-theme-pref="light"] .al-theme-toggle .i-light,
html[data-theme-pref="dark"] .al-theme-toggle .i-dark { display: block; }

/* Source's own dark variables (its has-light-text set), applied site-wide. */
html[data-theme="dark"] {
    color-scheme: dark;
    --background-color: #0f1115;
    --color-lighter-gray: rgb(255 255 255 / 0.1);
    --color-darker-gray: #fff;
    --color-secondary-text: rgb(255 255 255 / 0.68);
    --color-border: rgb(255 255 255 / 0.15);
    --color-dark-border: rgb(255 255 255 / 0.5);
}
html[data-theme="dark"] .al-home {
    --al-ink: #eceef1;
    --al-mute: #a6acb4;
    --al-line: #262a31;
    --al-soft: #171a20;
    --al-accent: #8c9bff;
    --al-btn: #3d5afe;
}
html[data-theme="dark"] .al-home .app .shots,
html[data-theme="dark"] .al-home .pitch-shots img { background: #1c2027; }
html[data-theme="dark"] .gh-form, html[data-theme="dark"] .gh-form-input { color: #fff; }

/* touch targets: every text link a visitor taps is at least 44px tall (review) */
.al-home .intro-bar a, .al-home .section-head a, .al-home .more,
.al-home .offer-cta, .al-home .experiments .pill, .al-footer-links a {
    display: inline-flex; align-items: center; min-height: 44px;
}
.al-home .experiments .pill { padding: 0 14px; }

/* pitch: offers in the right column (replaces the repeated app screenshots) */
.al-home { --al-card: #fff; }
html[data-theme="dark"] .al-home { --al-card: #15181e; }
.al-home .pitch-offers { display: grid; gap: 14px; }
.al-home .pitch .offer { background: var(--al-card); border: 1px solid var(--al-line); border-radius: 12px; padding: 20px 24px; }
.al-home .pitch .offer:last-child { border-right: 1px solid var(--al-line); }
.al-home .pitch .offer h3 { margin: 0 0 6px; font-size: 17px; }
.al-home .pitch .offer p { margin: 0; color: var(--al-mute); font-size: 14px; line-height: 1.5; }
.al-home .pitch .offer .offer-cta { margin-top: 6px; padding: 0; }
@media (max-width: 900px) { .al-home .pitch .offer { padding: 16px 18px; border-bottom: 1px solid var(--al-line); } }

/* /work/: closing call to action */
.al-home .work-cta { text-align: center; background: var(--al-soft); }
.al-home .work-cta h2 { font-size: 32px; letter-spacing: -.02em; margin: 0 0 10px; }
.al-home .work-cta p { color: var(--al-mute); font-size: 17px; margin: 0 auto 22px; max-width: 560px; }
