/*
Theme Name: Firdaus Ali
Theme URI: https://alifirdaus.com
Author: Firdaus Ali
Description: Single-page personal-brand site for Firdaus Ali — Product Builder, 0->1 Product Management, GTM, AI consulting. Custom theme built to the "systems blueprint" brand identity (brand-guideline.md).
Version: 1.0.0
Text Domain: firdaus-ali
*/

/* ==========================================================================
   1. DESIGN TOKENS — from design/design-system.md (confirmed 2026-08-17)
   ========================================================================== */
:root {
  /* Colours */
  --color-primary: #12161F;          /* Ink */
  --color-primary-alt: #181D28;      /* Ink 2 */
  --color-secondary: #EDE6D6;        /* Parchment */
  --color-accent: #C0904F;           /* Brass */
  --color-accent-dim: #8A6B44;       /* Brass Dim */
  --color-accent-secondary: #6C8CA8; /* Slate */
  --color-text-muted: #9A9689;       /* Dim */
  --color-accent-border: rgba(192, 144, 79, 0.2);
  --color-accent-border-hover: rgba(192, 144, 79, 0.45);

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --size-display: clamp(3rem, 6vw, 4.5rem);
  --size-h2: clamp(2rem, 3.5vw, 2.75rem);
  --size-h3: 1.5rem;
  --size-body-lg: 1.125rem;
  --size-body: 1rem;
  --size-body-sm: 0.875rem;
  --size-eyebrow: 0.7rem;
  --size-button: 0.875rem;

  /* Spacing (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;

  /* Radii */
  --radius-frame: 0px;
  --radius-pill: 9999px;

  /* Motion */
  --transition: all 200ms ease;
  --transition-press: transform 100ms ease;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-primary);
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-heading); margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ==========================================================================
   3. LAYOUT UTILITIES
   ========================================================================== */
.section {
  padding: var(--space-12) var(--space-2);
}
@media (min-width: 768px) {
  .section { padding: var(--space-16) var(--space-3); }
}
.section--ink { background: var(--color-primary); }
.section--ink-alt { background: var(--color-primary-alt); }
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* ==========================================================================
   4. TYPOGRAPHY ELEMENTS
   ========================================================================== */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--size-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.eyebrow-rule {
  width: 56px;
  height: 1px;
  background: var(--color-accent);
  margin-bottom: var(--space-3);
  border: none;
}
.h1-display {
  font-size: var(--size-display);
  font-weight: 700;
}
.h2-section {
  font-size: var(--size-h2);
  font-weight: 700;
  margin-bottom: var(--space-6);
}
.h3-card {
  font-size: var(--size-h3);
  font-weight: 600;
}
.body-lg {
  font-size: var(--size-body-lg);
  color: var(--color-secondary);
  opacity: 0.85;
}
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: var(--size-button);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: var(--space-3) var(--space-6);
  min-height: 48px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary);
}
.btn--primary:hover { background: var(--color-accent-dim); }

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  padding: calc(var(--space-3) - 1.5px) calc(var(--space-6) - 1.5px);
}
.btn--ghost:hover { background: rgba(192, 144, 79, 0.08); }

.btn--nav {
  min-height: 40px;
  padding: 10px 20px;
  font-size: 0.8rem;
}

/* ==========================================================================
   6. HEADER / STICKY NAV (Option A — locked in sitemap.md)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--space-2);
  background: rgba(18, 22, 31, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-accent-border);
}
@media (min-width: 768px) {
  .site-header { height: 72px; padding: 0 var(--space-3); }
}
.site-header__wordmark {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
}

/* ==========================================================================
   7. HERO
   ========================================================================== */
.hero {
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 900px) {
  .hero { flex-direction: row; align-items: center; gap: var(--space-8); }
  .hero__copy { flex: 0 0 58%; }
  .hero__media { flex: 0 0 38%; }
}
.hero__copy .h1-display { margin-bottom: var(--space-2); }
.hero__copy .body-lg { margin: var(--space-2) 0 var(--space-5); max-width: 46ch; }

/* First-viewport fit (2026-08-18): the hero needs its own, tighter section
   padding than the generic .section rule — the 128px/128px default (plus
   the 72px sticky header) was pushing the CTA below the fold on standard
   desktop viewports. Headline/body/image sizes are untouched — this is a
   padding-only fix, per instruction. #hero has higher specificity than the
   plain .section rule below, so no !important needed. */
#hero.section { padding: var(--space-6) var(--space-2); }
@media (min-width: 768px) {
  #hero.section { padding: var(--space-8) var(--space-3); }
}

.hero__meta { margin-top: var(--space-3); }
.hero__meta-line {
  font-size: var(--size-body-sm);
  color: var(--color-secondary);
  opacity: 0.7;
  margin: 0 0 4px;
}
.hero__meta-line--muted { color: var(--color-text-muted); opacity: 1; }

.frame-bracket {
  position: relative;
  padding: 12px;
}
.frame-bracket::before,
.frame-bracket::after,
.frame-bracket span::before,
.frame-bracket span::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-accent);
}
.frame-bracket::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.frame-bracket::after { top: 0; right: 0; border-left: none; border-bottom: none; }
.frame-bracket span { display: block; position: relative; }
.frame-bracket span::before { bottom: 0; left: 0; border-right: none; border-top: none; }
.frame-bracket span::after { bottom: 0; right: 0; border-left: none; border-top: none; }
.frame-bracket img { border-radius: var(--radius-frame); }

/* ==========================================================================
   8. LIFECYCLE DIAGRAM (What I Do)
   ========================================================================== */
.lifecycle {
  margin-top: var(--space-6);
}
.lifecycle__nodes {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
}
@media (min-width: 900px) {
  .lifecycle__nodes { flex-direction: row; align-items: stretch; gap: var(--space-1); }
}
.lifecycle__node {
  border: 1px solid var(--color-accent-border);
  padding: var(--space-3);
  background: rgba(192, 144, 79, 0.03);
  flex: 1;
}
.lifecycle__node-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 8px;
}
.lifecycle__node-title { font-family: var(--font-heading); font-weight: 600; margin-bottom: 4px; }
.lifecycle__node-sub { font-size: var(--size-body-sm); color: var(--color-text-muted); }
.lifecycle__arrows { width: 100%; height: auto; margin: var(--space-2) 0; display: block; }
.lifecycle__arrow { flex-shrink: 0; align-self: center; }

/* ==========================================================================
   9. CARDS (Services, generic)
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 700px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}
.card {
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-frame);
  padding: var(--space-4);
  background: transparent;
  transition: var(--transition);
}
@media (min-width: 768px) { .card { padding: var(--space-5); } }
.card:hover { transform: translateY(-2px); border-color: var(--color-accent-border-hover); }
.card:active { transform: scale(0.98); }
.card__tag {
  display: inline-block;
  font-size: var(--size-body-sm);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-border-hover);
  background: rgba(192, 144, 79, 0.1);
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.card__deliverable {
  margin-top: var(--space-2);
  font-weight: 500;
  color: var(--color-secondary);
}
.card ul { margin: var(--space-2) 0; }
.card li { margin-bottom: 6px; padding-left: 1.1em; position: relative; }
.card li::before { content: '\2022'; color: var(--color-accent); position: absolute; left: 0; }

/* ==========================================================================
   10. FLAGSHIP PROJECTS
   ========================================================================== */
.flagship-list { display: flex; flex-direction: column; gap: var(--space-4); }
.flagship-item { border-top: 1px solid var(--color-accent-border); padding-top: var(--space-3); }
.flagship-item:first-child { border-top: none; padding-top: 0; }
.flagship-item__stat { color: var(--color-accent); font-weight: 600; }

/* ==========================================================================
   11. CASE STUDIES
   ========================================================================== */
.case-study + .case-study {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-accent-border);
}
.case-study__field { margin-bottom: var(--space-3); }
.case-study__field-label {
  font-family: var(--font-mono);
  font-size: var(--size-body-sm);
  color: var(--color-accent-secondary);
  margin-bottom: 4px;
}
.case-study__field p strong,
.flagship-item p strong { color: var(--color-accent); font-weight: 700; }

/* ==========================================================================
   12. CHIPS (Also Built)
   ========================================================================== */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  font-size: var(--size-body-sm);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-accent-border);
  background: rgba(192, 144, 79, 0.05);
  color: var(--color-secondary);
}

/* ==========================================================================
   13. EXPERIENCE TIMELINE
   ========================================================================== */
.timeline { position: relative; padding-left: var(--space-4); border-left: 1px solid var(--color-accent-border); }
.timeline__item { margin-bottom: var(--space-4); }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__role { font-weight: 600; }
.timeline__meta { font-size: var(--size-body-sm); color: var(--color-text-muted); }

/* ==========================================================================
   14. SKILLS
   ========================================================================== */
.skills-group { margin-bottom: var(--space-4); }
.skills-group:last-child { margin-bottom: 0; }
.skills-group__label {
  font-family: var(--font-mono);
  font-size: var(--size-body-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 6px;
}

/* ==========================================================================
   15. CONTACT FORM (added 2026-08-18 — replaces the mailto CTA)
   ========================================================================== */
.contact-form {
  margin-top: var(--space-6);
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.contact-form__field { display: flex; flex-direction: column; gap: 8px; }
.contact-form__field label {
  font-family: var(--font-mono);
  font-size: var(--size-body-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.contact-form__field input,
.contact-form__field textarea {
  background: var(--color-primary-alt);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--radius-frame);
  color: var(--color-secondary);
  font-family: var(--font-body);
  font-size: var(--size-body);
  padding: var(--space-2);
  min-height: 44px;
}
.contact-form__field textarea { min-height: 120px; resize: vertical; }
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.contact-form button[type="submit"] { align-self: flex-start; }

/* Honeypot — visually hidden but present in the DOM/tab order-free, so
   real screen-reader/keyboard users never encounter it, only bots that
   blindly fill every field. */
.contact-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-notice {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-accent-border-hover);
  border-radius: var(--radius-frame);
  max-width: 480px;
}
.form-notice--success { color: var(--color-accent); }
.form-notice--error { color: var(--color-secondary); border-color: rgba(184, 92, 74, 0.4); }

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-accent-border);
  padding: var(--space-6) var(--space-2);
  text-align: center;
}
.site-footer__wordmark { font-family: var(--font-heading); font-weight: 600; margin-bottom: 8px; }
.site-footer__tagline { color: var(--color-text-muted); font-size: var(--size-body-sm); margin-bottom: var(--space-4); }
.site-footer__copyright { color: var(--color-text-muted); font-size: 0.75rem; margin-top: var(--space-4); }
