/* ---------------------------------------------------------------
   Boardwalk — single-page portfolio
   Vanilla CSS, mobile-first. 8pt spacing rhythm.
   --------------------------------------------------------------- */

:root {
  --bg:           #FAFAF7;
  --bg-soft:      #F2F0E9;
  --ink:          #0F1115;
  --ink-soft:     #3A3D45;
  --ink-mute:     #6B6F78;
  --line:         #E7E3D8;
  --accent:       #FF5B2E;
  --accent-ink:   #1A0900;
  --warm:         #F9D976;

  --radius-sm:    10px;
  --radius:       18px;
  --radius-lg:    24px;

  --shadow-sm:    0 1px 2px rgba(15, 17, 21, 0.04), 0 1px 1px rgba(15, 17, 21, 0.03);
  --shadow:       0 6px 18px rgba(15, 17, 21, 0.06), 0 2px 4px rgba(15, 17, 21, 0.04);
  --shadow-lg:    0 20px 50px -10px rgba(15, 17, 21, 0.18), 0 8px 16px -6px rgba(15, 17, 21, 0.08);

  --font-sans:    'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif:   'Instrument Serif', 'Times New Roman', serif;

  --ease:         cubic-bezier(.2, .7, .2, 1);
  --dur:          220ms;

  --container:    1180px;
}

/* ---------------- Reset / base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
em { font-style: normal; color: var(--accent); }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
}
.brand-text { font-size: 16px; }
.site-header nav { display: flex; gap: 6px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  min-height: 36px;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 120px 20px 60px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 600px at 85% 18%, color-mix(in srgb, var(--warm) 70%, transparent), transparent 60%),
    radial-gradient(700px 500px at 10% 80%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.hero-grid {
  width: min(100% - 0px, var(--container));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: 140px 20px 80px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 40px; }
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero-title {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hero-title .line { display: block; }
.hero-title em { font-style: italic; color: var(--accent); }

.hero-sub {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  will-change: transform;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-lg); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------------- Hero stage / character ---------------- */
.hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin-inline: auto;
}
.stage-glow {
  position: absolute;
  inset: 6% 6% 6% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--warm) 80%, transparent), transparent 70%);
  filter: blur(8px);
  z-index: 0;
}
.stage-ground {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(15, 17, 21, 0.22), transparent 70%);
  z-index: 0;
  filter: blur(2px);
}

.character {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: center bottom;
}
.character .layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

/* Stack order (back to front) — z-index */
.layer-feet       { z-index: 1; }
.layer-leg-left   { z-index: 2; transform-origin: 50% 35%; }
.layer-leg-right  { z-index: 2; transform-origin: 50% 35%; }
.layer-body       { z-index: 3; }
.layer-head       { z-index: 4; transform-origin: 50% 75%; }
.layer-arm-left   { z-index: 5; transform-origin: 38% 30%; }
.layer-arm-right  { z-index: 5; transform-origin: 62% 30%; }
.layer-fore-left  { z-index: 6; transform-origin: 38% 30%; }
.layer-fore-right { z-index: 6; transform-origin: 62% 30%; }

/* Decorative items (planes, balloons) */
.decor { position: absolute; z-index: 1; opacity: 0.95; pointer-events: none; }
.decor img { width: 100%; height: auto; }
.decor-plane1 { top:  6%; left: -4%; width: 22%; }
.decor-plane2 { top: 18%; right: -6%; width: 18%; }
.decor-balon1 { top:  4%; right: 14%; width: 12%; }
.decor-balon2 { bottom: 20%; left: -2%; width: 11%; }
@media (max-width: 640px) {
  .decor-plane1 { width: 28%; }
  .decor-plane2 { width: 24%; }
  .decor-balon1 { width: 18%; }
  .decor-balon2 { width: 16%; }
}

/* ---------------- Intro ---------------- */
.intro {
  padding: 80px 0 40px;
}
.intro-title {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 18ch;
}
.intro-body {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 18px);
}

/* ---------------- Projects ---------------- */
.projects {
  padding: 60px 0 100px;
}
.section-head {
  margin: 0 0 36px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.project-card {
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--ink);
}
.project-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.project-card:hover .project-thumb img { transform: scale(1.04); }

.project-meta {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.project-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.project-desc {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  flex-grow: 1;
}
.project-visit {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--dur) var(--ease);
}
.grid-foot {
  margin: 36px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-mute);
}

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.foot-mark {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--ink);
}
.foot-meta {
  font-size: 13px;
  color: var(--ink-mute);
}

/* ---------------- Animation states ----------------
   data-reveal only hides when JS is confirmed (`.has-js` set in <head>).
   No-JS / crawler view: content is fully visible. */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

/* ---------------- Reduced motion ---------------- */
@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
