/* =========================================================
   Maksym Strygun — AI Systems Engineer
   Static portfolio: pure CSS, no frameworks, no dependencies.
   ---------------------------------------------------------
   1.  Design tokens
   2.  Reset & base
   3.  Layout primitives
   4.  Buttons & links
   5.  Header / navigation
   6.  Hero + portrait
   7.  Sections & cards
   8.  Demonstrations
   9.  Workflow steps
   10. About
   11. Contact
   12. Footer & back-to-top
   13. Reveal animations
   14. Responsive
   15. Accessibility / reduced motion
   ========================================================= */

/* ---------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:            #0a0e1a;
  --bg-alt:        #0c1220;
  --surface:       #111a2e;
  --surface-2:     #16203a;
  --surface-3:     #1b2745;

  /* Lines */
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Type */
  --text:          #e8eefb;
  --text-soft:     #c3cee2;
  --muted:         #93a3bd;

  /* Accents */
  --accent:        #3b82f6;
  --accent-strong: #2563eb;
  --accent-light:  #7db0ff;
  --cyan:          #22d3ee;
  --accent-soft:   rgba(59, 130, 246, 0.14);
  --accent-glow:   rgba(59, 130, 246, 0.35);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Type scale (fluid) */
  --fs-xs:   0.78rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --fs-2xl:  clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem);
  --fs-hero: clamp(2.05rem, 1.3rem + 3.4vw, 3.65rem);

  /* Structure */
  --container: 1160px;
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.28s;

  /* Fonts */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------------------------------------------------------
   2. Reset & base
   --------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Ambient light: subtle, purely decorative background wash */
  background-image:
    radial-gradient(ellipse 70% 55% at 78% -8%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 45% at 5% 12%, rgba(34, 211, 238, 0.07), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

img,
picture,
svg { display: block; max-width: 100%; }

img { height: auto; }

h1, h2, h3, h4 {
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

ul, ol { padding: 0; list-style: none; }

a { color: var(--accent-light); text-decoration: none; }

strong { color: #fff; font-weight: 650; }

::selection {
  background: var(--accent);
  color: #fff;
}

/* Consistent, visible focus ring for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   3. Layout primitives
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: var(--space-9);
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, rgba(13, 19, 34, 0) 0%, rgba(13, 19, 34, 0.9) 12%, rgba(13, 19, 34, 0.9) 88%, rgba(13, 19, 34, 0) 100%);
}

.section__head {
  max-width: 760px;
  margin-bottom: var(--space-8);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__eyebrow {
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-4);
}

.section__lead {
  color: var(--muted);
  font-size: var(--fs-lg);
  max-width: 68ch;
}

.section__head--center .section__lead { margin-inline: auto; }

/* A section that ends on its own heading — no grid or list underneath it —
   must not carry that heading's bottom margin into the next section. */
.section__head:last-child { margin-bottom: 0; }

.text-accent {
  color: var(--accent-light);
  background: linear-gradient(96deg, var(--accent-light), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Skip link */
.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 0;
  outline-offset: -4px;
}
/* ---------------------------------------------------------
   4. Buttons & links
   --------------------------------------------------------- */
.btn {
  --btn-py: 0.82rem;
  --btn-px: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--r-full);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.btn--sm {
  --btn-py: 0.55rem;
  --btn-px: 1.1rem;
  font-size: var(--fs-xs);
}

.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 8px 24px -10px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px var(--accent-glow);
}

.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   5. Header / navigation
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(9, 13, 24, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.9);
}

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 750;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px -10px var(--accent-glow);
}

.brand__mark--lg {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: var(--fs-base);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__name {
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand__role {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.primary-nav__link {
  display: inline-block;
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--text-soft);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.22rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-light), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.primary-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.primary-nav__link:hover::after,
.primary-nav__link.is-active::after { transform: scaleX(1); }

.primary-nav__link.is-active { color: #fff; }
/* ---------------------------------------------------------
   6. Hero + portrait
   --------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 6vw, 6rem) clamp(3.5rem, 7vw, 7rem);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

/* Grid children: allow shrinking so long words never force overflow */
.hero__content,
.about__content { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  margin-bottom: var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-size: var(--fs-lg);
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: var(--space-5);
}

.hero__points {
  display: grid;
  gap: 0.55rem;
  margin-bottom: var(--space-6);
}

.hero__points li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-soft);
  font-size: var(--fs-sm);
}

.hero__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237db0ff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 0.62rem no-repeat;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* --- Portrait -------------------------------------------------
   The photograph is used exactly as supplied: no filters, no
   colour grading, no cropping tricks. Only a framing ring and a
   soft light behind it, so it sits naturally on the dark layout.
   -------------------------------------------------------------- */
.hero__media {
  display: flex;
  justify-content: center;
}

.portrait {
  position: relative;
  width: 100%;
  max-width: 400px;
  isolation: isolate;
}

/* Decorative light source placed BEHIND the photo (not applied to it) */
.portrait__glow {
  position: absolute;
  inset: -14% -12% -8%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.42), transparent 62%),
    radial-gradient(circle at 62% 78%, rgba(34, 211, 238, 0.22), transparent 60%);
  filter: blur(28px);
  pointer-events: none;
}

.portrait__img {
  width: 100%;
  height: auto;
  aspect-ratio: 804 / 1072;   /* exact source ratio — no cropping */
  object-fit: cover;
  object-position: center;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 34px 70px -30px rgba(0, 0, 0, 0.95),
    0 0 0 8px rgba(255, 255, 255, 0.02);
}

.portrait__badge {
  position: absolute;
  left: 50%;
  bottom: 1.05rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  border-radius: var(--r-full);
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 550;
  white-space: nowrap;
  max-width: calc(100% - 1.6rem);
}

.portrait__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
}

.primary-nav__cta { margin-left: 0.5rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover { border-color: var(--accent-light); }

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* ---------------------------------------------------------
   7. Cards
   --------------------------------------------------------- */
.card {
  position: relative;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, var(--surface) 0%, var(--bg-alt) 100%);
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(125, 176, 255, 0.5), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.95);
}

.card:hover::before { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--space-4);
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid rgba(125, 176, 255, 0.24);
  color: var(--accent-light);
}

.card__icon svg { width: 23px; height: 23px; }

.card__title {
  font-size: var(--fs-xl);
  font-weight: 650;
  margin-bottom: var(--space-3);
}

.card__text {
  color: var(--muted);
  font-size: 0.94rem;
}

.card__list {
  display: grid;
  gap: 0.42rem;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.card__list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: var(--fs-sm);
  color: var(--text-soft);
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent-light);
  transform: rotate(45deg);
}

/* ---------------------------------------------------------
   8. Demonstrations
   --------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.62rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--demo {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.4);
  color: #8ee9f7;
}

.badge--demo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.project { display: flex; flex-direction: column; }

.project__top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-4);
}

.project__meta {
  margin-top: auto;
  padding-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.project__meta span {
  color: var(--accent-light);
  font-weight: 600;
}

.notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1px dashed var(--border-strong);
  border-left: 3px solid var(--cyan);
  border-radius: var(--r-md);
  background: rgba(34, 211, 238, 0.05);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.notice svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--cyan);
}
/* ---------------------------------------------------------
   9. Workflow steps
   --------------------------------------------------------- */
.steps {
  position: relative;
  display: grid;
  gap: var(--space-5);
}

/* Vertical connector running through the step numbers */
.steps::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(34, 211, 238, 0.35), transparent);
  opacity: 0.5;
  pointer-events: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

.step__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, var(--surface-2), var(--bg-alt));
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.step__body {
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(17, 26, 46, 0.9), rgba(12, 18, 32, 0.75));
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.step:hover .step__body {
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.step__title {
  font-size: var(--fs-xl);
  font-weight: 650;
  margin-bottom: var(--space-2);
}

.step__text {
  color: var(--muted);
  font-size: 0.94rem;
}

.step__deliverable {
  margin-top: var(--space-4);
  padding: 0.6rem 0.95rem;
  border-radius: var(--r-sm);
  background: rgba(59, 130, 246, 0.09);
  border-left: 3px solid var(--accent);
  font-size: var(--fs-sm);
  color: var(--text-soft);
}

.step__deliverable span {
  color: var(--accent-light);
  font-weight: 650;
}

/* ---------------------------------------------------------
   10. About
   --------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about__media {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.about__figure {
  position: relative;
  max-width: 340px;
  margin-inline: auto;
}

/* Soft light behind the photograph — the photo itself is untouched */
.about__figure::before {
  content: "";
  position: absolute;
  inset: -10% -10% -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(59, 130, 246, 0.3), transparent 65%);
  filter: blur(26px);
  pointer-events: none;
}

.about__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 804 / 1072;   /* exact source ratio — no cropping */
  object-fit: cover;
  object-position: center;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.95),
    0 0 0 8px rgba(255, 255, 255, 0.02);
}

.about__caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  margin-top: var(--space-5);
}

.about__caption-name {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.about__caption-role {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.about__text {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: var(--space-4);
  max-width: 66ch;
}

.about__subhead {
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
  font-size: var(--fs-lg);
  font-weight: 650;
}

.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: var(--fs-xs);
  font-weight: 550;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tag:hover {
  border-color: rgba(125, 176, 255, 0.5);
  color: #fff;
}

.principles {
  display: grid;
  gap: 0.7rem;
}

.principles li {
  position: relative;
  padding: 0.7rem 1rem 0.7rem 2.3rem;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.principles li strong { display: inline; }

.principles li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.02rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237db0ff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E")
    center / 0.58rem no-repeat;
}
/* ---------------------------------------------------------
   11. Contact
   --------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--surface) 0%, var(--bg-alt) 100%);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.contact-link:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 176, 255, 0.55);
  box-shadow: 0 24px 46px -28px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(125, 176, 255, 0.12);
}

.contact-link__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid rgba(125, 176, 255, 0.24);
  color: var(--accent-light);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.contact-link__icon svg { width: 22px; height: 22px; }

.contact-link:hover .contact-link__icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.contact-link__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-link__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.contact-link__value {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.contact-link__arrow {
  margin-left: auto;
  font-size: 1.15rem;
  color: var(--accent-light);
  transition: transform var(--dur) var(--ease);
}

.contact-link:hover .contact-link__arrow { transform: translateX(4px); }

.contact-note {
  margin-top: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(22, 32, 58, 0.85), rgba(12, 18, 32, 0.7));
}

.contact-note__title {
  font-size: var(--fs-lg);
  font-weight: 650;
  margin-bottom: var(--space-4);
}

.contact-note__list {
  counter-reset: note;
  display: grid;
  gap: 0.65rem;
}

.contact-note__list li {
  counter-increment: note;
  position: relative;
  padding-left: 2.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.6rem;
  display: flex;
  align-items: center;
}

.contact-note__list li::before {
  content: counter(note);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(125, 176, 255, 0.3);
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---------------------------------------------------------
   12. Footer & back-to-top
   --------------------------------------------------------- */
.site-footer {
  margin-top: var(--space-8);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 18, 32, 0) 0%, rgba(8, 11, 20, 0.9) 100%);
  padding-top: var(--space-8);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  padding-bottom: var(--space-7);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer__name {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.footer__role {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  justify-content: center;
}

.footer__nav a {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-sm);
  color: var(--text-soft);
  font-size: var(--fs-sm);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.footer__nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.footer__note {
  justify-self: end;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.footer__totop {
  font-weight: 600;
}

/* Floating back-to-top button */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(17, 26, 46, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--accent-light);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              visibility var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.to-top svg { width: 20px; height: 20px; }

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* ---------------------------------------------------------
   13. Reveal animations
   Elements start hidden only when JS is present (html.js), so
   the page is fully readable if JavaScript never runs.
   --------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children of a grid for a smoother cascade */
.js .grid > .reveal:nth-child(2) { transition-delay: 0.06s; }
.js .grid > .reveal:nth-child(3) { transition-delay: 0.12s; }
.js .grid > .reveal:nth-child(4) { transition-delay: 0.18s; }
.js .grid > .reveal:nth-child(5) { transition-delay: 0.24s; }
.js .grid > .reveal:nth-child(6) { transition-delay: 0.3s; }
.js .grid > .reveal:nth-child(7) { transition-delay: 0.36s; }
.js .steps > .reveal:nth-child(2) { transition-delay: 0.05s; }
.js .steps > .reveal:nth-child(3) { transition-delay: 0.1s; }
.js .steps > .reveal:nth-child(4) { transition-delay: 0.15s; }
.js .steps > .reveal:nth-child(5) { transition-delay: 0.2s; }

/* ---------------------------------------------------------
   14. Responsive
   --------------------------------------------------------- */

/* Tablet & below: collapse the primary navigation into a panel */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 44px -30px rgba(0, 0, 0, 0.95);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.36s var(--ease), opacity 0.28s var(--ease);
    opacity: 0;
  }

  .primary-nav.is-open {
    max-height: 26rem;
    opacity: 1;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.9rem 1.25rem 1.35rem;
  }

  .primary-nav__link {
    display: block;
    padding: 0.8rem 0.9rem;
    border-radius: var(--r-md);
    font-size: var(--fs-base);
  }

  .primary-nav__link::after { display: none; }

  .primary-nav__link.is-active {
    background: var(--accent-soft);
    color: #fff;
  }

  .primary-nav__cta {
    margin: 0.6rem 0 0;
    width: 100%;
    padding-block: 0.85rem;
    font-size: var(--fs-sm);
  }

  .header__inner { position: relative; }
}

/* Hero stacks below 980px */
@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero__media { order: -1; }

  .portrait { max-width: 330px; }

  .hero__points { max-width: 42rem; }
}

/* About stacks */
@media (max-width: 880px) {
  .about {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .about__media {
    position: static;
    max-width: 380px;
    margin-inline: auto;
  }

  .about__text { margin-inline: auto; }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-5);
  }

  .footer__brand { justify-content: center; }
  .footer__note { justify-self: center; text-align: center; }
}

@media (max-width: 640px) {
  :root { --space-9: 4rem; --header-h: 64px; }

  .container { padding-inline: 1.05rem; }

  .brand__role { display: none; }

  .hero__actions .btn { flex: 1 1 auto; }

  .portrait { max-width: 290px; }

  .portrait__badge {
    font-size: 0.66rem;
    padding-inline: 0.7rem;
  }

  /* Vertical timeline becomes a single column on phones */
  .steps::before { display: none; }

  .step {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .step__num {
    width: 46px;
    height: 46px;
    font-size: var(--fs-xs);
  }

  .step__body { padding: var(--space-5); }

  .contact-note { padding: var(--space-5); }

  .footer__bottom {
    justify-content: center;
    text-align: center;
  }

  .to-top {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}

@media (max-width: 380px) {
  .hero__title { letter-spacing: -0.02em; }
  .portrait { max-width: 245px; }
}

/* ---------------------------------------------------------
   15. Accessibility — reduced motion & printing
   --------------------------------------------------------- */
@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;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .contact-link:hover,
  .btn:hover,
  .step:hover .step__body {
    transform: none;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    background-image: none;
  }

  .site-header,
  .to-top,
  .skip-link,
  .hero__glow,
  .portrait__glow,
  .about__figure::before { display: none !important; }

  .js .reveal { opacity: 1 !important; transform: none !important; }

  .card,
  .contact-link,
  .step__body {
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: none;
  }

  a { color: #000; text-decoration: underline; }
}