@charset "UTF-8";
/* =============================================================
   SKYENGINEX — core
   Design tokens, reset, typography, layout primitives,
   header, buttons, forms, footer.
   ============================================================= */

:root {
  /* Surfaces — matte obsidian */
  --void:            #08090C;
  --bg:              #0B0C10;
  --surface:         #101219;
  --surface-2:       #141821;
  --slate:           #1F2633;

  /* Ink */
  --ink:             #EDEEF2;
  --ink-2:           #A8AEBD;
  --muted:           #858C9E;   /* 5.81:1 on --bg */
  --faint:           #737A8D;   /* 4.56:1 on --bg — dimmest colour allowed for text */
  --ghost:           #4A5162;   /* decorative only: hairlines, ticks. Never text. */

  /* Brand */
  --accent:          #9966CC;
  --accent-bright:   #BB93EA;
  --accent-deep:     #6B4A94;
  --accent-wash:     rgba(153, 102, 204, 0.12);
  --accent-line:     rgba(153, 102, 204, 0.34);

  /* Lines */
  --line:            rgba(237, 238, 242, 0.08);
  --line-2:          rgba(237, 238, 242, 0.14);
  --line-3:          rgba(237, 238, 242, 0.22);

  /* Type — SF Pro on Apple hardware, Inter (its closest free analogue)
     everywhere else. SF Pro is not licensed for web self-hosting, so it is
     requested from the OS rather than shipped with the site.
     Light 300 at display sizes, Regular 400 for everything else. */
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
             "Inter", system-ui, "Segoe UI", sans-serif;
  --body:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
             "Inter", system-ui, "Segoe UI", sans-serif;
  --mono:    ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Metrics */
  --container: 1340px;
  --gutter: clamp(20px, 5vw, 68px);
  --section-y: clamp(88px, 13vh, 172px);
  --radius: 4px;
  --radius-lg: 10px;
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: -0.005em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page-wide film grain — keeps flat blacks from banding */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  will-change: transform;
  animation: grainshift 6s steps(6) infinite;
}
@keyframes grainshift {
  0%   { transform: translate3d(0, 0, 0); }
  16%  { transform: translate3d(-3%, 2%, 0); }
  33%  { transform: translate3d(2%, -3%, 0); }
  50%  { transform: translate3d(-2%, -2%, 0); }
  66%  { transform: translate3d(3%, 1%, 0); }
  83%  { transform: translate3d(-1%, 3%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #0B0C10; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; background: var(--accent); color: #0B0C10;
  font-family: var(--mono); font-size: 12px; border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Typography scale ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
}

/* Light is reserved for display sizes. Much below 26px it goes spindly, so
   card titles and anything smaller stay at Regular. */
h1, h2 { font-weight: 300; line-height: 1.05; letter-spacing: -0.028em; }
h3, h4 { font-weight: 400; line-height: 1.18; letter-spacing: -0.02em; }

.display-xl { font-size: clamp(2.7rem, 7.2vw, 6.9rem); font-weight: 300; letter-spacing: -0.032em; line-height: 1.03; }
.display-l  { font-size: clamp(2.05rem, 4.5vw, 3.9rem); font-weight: 300; letter-spacing: -0.028em; line-height: 1.06; }
.display-m  { font-size: clamp(1.6rem, 3vw, 2.5rem);    font-weight: 300; letter-spacing: -0.024em; line-height: 1.1; }
.display-s  { font-size: clamp(1.2rem, 1.8vw, 1.5rem);  font-weight: 400; letter-spacing: -0.018em; line-height: 1.24; }

p { margin: 0; }
.lede {
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  line-height: 1.66;
  color: var(--ink-2);
  max-width: 62ch;
}
.body-copy { color: var(--ink-2); max-width: 66ch; }
.small { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }

.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
}
.accent { color: var(--accent-bright); }
.dim { color: var(--muted); }

/* ---------- Layout ---------- */

.shell {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: clamp(64px, 8vh, 108px); }
.section--ruled { border-top: 1px solid var(--line); }

/* Section header: mono index + eyebrow + display heading */
.sec-head { display: grid; gap: clamp(18px, 2.4vw, 28px); margin-bottom: clamp(38px, 5.5vw, 76px); }
.sec-tag {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.sec-tag i {
  font-style: normal;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sec-tag::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
.sec-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.68fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
@media (max-width: 900px) { .sec-head-row { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: transform 0.45s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.site-header.is-stuck {
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand svg { width: 24px; height: 23px; color: var(--accent); transition: color 0.3s var(--ease); }
.brand:hover svg { color: var(--accent-bright); }
.brand-name {
  font-family: var(--display); font-weight: 400;
  font-size: 0.9375rem; letter-spacing: 0.14em; text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 1.9vw, 30px); }
.site-nav a {
  position: relative;
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
  padding-block: 6px;
  transition: color 0.25s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.is-current { color: var(--ink); }

.header-cta { display: flex; align-items: center; gap: 12px; }

@media (max-width: 1080px) { .site-nav, .header-cta .btn { display: none; } }

/* Mobile menu */
.menu-btn {
  display: none;
  width: 42px; height: 42px;
  background: none; border: 1px solid var(--line-2); border-radius: var(--radius);
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  transition: border-color 0.3s var(--ease);
}
.menu-btn:hover { border-color: var(--line-3); }
.menu-btn span {
  display: block; position: relative;
  width: 16px; height: 1px; background: var(--ink);
  transition: background 0.2s;
}
.menu-btn span::before, .menu-btn span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: var(--ink);
  transition: transform 0.35s var(--ease);
}
.menu-btn span::before { top: -5px; }
.menu-btn span::after { top: 5px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 1080px) { .menu-btn { display: inline-flex; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(8, 9, 12, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: calc(var(--header-h) + 28px) var(--gutter) 36px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--display); font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 300; letter-spacing: -0.024em;
  padding-block: 9px;
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.25s;
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu nav a:hover { color: var(--accent-bright); }
.mobile-menu nav a i {
  font-style: normal; font-family: var(--mono); font-size: 0.5625rem;
  letter-spacing: 0.16em; color: var(--accent);
}
.mobile-menu-foot { display: grid; gap: 14px; }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 22px; height: 46px;
  border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 400;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.btn svg { width: 13px; height: 13px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { background: var(--accent); color: #0B0C10; font-weight: 500; }
.btn--primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.5) 50%, transparent 80%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease);
}
.btn--primary:hover { background: var(--accent-bright); }
.btn--primary:hover::before { transform: translateX(110%); }
.btn--primary > * { position: relative; z-index: 1; }

.btn--ghost { border-color: var(--line-2); color: var(--ink); background: rgba(255,255,255,0.014); }
.btn--ghost:hover { border-color: var(--accent-line); color: var(--accent-bright); background: var(--accent-wash); }

.btn--sm { height: 38px; padding: 0 16px; font-size: 0.625rem; }
.btn--lg { height: 54px; padding: 0 30px; }

/* Inline text link with underline sweep */
.link {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); padding-bottom: 3px;
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; opacity: 0.28;
  transform-origin: right; transition: transform 0.45s var(--ease), opacity 0.3s;
}
.link:hover { color: var(--accent-bright); }
.link:hover::after { opacity: 1; }
.link svg { width: 12px; height: 12px; transition: transform 0.35s var(--ease); }
.link:hover svg { transform: translate(3px, -3px); }

/* ---------- Forms ---------- */

.field { display: grid; gap: 9px; }
.field > label, .field-label {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.field .req { color: var(--accent); }

.input, .textarea, .select {
  width: 100%;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 0.9375rem;
  color: var(--ink);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--line-3); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent-line);
  background: rgba(153, 102, 204, 0.05);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767D8F' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
  padding-right: 38px;
}
.select option { background: var(--surface); color: var(--ink); }

.field-error {
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.1em;
  color: #E0736B;
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: rgba(224, 115, 107, 0.6);
}

/* Checkbox */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  flex: none; width: 18px; height: 18px; margin-top: 2px;
  border: 1px solid var(--line-3); border-radius: 3px;
  display: grid; place-items: center;
  transition: border-color 0.25s, background 0.25s;
}
.check .box svg { width: 11px; height: 11px; opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.25s var(--ease); color: #0B0C10; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.check .txt { font-size: 0.875rem; color: var(--ink-2); line-height: 1.55; }
.check a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 3px; }

/* Range / skill level */
.skill { display: grid; gap: 8px; }
.skill-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.skill-name { font-size: 0.875rem; color: var(--ink); }
.skill-val { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em; color: var(--accent-bright); }
.skill input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 20px; background: none; cursor: pointer; margin: 0;
}
.skill input[type="range"]::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 0%), var(--line-2) var(--fill, 0%));
}
.skill input[type="range"]::-moz-range-track { height: 2px; border-radius: 2px; background: var(--line-2); }
.skill input[type="range"]::-moz-range-progress { height: 2px; border-radius: 2px; background: var(--accent); }
.skill input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; margin-top: -5.5px;
  border-radius: 50%; background: var(--ink); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  transition: transform 0.2s var(--ease);
}
.skill input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--accent);
}
.skill input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.18); }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: var(--void);
  padding-block: clamp(56px, 7vw, 88px) 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.8fr));
  gap: clamp(32px, 4vw, 56px);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .brand { margin-bottom: 20px; }
.footer-brand svg { width: 30px; height: 28px; }
.footer-slogan {
  font-family: var(--display); font-weight: 300; font-size: 1.125rem;
  letter-spacing: -0.018em; line-height: 1.38; color: var(--ink-2); max-width: 26ch;
}
.footer-col h3 {
  font-family: var(--mono); font-size: 0.625rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { font-size: 0.875rem; color: var(--ink-2); transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--accent-bright); }

.footer-base {
  margin-top: clamp(44px, 6vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center;
}
.footer-base p { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; }

/* ---------- Reveal primitives (JS-driven, CSS fallback safe) ---------- */

.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal-line { display: block; overflow: hidden; padding-block: 0.06em; }
.js .reveal-line > span { display: block; transform: translateY(105%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  body::after { animation: none; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .js .reveal-line > span { transform: none !important; }
}
