/* ================================================================
   ABDUL SAMAD - PORTFOLIO DESIGN SYSTEM
   Editorial-premium dark theme. Serif display + sans body.
   One accent color. Restrained motion. No neon, no particle canvas.
   ================================================================ */

:root {
  /* ---- surfaces ---- */
  --bg:            #0a0a0b;
  --surface:       #111113;
  --surface-2:     #17171a;
  --surface-3:     #1e1e22;
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);

  /* ---- text ---- */
  --text:       #ececee;
  --text-dim:   #93939c;
  --text-faint: #55555e;

  /* ---- accent (one dominant hue: cobalt signal blue; one cool neutral secondary) ---- */
  --accent:      #4d6bfe;
  --accent-soft: rgba(77,107,254,0.13);
  --accent-line: rgba(77,107,254,0.38);
  --accent-2:    #7a8aa8;
  --ok:          #4fae8a;
  --on-accent:   #f5f7ff;

  /* ---- type ---- */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- spacing ---- */
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs:  14px;
  --space-sm:  22px;
  --space-md:  40px;
  --space-lg:  76px;
  --space-xl:  128px;
  --space-2xl: 176px;

  /* ---- radius ---- */
  --r-sm: 3px;
  --r-md: 10px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* ---- motion ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --max-w: 1240px;
}

/* ================================================================ RESET */
@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }

/* thin, quiet scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 2px solid var(--bg); }

/* ================================================================ TYPE SCALE */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent-line);
  animation: eyebrowDraw 0.7s var(--ease) 0.15s both;
}
@keyframes eyebrowDraw {
  from { width: 0; opacity: 0; }
  to { width: 24px; opacity: 1; }
}
.display-1 { font-size: clamp(2.6rem, 5.4vw, 5rem); }
.display-2 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
.display-3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
p.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-dim); max-width: 62ch; }
.mono-tag {
  font-family: var(--font-mono); font-size: 0.76rem;
  letter-spacing: 0.02em; color: var(--text-dim);
}

/* ================================================================ LAYOUT */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }
main { display: block; }
section { padding: var(--space-xl) 0; }
.section-head { margin-bottom: var(--space-lg); max-width: 640px; }
.section-head.wide { max-width: 760px; }
.divider { border-top: 1px solid var(--border); }

/* ================================================================ NAV */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 26px 0;
  transition: padding 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  padding: 16px 0;
  background: rgba(10,10,11,0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; row-gap: 10px; }
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
  letter-spacing: -0.01em; flex-shrink: 0;
  display: flex; align-items: baseline; gap: 8px;
}
.brand .brand-dot { color: var(--accent); }
.nav-links {
  display: flex; gap: 4px; margin-left: auto;
}
.nav-links a {
  padding: 8px 13px; border-radius: var(--r-pill);
  font-size: 0.87rem; color: var(--text-dim);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--bg); background: var(--accent); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  font-size: 0.86rem; flex-shrink: 0;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-cta:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); place-items: center;
  margin-left: auto;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 16px; height: 1.5px; background: var(--text);
  position: relative; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }

/* hamburger morphs into an X when the mobile menu is open, driven by the
   aria-expanded state the JS already sets, so no extra class bookkeeping */
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* mobile menu is hidden entirely at desktop widths; responsive.css turns it on below 900px */
.mobile-menu { display: none; }

/* ================================================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border-radius: var(--r-pill);
  font-size: 0.92rem; font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #6683ff; transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); }
.btn-ghost { color: var(--text-dim); padding: 13px 8px; }
.btn-ghost:hover { color: var(--accent); }
.btn svg { width: 16px; height: 16px; }

/* ================================================================ CARDS */
.card {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); padding: var(--space-md);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.card:hover { border-color: var(--border-strong); }

.tag {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.01em;
  color: var(--text-dim); border: 1px solid var(--border);
}

/* ================================================================ FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-md) 0;
  margin-top: var(--space-xl);
}
.footer-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }

/* ================================================================ MISC UTILITIES */
.grad-underline {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
}
.kicker-num {
  font-family: var(--font-mono); color: var(--accent-2); font-size: 0.8rem;
}
.hr-soft { height: 1px; background: var(--border); border: none; margin: var(--space-md) 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--bg);
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 16px; top: 16px; }

/* focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
