:root {
  --bg: #ffffff;
  --ink: #000000;
  --gray-mid: #a9a9a9;   /* tutundzhian gray */
  --gray: #a9a9a9;       /* tutundzhian gray */
  --gray-nav: #cccccc;   /* rgb(204) — nav links */
  --icon: #7e7e7e;       /* contact arrow stroke */
  --surface: #f2f1ef;    /* placeholder blocks */
  --line: #ececea;
  --col: 560px;
  --pad: 16px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", "SF Mono", Menlo, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--bg);
  color: var(--gray);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
a, button, textarea { cursor: none; }
.col { max-width: var(--col); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink); }
strong { color: var(--ink); font-weight: 500; }
img { max-width: 100%; display: block; }

/* inline logos (hero, experience) */
.inline-logo {
  display: inline-block;
  width: 20px; height: 20px;
  border-radius: 4px;
  vertical-align: -4px;
  object-fit: cover;
}
.inline-flag {
  display: inline-block;
  width: 20px; height: 14px;
  border-radius: 3px;
  vertical-align: -1px;
  object-fit: cover;
}
.letter-tile {
  display: inline-flex;
  width: 20px; height: 20px;
  border-radius: 4px;
  vertical-align: -4px;
  background: var(--surface);
  color: var(--gray-mid);
  font-family: var(--mono);
  font-size: 10px; line-height: 1;
  align-items: center; justify-content: center;
}

/* ---------- custom cursor ---------- */
#cursor {
  position: fixed; top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(13, 13, 13, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease, background .2s ease;
}
#cursor.hover { width: 36px; height: 36px; background: rgba(13, 13, 13, 0.08); }
@media (hover: none), (pointer: coarse) {
  body, a, button, textarea { cursor: auto; }
  #cursor { display: none; }
}

/* ---------- nav (fixed) ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 79px;
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 55%, rgba(255,255,255,0));
}
nav .col {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
nav a {
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal;
  color: var(--gray-nav);
}
nav a:hover, nav a.active { color: var(--ink); }
nav a.brand {
  font-family: "Caveat", cursive;
  font-size: 27px;
  line-height: 22px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- hero ---------- */
header { padding-top: 204px; }
.h-title { color: var(--ink); }
.h-tagline { color: var(--gray-mid); }
header .bio { margin-top: 56px; }
header .bio p + p { margin-top: 26px; }

/* ---------- sections ---------- */
section { margin-top: 120px; }
.label {
  font-family: var(--sans);
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--ink);
}
.case .label {
  font-family: "Caveat", cursive;
  font-size: 23px; line-height: 24px; font-weight: 600;
}
.label + p, .label + .rows, .label + .list { margin-top: 32px; }

/* ---------- work rail ---------- */
#work { margin-top: 100px; }
.rail-wrap { overflow-x: auto; scrollbar-width: none; }
.rail-wrap::-webkit-scrollbar { display: none; }
.rail {
  display: flex; gap: 32px;
  width: max-content;
  padding-top: 8px; padding-bottom: 8px;
  padding-left: max(var(--pad), calc((100vw - var(--col)) / 2 + var(--pad)));
  padding-right: max(var(--pad), calc((100vw - var(--col)) / 2 + var(--pad)));
}
.card { display: block; width: 288px; flex: 0 0 auto; }
.card .cover {
  width: 288px; height: 296px;
  background: #f5f5f4;
  border-radius: 18px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: transform .3s ease;
  display: flex; align-items: center; justify-content: center;
}
.card .cover img {
  width: 72%; height: auto;
  max-height: 74%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(13, 13, 13, 0.10);
}
.card .cover img.flat {
  width: 100%; height: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
}
.card .badge {
  font-family: var(--mono);
  font-size: 11px; line-height: 16px; font-weight: 400;
  letter-spacing: 0.48px; text-transform: uppercase;
  color: var(--gray);
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 14px;
}
.card:hover .cover { transform: translateY(-4px); }
.card h3 {
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal; color: var(--ink);
  padding-left: 8px;
}
.card p { color: var(--gray); padding-left: 8px; }

/* ---------- experience rows ---------- */
.rows .intro { margin-bottom: 32px; }
.row { margin-bottom: 32px; }
.row:last-child { margin-bottom: 0; }
.row .when {
  font-family: var(--mono);
  font-size: 12px; line-height: 16px; font-weight: 400;
  letter-spacing: 0.48px; text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 16px;
}
.row h3 {
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal; color: var(--ink);
}
.row h3 span { color: var(--gray); }
.row .desc { margin-top: 2px; }
@media (min-width: 810px) {
  .row { display: grid; grid-template-columns: 146px 1fr; }
  .row .when { margin-bottom: 0; padding-top: 4px; }
}

/* ---------- apps / books / ventures items ---------- */
.vent { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.vent:last-child { margin-bottom: 0; }
.vent .icon {
  width: 40px; height: 40px; flex: 0 0 auto;
  background: var(--surface);
  border-radius: 10px;
  margin-top: 4px;
  overflow: hidden;
}
.vent .icon img { width: 100%; height: 100%; object-fit: cover; }
.vent h3 { font-size: 15px; line-height: 22px; font-weight: 500; letter-spacing: normal; color: var(--ink); }
.vent p { color: var(--gray); }

/* book item — taller cover */
.book-item { display: flex; align-items: flex-start; gap: 20px; }
.book-item .bcover {
  width: 84px; height: 119px; flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(13,13,13,0.10);
}
.book-item .bcover img { width: 100%; height: 100%; object-fit: cover; }
.book-item h3 { font-size: 15px; line-height: 22px; font-weight: 500; letter-spacing: normal; color: var(--ink); }
.book-item p { color: var(--gray); }
.book-item .when {
  font-family: var(--mono);
  font-size: 12px; line-height: 16px; letter-spacing: 0.48px;
  text-transform: uppercase; color: var(--gray);
  margin-top: 8px;
}

/* ---------- writing ---------- */
.post { display: block; margin-bottom: 24px; }
.post:last-child { margin-bottom: 0; }
.post .when {
  font-family: var(--mono);
  font-size: 14px; line-height: 24px; font-weight: 400;
  letter-spacing: 0.14px; color: var(--gray);
}
.post h3 {
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal; color: var(--ink);
  margin-top: 8px;
}
.post:hover h3 { color: var(--gray-mid); }
.post .src {
  font-family: var(--mono);
  font-size: 14px; line-height: 14px; font-weight: 400;
  color: var(--gray);
  margin-top: 9px;
  display: inline-flex; align-items: center; gap: 6px;
}
.src-icon { width: 14px; height: 14px; flex: 0 0 auto; }

/* newsletter subscribe */
.subscribe {
  margin-top: 48px;
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
}
.subscribe h3 { font-size: 15px; line-height: 22px; font-weight: 500; letter-spacing: normal; color: var(--ink); }
.subscribe p { margin-top: 4px; margin-bottom: 16px; }
.sub-form { display: flex; gap: 8px; }
.sub-form input {
  flex: 1; min-width: 0;
  height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
  font-family: var(--sans);
  font-size: 15px; letter-spacing: normal; color: var(--ink);
  outline: none;
}
.sub-form input::placeholder { color: var(--gray) }
.sub-form input:focus { border-color: var(--gray-nav); }
.sub-form button {
  height: 44px; padding: 0 22px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 10px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 500; letter-spacing: normal;
  transition: opacity .2s ease;
}
.sub-form button:hover { opacity: .85; }
.sub-note {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px; line-height: 16px; letter-spacing: 0.48px;
  color: var(--gray);
}
.sub-note a { color: var(--gray-mid); }

/* ---------- contact ---------- */
#contact form { margin-top: 48px; }
#contact .cta-row { display: flex; gap: 8px; margin-top: 12px; }
#contact .cta-row button {
  flex: 1;
  height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px;
  border: none; border-radius: 10px;
  font-family: var(--sans);
  font-size: 15px; font-weight: 500; letter-spacing: normal;
  transition: opacity .2s ease;
}
#contact .cta-row button:hover { opacity: .85; }
#contact .book { background: var(--ink); color: var(--bg); }
#contact .secondary { background: var(--surface); color: var(--ink); }
#contact textarea {
  width: 100%; height: 120px;
  background: var(--surface);
  border: none; border-radius: 12px;
  padding: 16px;
  font-family: var(--sans);
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal; color: var(--ink);
  resize: none; outline: none;
}
#contact textarea::placeholder { color: var(--gray); }
#contact .hint {
  font-family: var(--mono);
  font-size: 12px; line-height: 16px; letter-spacing: 0.48px;
  color: var(--gray-nav);
  margin-top: 8px; text-align: right;
}
.links { margin-top: 40px; }
.links a {
  display: grid;
  grid-template-columns: 24px 260px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--gray);
}
.links a:last-child { margin-bottom: 0; }
.links .arrow { width: 20px; height: 20px; }
.links .arrow path { stroke: var(--icon); transition: stroke .2s ease; }
.links a:hover .arrow path { stroke: var(--ink); }
.links a:hover .value, .links a:hover .key { color: var(--ink); }
@media (max-width: 560px) {
  .links a { grid-template-columns: 24px 1fr auto; }
}

/* ---------- floating chat button ---------- */
.chat-fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  height: 40px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px; font-weight: 500; letter-spacing: normal;
  box-shadow: 0 8px 24px rgba(13, 13, 13, 0.18);
  transition: opacity .2s ease, transform .2s ease;
}
.chat-fab:hover { opacity: .9; transform: translateY(-2px); }

/* ---------- footer ---------- */
footer { margin-top: 160px; padding-bottom: 120px; }
footer .signature {
  font-family: "Caveat", cursive;
  font-size: 40px; line-height: 44px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 52px;
}
footer .fgroup { margin-bottom: 52px; }
footer .fgroup:last-child { margin-bottom: 0; }
footer .fk { color: var(--ink); }
footer .fv { color: var(--gray); }
footer .fv a { color: var(--gray); display: inline-flex; align-items: center; gap: 8px; }
footer .fv a:hover { color: var(--ink); }
footer .fv { display: flex; align-items: center; gap: 8px; }
.fi { width: 15px; height: 15px; flex: 0 0 auto; }

/* ---------- case study pages ---------- */
.case header { padding-top: 160px; }
.case .h-title { margin-top: 16px; }
.case .h-sub { color: var(--gray); margin-top: 2px; }
.case .meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
  margin-top: 48px;
}
@media (min-width: 810px) { .case .meta-grid { grid-template-columns: repeat(4, 1fr); } }
.case .meta-grid .k {
  font-family: var(--sans);
  font-size: 15px; line-height: 22px; font-weight: 500;
  letter-spacing: normal;
  text-transform: lowercase; color: var(--ink);
  margin-bottom: 0;
}
.case .meta-grid .v { color: var(--gray); font-size: 15px; line-height: 22px; }
.case .shots { margin-top: 56px; }
.case .shots img {
  width: 100%;
  border-radius: 12px;
  background: var(--surface);
}
.case .shots img + img { margin-top: 24px; }

/* case content as cards (tutundzhian format) */
.case section { margin-top: 0; }
.case section.next { margin-top: 96px; }
.case .tcard {
  background: #f5f5f4;
  border-radius: 26px;
  padding: 44px 40px;
  margin-bottom: 24px;
}
.case .tcard .label { margin-bottom: 20px; }
.case .tcard p + p { margin-top: 26px; }
.case .icard {
  background: #f5f5f4;
  border-radius: 26px;
  margin-bottom: 24px;
  padding: 44px 36px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.case .icard img {
  width: 82%; height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(13, 13, 13, 0.10);
}
.case .icard.flat { padding: 0; }
.case .icard.flat img { width: 100%; border-radius: 0; box-shadow: none; }
.case header .icard { margin-top: 56px; }
.case section .tcard:first-of-type { margin-top: 0; }
@media (max-width: 560px) {
  .case .tcard { padding: 32px 24px; border-radius: 20px; }
}
.case section p + p { margin-top: 26px; }
.case .metric { color: var(--ink); }
.case .back {
  font-family: var(--mono);
  font-size: 12px; line-height: 16px; letter-spacing: 0.48px;
  text-transform: uppercase;
  color: var(--gray);
}
.case .back:hover { color: var(--ink); }
.case .next { margin-top: 120px; }
