:root {
  --void: #0a0d10;
  --surface: #14181c;
  --surface-2: #1b2126;
  --line: #262d31;
  --teal: #24dbe4;
  --teal-steel: #339dab;
  --violet: #9b2bc4;
  --frag-blue: #2f6fd1;
  --silver: #dde1e3;
  --ink: #c3cbce;
  --ink-2: #8a969b;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --container-width: 1200px;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  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;
  left: 1rem;
  top: -3rem;
  background: var(--teal);
  color: var(--void);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transition: top 0.15s ease;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(51, 157, 171, 0.12), transparent 60%),
    var(--void);
  padding: clamp(2rem, 6vh, 5rem) 0 3.5rem;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  text-align: left;
}

.hero-logo {
  flex: 0 0 55%;
  width: 55%;
  height: auto;
}

.hero-motto {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.5vw, 2.1rem);
  letter-spacing: 0.005em;
  color: var(--silver);
  max-width: 32ch;
  margin: 0;
  text-wrap: balance;
}

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-logo {
    flex: none;
    width: min(100%, 480px);
  }

  .hero-motto {
    max-width: 22ch;
    margin: 0 auto;
  }
}

.frag-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.frag {
  position: absolute;
  display: block;
  border-radius: 2px;
  animation: drift 9s ease-in-out infinite;
}

.frag:nth-of-type(1)  { left: 8%;  top: 22%; width: 12px; height: 12px; background: var(--teal);      opacity: .55; --dx: 6px;  --dy: -5px; animation-delay: 0s; }
.frag:nth-of-type(2)  { left: 15%; top: 62%; width: 8px;  height: 8px;  background: var(--violet);    opacity: .5;  --dx: -5px; --dy: 6px;  animation-delay: .7s; }
.frag:nth-of-type(3)  { left: 24%; top: 38%; width: 6px;  height: 6px;  background: var(--frag-blue); opacity: .6;  --dx: 4px;  --dy: 5px;  animation-delay: 1.3s; }
.frag:nth-of-type(4)  { left: 6%;  top: 78%; width: 10px; height: 10px; background: var(--teal-steel);opacity: .45; --dx: -6px; --dy: -4px; animation-delay: 2.1s; }
.frag:nth-of-type(5)  { left: 30%; top: 12%; width: 5px;  height: 5px;  background: var(--violet);    opacity: .4;  --dx: 3px;  --dy: 5px;  animation-delay: 2.8s; }
.frag:nth-of-type(6)  { right: 10%; top: 18%; width: 11px; height: 11px; background: var(--teal);     opacity: .5;  --dx: -5px; --dy: -4px; animation-delay: .4s; }
.frag:nth-of-type(7)  { right: 18%; top: 66%; width: 7px;  height: 7px;  background: var(--violet);    opacity: .45; --dx: 4px;  --dy: 6px;  animation-delay: 1s; }
.frag:nth-of-type(8)  { right: 28%; top: 42%; width: 6px;  height: 6px;  background: var(--frag-blue); opacity: .55; --dx: -4px; --dy: 4px;  animation-delay: 1.6s; }
.frag:nth-of-type(9)  { right: 8%;  top: 80%; width: 9px;  height: 9px;  background: var(--teal-steel);opacity: .4;  --dx: 5px;  --dy: -5px; animation-delay: 2.3s; }
.frag:nth-of-type(10) { right: 34%; top: 10%; width: 5px;  height: 5px;  background: var(--violet);    opacity: .35; --dx: -3px; --dy: 5px;  animation-delay: 2.9s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(var(--dx, 5px), var(--dy, -5px)); }
}

/* ---------- Section divider (fragmentation motif) ---------- */

.frag-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.frag-divider .dot {
  width: 5px;
  height: 5px;
  border-radius: 1px;
}

.frag-divider .dot:nth-child(1) { background: var(--teal);      opacity: .9; }
.frag-divider .dot:nth-child(2) { background: var(--teal-steel);opacity: .7; width: 4px; height: 4px; }
.frag-divider .dot:nth-child(3) { background: var(--violet);    opacity: .8; width: 3px; height: 3px; }
.frag-divider .dot:nth-child(4) { background: var(--frag-blue); opacity: .55; width: 3px; height: 3px; }
.frag-divider .dot:nth-child(5) { background: var(--violet);    opacity: .3;  width: 2px; height: 2px; }

/* ---------- Sections ---------- */

.section {
  padding: 3.5rem 0;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--teal-steel);
  margin-bottom: 0.6rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.01em;
  color: var(--silver);
  margin: 0 0 2rem;
}

/* ---------- Project cards ---------- */

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card--flagship {
  flex-direction: row;
  align-items: flex-start;
  gap: 1.75rem;
}

@media (max-width: 560px) {
  .project-card--flagship {
    flex-direction: column;
  }
}

.project-card--flagship:hover,
.project-card--flagship:focus-within {
  border-color: var(--teal-steel);
}

.project-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-steel), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--void);
}

.project-icon--empty {
  background: var(--surface-2);
  border: 1px dashed var(--line);
}

.project-card-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--silver);
  margin: 0 0 0.5rem;
}

.project-card-body p {
  margin: 0 0 1rem;
  color: var(--ink);
  max-width: 55ch;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease, gap 0.15s ease;
}

.project-link:hover,
.project-link:focus-visible {
  border-color: var(--teal);
  gap: 0.6rem;
}

.project-link-arrow {
  transition: transform 0.15s ease;
}

/* ---------- Muted "coming soon" cards ---------- */

.project-card--muted {
  opacity: 0.55;
}

.project-card--muted .project-card-body h3 {
  color: var(--ink);
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.3rem 0.6rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.footer-contact {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--teal-steel);
  text-decoration: none;
}

.footer-contact:hover,
.footer-contact:focus-visible {
  color: var(--teal);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .frag {
    animation: none;
  }
}
