/* novovic.info — bright modern SaaS, strategic CTO presence
   ---------------------------------------------------------
   warm white, vibrant selective accents, big bold typography,
   generous rounding, subtle depth, intentional motion.
*/

:root {
  /* Surfaces */
  --bg: #FAF9F5;
  --bg-soft: #F2F1EB;
  --surface: #FFFFFF;
  --surface-elev: #FFFFFF;

  /* Text — warm near-black */
  --ink: #0F1015;
  --ink-1: #2A2B33;
  --ink-2: #5C5D66;
  --ink-3: #8B8C95;
  --ink-4: #B6B7BD;

  /* Borders */
  --line: rgba(15, 16, 21, 0.07);
  --line-strong: rgba(15, 16, 21, 0.14);
  --line-soft: rgba(15, 16, 21, 0.04);

  /* Accents — used selectively */
  --blue:    #3D6BFF;
  --blue-50: #ECF0FF;
  --violet:  #8A5BFF;
  --violet-50: #F2EDFF;
  --emerald: #0EA968;
  --emerald-50: #E6F7EE;
  --amber:   #E89A1F;
  --amber-50: #FCF1DE;
  --rose:    #E5484D;

  /* Primary accent — switched via [data-accent] */
  --primary: var(--blue);
  --primary-soft: var(--blue-50);

  /* Type */
  --font-sans: "Geist", "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --font-display: "Playfair Display", "Geist", "Inter", -apple-system, serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing */
  --pad-x: 88px;
  --pad-y: 96px;
  --max-w: 1280px;

  /* Radii + shadow */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --shadow-1: 0 1px 2px rgba(15,16,21,0.04), 0 1px 0 rgba(15,16,21,0.03);
  --shadow-2: 0 2px 6px rgba(15,16,21,0.05), 0 12px 28px -8px rgba(15,16,21,0.10);
  --shadow-3: 0 6px 16px rgba(15,16,21,0.06), 0 28px 60px -16px rgba(15,16,21,0.14);
  --shadow-primary: 0 8px 22px -6px color-mix(in oklab, var(--primary) 35%, transparent);
}

[data-accent="violet"]  { --primary: var(--violet);  --primary-soft: var(--violet-50); }
[data-accent="emerald"] { --primary: var(--emerald); --primary-soft: var(--emerald-50); }
[data-accent="amber"]   { --primary: var(--amber);   --primary-soft: var(--amber-50); }

/* Dark Theme */
[data-theme="dark"] {
  --bg: #0A0A0C;
  --bg-soft: #121318;
  --surface: #17181F;
  --surface-elev: #1E1F28;

  --ink: #FFFFFF;
  --ink-1: #E0E1E8;
  --ink-2: #A1A3AD;
  --ink-3: #686A74;
  --ink-4: #43444D;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.04);

  --blue-50: rgba(61, 107, 255, 0.15);
  --violet-50: rgba(138, 91, 255, 0.15);
  --emerald-50: rgba(14, 169, 104, 0.15);
  --amber-50: rgba(232, 154, 31, 0.15);

  --shadow-1: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-2: 0 8px 24px -6px rgba(0,0,0,0.6);
  --shadow-3: 0 16px 40px -12px rgba(0,0,0,0.8);
}


[data-density="dense"] {
  --pad-x: 56px;
  --pad-y: 96px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--primary-soft); color: var(--ink); }

a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 100%;
}

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

/* ============ ambient backdrop ============ */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.backdrop::before {
  content: "";
  position: absolute;
  width: 800px; height: 800px;
  top: -200px; right: -200px;
  background: radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--primary) 18%, transparent), transparent 60%);
  filter: blur(20px);
  opacity: 0.7;
}

.backdrop::after {
  content: "";
  position: absolute;
  width: 700px; height: 700px;
  bottom: -150px; left: -200px;
  background: radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--violet) 12%, transparent), transparent 60%);
  filter: blur(20px);
  opacity: 0.6;
}

.app {
  position: relative;
  z-index: 1;
}

/* ============ floating nav ============ */

.nav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: color-mix(in oklab, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-2);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.nav-brand-glyph {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  position: relative;
  flex-shrink: 0;
}

.nav-brand-glyph::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: var(--surface);
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
  margin: 0 6px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
  letter-spacing: -0.008em;
}

.nav-link:hover { color: var(--ink); background: var(--bg-soft); }
.nav-link.active { color: var(--ink); background: var(--bg-soft); }

.nav-cta {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  border-radius: 999px;
  margin-left: 4px;
  letter-spacing: -0.008em;
  transition: background .18s ease, transform .18s ease;
}

.nav-cta:hover { background: linear-gradient(135deg, #6331e7 0%, #8064fa 100%); color: #fff; transform: translateY(-1px); }

/* ============ section primitives ============ */

.section {
  padding: var(--pad-y) var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* On mobile, skip the scroll-reveal entirely — content is visible by default.
   Prevents tall sections (e.g. Projects with 6 stacked cards) from getting
   stuck invisible if the IntersectionObserver misbehaves on the device. */
@media (max-width: 900px) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}


.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 80px;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-1);
}

.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 18%, transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.04;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.section-title em {
  font-style: normal;
  background: linear-gradient(105deg, var(--primary) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-desc {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 620px;
  margin: 0;
  text-wrap: pretty;
}

/* ============ hero ============ */

.hero {
  padding: 132px var(--pad-x) 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 60px);
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-left { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; position: relative; z-index: 1; }

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
}

.hero-pill-tag {
  padding: 2px 8px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(46px, 5.4vw, 76px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.038em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.hero-headline em {
  font-style: normal;
  background: linear-gradient(105deg, var(--primary) 0%, var(--violet) 60%, var(--primary) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 8s ease-in-out infinite;
}

@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
  max-width: 520px;
  text-wrap: pretty;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}

/* Stack both theme variants in the same grid cell so the parent reserves
   max(light, dark) width — swapping themes only flips visibility, never reflows. */
[data-theme="dark"] .proj-card-logo img.logo-light { visibility: hidden; }
:root:not([data-theme="dark"]) .proj-card-logo img.logo-dark { visibility: hidden; }
.btn-primary:hover { background: linear-gradient(135deg, #6331e7 0%, #8064fa 100%); color: #fff; border-color: #6331e7; transform: translateY(-1px); box-shadow: 0 8px 22px -6px color-mix(in oklab, #6331e7 40%, transparent); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }

.btn-arr {
  width: 14px; height: 1.5px;
  background: currentColor;
  position: relative;
  transition: width .2s ease;
  border-radius: 1px;
}
.btn-arr::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transform-origin: right top;
}
.btn:hover .btn-arr { width: 20px; }

.hero-foot {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 560px;
}

.hero-foot-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-foot-num {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.028em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero-foot-num em {
  font-style: normal;
  background: linear-gradient(105deg, var(--primary), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-foot-key {
  font-size: 13.5px;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}

.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============ X-O game ============ */

.xo-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 28px;
  box-shadow: var(--shadow-3);
}

.xo-skeleton {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1.05;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-3);
  background-image: linear-gradient(110deg, transparent 35%, color-mix(in oklab, var(--ink) 4%, transparent) 50%, transparent 65%);
  background-size: 200% 100%;
  animation: xo-skel 1.4s linear infinite;
}
@keyframes xo-skel {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.xo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.xo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
}

.xo-title-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--emerald) 22%, transparent);
}

.xo-reset {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background .15s ease, color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.xo-reset:hover { background: var(--bg-soft); color: var(--ink); }

.xo-prompt {
  font-size: 15px;
  color: var(--ink-1);
  line-height: 1.45;
  margin: 0 0 18px;
  min-height: 44px;
  text-wrap: pretty;
}

.xo-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.xo-cell {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
  overflow: hidden;
}

.xo-cell:hover:not(.xo-played):not(.xo-disabled) {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.xo-cell-label {
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: -0.008em;
  font-weight: 500;
  line-height: 1.25;
  z-index: 2;
  text-wrap: balance;
}

.xo-cell-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0;
  z-index: 2;
  align-self: flex-end;
}

.xo-cell.xo-played {
  cursor: default;
}

.xo-cell.xo-x {
  background: linear-gradient(150deg, color-mix(in oklab, var(--primary) 14%, var(--surface)) 0%, color-mix(in oklab, var(--violet) 12%, var(--surface)) 100%);
  border-color: color-mix(in oklab, var(--primary) 30%, transparent);
}
.xo-cell.xo-x .xo-cell-label { color: var(--ink); }

.xo-cell.xo-o {
  background: linear-gradient(150deg, color-mix(in oklab, var(--amber) 14%, var(--surface)), color-mix(in oklab, var(--emerald) 10%, var(--surface)));
  border-color: color-mix(in oklab, var(--amber) 30%, transparent);
}

.xo-cell.xo-disabled { opacity: 0.55; cursor: default; }

.xo-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: xoPop .28s cubic-bezier(.34,1.56,.64,1) both;
  z-index: 1;
}

@keyframes xoPop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.xo-mark svg { width: 56%; height: 56%; }

.xo-mark-x line {
  stroke-width: 8;
  stroke-linecap: round;
}

.xo-mark-o circle {
  stroke: var(--amber);
  stroke-width: 8;
  fill: none;
}

.xo-winline {
  position: absolute;
  background: linear-gradient(90deg, var(--primary), var(--violet));
  border-radius: 999px;
  height: 6px;
  transform-origin: left center;
  z-index: 4;
  pointer-events: none;
  animation: xoLine .35s cubic-bezier(.4,0,.2,1) both;
  box-shadow: 0 4px 14px color-mix(in oklab, var(--primary) 40%, transparent);
}
@keyframes xoLine {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* read-out below board */
.xo-readout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.xo-meter {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.xo-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.xo-meter-val {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}

.xo-meter-track {
  height: 6px;
  background: rgba(15,16,21,0.05);
  border-radius: 999px;
  overflow: hidden;
}

.xo-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--violet));
  border-radius: 999px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
}
.xo-meter-fill.warn { background: linear-gradient(90deg, var(--amber), var(--rose)); }
.xo-meter-fill.good { background: linear-gradient(90deg, var(--emerald), var(--violet)); }

.xo-insight {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--primary-soft);
  font-size: 13.5px;
  color: var(--ink-1);
  line-height: 1.45;
  border: 1px solid color-mix(in oklab, var(--primary) 18%, transparent);
  min-height: 56px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.xo-insight-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  padding-top: 3px;
}

.xo-summary {
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--ink) 0%, #232432 100%);
  color: white;
  font-size: 14.5px;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}
.xo-summary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--font-mono);
}
.xo-summary-text { color: white; text-wrap: pretty; }
.xo-summary-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13.5px;
  color: white;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
  cursor: pointer;
}

[data-theme="dark"] .xo-summary {
  background: linear-gradient(135deg, #2A2B36 0%, #1B1C24 100%);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ============ thinking grid ============ */

.thinking-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.think-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow: var(--shadow-1);
}

.think-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-3);
  border-color: var(--line-strong);
}

.think-card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

.think-card-step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: baseline;
}

.think-card-step-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 4px;
}

.think-card-step-val {
  font-size: 17.5px;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.3;
  font-weight: 500;
}

.think-card-arrow {
  height: 18px;
  display: flex;
  align-items: center;
  margin-left: 90px;
  color: var(--ink-4);
  font-size: 18px;
  line-height: 1;
}

.think-card-step.outcome .think-card-step-val {
  background: linear-gradient(105deg, var(--primary), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ projects ============ */

.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: var(--shadow-1);
}

.proj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }

.proj-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.proj-card-media svg,
.proj-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.proj-card-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-1);
  font-family: var(--font-display);
}

.proj-card[data-tint="violet"]  .proj-card-logo { color: var(--violet); }
.proj-card[data-tint="blue"]    .proj-card-logo { color: var(--blue); }
.proj-card[data-tint="emerald"] .proj-card-logo { color: var(--emerald); }
.proj-card[data-tint="amber"]   .proj-card-logo { color: var(--amber); }

.proj-card-logo.is-image {
  padding: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  min-width: 0;
  height: 32px;
  display: grid;
  grid-template-rows: 32px;
  justify-items: end;
  align-items: center;
}

.proj-card-logo.is-image img {
  grid-column: 1;
  grid-row: 1;
  height: 32px;
  width: auto;
  max-width: 140px;
  display: block;
  object-fit: contain;
  object-position: right center;
}

.proj-card-media .proj-card-idx {
  position: absolute;
  top: 18px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  background: rgba(15,16,21,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.proj-card-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.proj-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proj-card-domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.proj-card-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
}

.proj-card-title {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin: 0;
  position: relative;
  z-index: 1;
}

.proj-card-tag {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
  position: relative;
  z-index: 1;
}

.proj-card-story {
  margin-top: auto;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px 14px;
  font-size: 13.5px;
  color: var(--ink-1);
  line-height: 1.45;
  position: relative;
  z-index: 1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.proj-card-story-key {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.proj-card-story-val {
  color: var(--ink-1);
  text-wrap: pretty;
}

.proj-card-story-val strong {
  font-weight: 500;
  color: var(--ink);
}

.proj-card.is-clickable { cursor: pointer; }
.proj-card.is-clickable:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ============ project modal ============ */

.proj-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 21, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: proj-modal-fade .18s ease-out;
}

@keyframes proj-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes proj-modal-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.proj-modal {
  position: relative;
  width: min(1600px, 97vw);
  height: min(880px, 92vh);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  overflow: hidden;
  animation: proj-modal-rise .22s ease-out;
}

.proj-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  transition: transform .15s ease, background .15s ease;
}
.proj-modal-close:hover { transform: scale(1.05); }
.proj-modal-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.proj-modal-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
.proj-modal-media img,
.proj-modal-media svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: left center;
}

.proj-modal-body {
  padding: 56px 48px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.proj-modal-title {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0;
}

.proj-modal-tag {
  font-size: 16px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}

.proj-modal-story {
  margin-top: 12px;
  font-size: 14.5px;
  grid-template-columns: 110px 1fr;
}

@media (max-width: 900px) {
  .proj-modal-backdrop { padding: 16px; }
  .proj-modal {
    grid-template-columns: 1fr;
    grid-template-rows: 38vh 1fr;
    height: min(900px, 92vh);
  }
  .proj-modal-media { border-right: none; border-bottom: 1px solid var(--line); }
  .proj-modal-body { padding: 32px 24px; }
  .proj-modal-title { font-size: 32px; }
}

/* ============ principles ============ */

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 40px 32px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.principle:nth-last-child(-n+2) { border-bottom: none; }
.principle:nth-child(odd) { border-right: 1px solid var(--line); }

.principle-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  padding-top: 6px;
}

.principle-text {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.022em;
  font-weight: 500;
  color: var(--ink-1);
  margin: 0 0 12px;
  text-wrap: balance;
}

.principle-text strong {
  color: var(--ink);
  font-weight: 600;
  font-style: normal;
}

.principle-note {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
  line-height: 1.5;
}

/* ============ CTO Value ============ */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease;
}

.value-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }

.value-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.value-card-icon svg { width: 22px; height: 22px; }

.value-card[data-tone="blue"]    .value-card-icon { background: var(--blue-50);    color: var(--blue); }
.value-card[data-tone="violet"]  .value-card-icon { background: var(--violet-50);  color: var(--violet); }
.value-card[data-tone="emerald"] .value-card-icon { background: var(--emerald-50); color: var(--emerald); }
.value-card[data-tone="amber"]   .value-card-icon { background: var(--amber-50);   color: var(--amber); }

.value-card-pain {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.value-card-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

.value-card-body {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
  text-wrap: pretty;
}

/* ============ contact ============ */

.contact {
  margin: 0 auto;
  max-width: var(--max-w);
  padding: var(--pad-y) var(--pad-x) calc(var(--pad-y) - 40px);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
  align-items: start;
}

.contact-left h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.8vw, 64px);
  font-weight: 500;
  letter-spacing: -0.034em;
  line-height: 1.0;
  margin: 0 0 24px;
  text-wrap: balance;
}

.contact-left h2 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--primary), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-left p {
  font-size: 18px;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 500px;
  line-height: 1.5;
  text-wrap: pretty;
}

.contact-quick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: grid;
  grid-template-columns: 40px 1fr 16px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.contact-row:hover {
  background: var(--bg-soft);
  border-color: var(--line-strong);
  transform: translateX(2px);
}

.contact-quick-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-quick-icon svg { width: 18px; height: 18px; }

.contact-quick-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-key {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}

.contact-val {
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.012em;
  font-weight: 500;
}

.contact-arrow {
  color: var(--ink-4);
  transition: transform .2s ease, color .2s ease;
  font-size: 14px;
}
.contact-row:hover .contact-arrow { transform: translateX(3px); color: var(--primary); }

/* ============ contact form ============ */

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 32px;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
}

.contact-form-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.022em;
  margin: 0;
  color: var(--ink);
}

.contact-form-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
}

.contact-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-field input,
.contact-field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  letter-spacing: -0.008em;
  resize: vertical;
  font-family: inherit;
}

.contact-field textarea { min-height: 120px; line-height: 1.5; }

.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--ink-4); }

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 14%, transparent);
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-chip {
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  letter-spacing: -0.008em;
}

.contact-chip:hover { background: var(--bg-soft); color: var(--ink); }
.contact-chip.active {
  background: var(--primary-soft);
  border-color: color-mix(in oklab, var(--primary) 40%, transparent);
  color: var(--primary);
  font-weight: 500;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.contact-submit:disabled { opacity: 0.7; cursor: wait; }

.contact-error {
  margin: 0;
  font-size: 13px;
  color: #c0392b;
}

/* sent state */
.contact-sent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 4px;
  animation: fadeUp .35s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.contact-sent-icon {
  width: 48px; height: 48px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-sent-icon svg { width: 26px; height: 26px; }

.contact-sent-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.024em;
  margin: 0;
  color: var(--ink);
}

.contact-sent-text {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
}

.contact-sent-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 6px;
  letter-spacing: -0.008em;
}
.contact-sent-cta:hover .btn-arr { width: 22px; }

/* ============ Testimonials ============ */

/* SVG Animations for Projects */
.anim-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.anim-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-line 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

/* ============ footer ============ */

.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px var(--pad-x) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-3);
  font-size: 13px;
}

.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }

/* ============ responsive ============ */

/* ============ responsive ============ */

/* 721–1440 — nav stretches to content width instead of floating centred. */
@media (min-width: 721px) and (max-width: 1440px) {
  .nav {
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2 * var(--pad-x));
    max-width: var(--max-w);
    justify-content: space-between;
  }
}

/* Below 1100 — stack grids and tighten gutters. Nav still shows links. */
@media (max-width: 1100px) {
  :root { --pad-x: 56px; --pad-y: 72px; }
  .hero { grid-template-columns: 1fr; gap: 56px; padding-top: 120px; min-height: auto; }
  .hero-right { order: 0; }
  .thinking-grid { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .principle:nth-child(odd) { border-right: none; }
  .principle { padding: 32px 20px; }
  .contact { grid-template-columns: 1fr; gap: 40px; padding-top: 80px; }
}

/* Mobile (≤720) — collapse nav links into the compact bar. */
@media (max-width: 720px) {
  :root { --pad-x: 24px; }
  .nav { left: 16px; right: 16px; transform: none; justify-content: space-between; padding: 6px; }
  .nav-link { display: none; }
}

/* ============ Cookie consent ============ */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  max-width: 460px;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: cookie-in .35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cookie-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-banner-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-1);
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn { padding: 9px 16px; font-size: 13px; }

@media (max-width: 600px) {
  .cookie-banner { left: 16px; right: 16px; bottom: 16px; max-width: none; padding: 16px; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-btn { flex: 1; justify-content: center; }
}
