/* Adib Vieira — portfolio
   Near-black field, one electric blue. System sans (Inter when the OS has it). */

:root {
  --bg: #07080c;
  --text: #f4f6f8;
  --muted: #a9b1bf;
  --accent: #3b82f6;
  --on-accent: #061018;
  --line: rgba(255, 255, 255, 0.1);
  --radius: 22px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --header: 60px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }

::selection { background: rgba(59, 130, 246, 0.35); color: #fff; }

:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 60;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
}
.skip:focus { transform: none; }

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  container-type: inline-size;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header);
  background: rgba(7, 8, 12, 0.78);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(7, 8, 12, 0.92); }

.bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--accent); }

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
nav a:hover { color: var(--text); }

.about {
  position: relative;
  isolation: isolate;
  padding: 28px 0 8px;
}
.about::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40px 0 0;
  background: radial-gradient(520px 220px at 100% 0%, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0) 68%);
  pointer-events: none;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.role {
  margin-top: 12px;
  max-width: 36em;
  color: var(--text);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.4;
}

.about-copy {
  margin-top: 14px;
  max-width: 38em;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.band { padding: 32px 0 8px; scroll-margin-top: 72px; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.sec-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.idx {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.arrows { display: none; gap: 8px; }
.arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 0;
}
.arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.arrow:disabled { opacity: 0.32; cursor: default; }

.rail {
  display: flex;
  gap: 16px;
  overflow-x: clip;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 2px 16px;
  margin-inline: -2px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: 6px; }

#video-rail { min-height: calc(min(260px, 74cqi) * 16 / 9 + 22px); }

.vcard {
  flex: 0 0 clamp(210px, 74%, 260px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.vcard video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.011em;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}
.btn.ghost:hover { border-color: var(--accent); }

.contact { padding-bottom: max(72px, calc(env(safe-area-inset-bottom) + 36px)); }
.contact .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact .sec-head { justify-content: center; }
.contact-actions {
  width: min(100%, 420px);
  display: grid;
  gap: 12px;
}
.contact-actions .btn { width: 100%; min-height: 52px; }

.noscript {
  margin: 24px auto 48px;
  max-width: 36em;
  padding: 0 20px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 720px) {
  .wrap {
    padding-left: max(48px, env(safe-area-inset-left));
    padding-right: max(48px, env(safe-area-inset-right));
  }
  #video-rail { min-height: calc(min(260px, 74cqi) * 16 / 9 + 36px); }
  .contact-actions {
    width: auto;
    grid-template-columns: repeat(3, minmax(160px, 200px));
    justify-content: center;
  }
  .rail {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.7) transparent;
  }
  .rail::-webkit-scrollbar { display: block; height: 8px; }
  .rail::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.7);
    border-radius: 99px;
  }
  .rail::-webkit-scrollbar-track { background: transparent; }
}

@media (min-width: 900px) {
  :root { --header: 68px; }
  .about { padding: 56px 0 12px; }
  .band { padding: 48px 0 12px; }
  .sec-head { margin-bottom: 20px; }
  .arrows { display: flex; }
  nav { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .btn, .arrow, .vcard { border: 1px solid ButtonText; }
}
