:root {
  --bg: #f4f4f2;
  --ink: #0d0d0d;
  --muted: #6b6b6b;
  --line: #dcdcd8;
  --accent: #3cf26b;
  --card: #ffffff;
  --radius: 10px;
  --max: 1280px;
  --font: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* Faint vertical guide lines like the reference */
.guides {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  max-width: var(--max); margin: 0 auto;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background-image: linear-gradient(to right, transparent calc(50% - 0.5px), var(--line) calc(50% - 0.5px), var(--line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  opacity: .7;
}
main, header, footer { position: relative; z-index: 1; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,244,242,.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; letter-spacing: -0.02em; text-decoration: none; font-size: 15px; }
.brand sup { font-size: 9px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.nav ul { display: flex; gap: 22px; list-style: none; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a.active { text-decoration: underline; text-underline-offset: 4px; }
.pill { background: var(--accent); color: #062b10; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.menu-btn { display: none; background: none; border: 0; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }

/* Hero */
.hero { position: relative; height: min(88vh, 860px); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: heroIn 1.6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes heroIn { to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0) 40%, rgba(0,0,0,.45)); }
.hero h1 {
  position: absolute; left: 0; right: 0; top: 38px; z-index: 2;
  text-align: center; color: #fff;
  font-size: clamp(40px, 8.4vw, 124px); line-height: .92; letter-spacing: -0.05em; font-weight: 700;
}
.hero .tag {
  position: absolute; left: 20px; bottom: 20px; z-index: 2; color: #fff; font-size: 13px; font-weight: 500;
  display: flex; gap: 8px; align-items: center;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; box-shadow: 0 0 0 4px rgba(60,242,107,.25); }

/* Info strip under the hero */
.strip { border-bottom: 1px solid var(--line); }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.strip-grid > div { padding: 18px 0 18px 20px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; border-left: 1px solid var(--line); }
.strip-grid > div:first-child { border-left: 0; padding-left: 0; }
.strip small { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.strip a { text-decoration: none; }
.strip a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) {
  .strip-grid { grid-template-columns: 1fr; }
  .strip-grid > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .strip-grid > div:first-child { border-top: 0; }
}

/* Sections */
section { border-bottom: 1px solid var(--line); }
.section-pad { padding: 72px 0; }
.label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 26px; }
.label .dot { width: 7px; height: 7px; box-shadow: none; }
.cross { display: flex; justify-content: space-between; font-weight: 300; font-size: 22px; line-height: 1; color: var(--ink); padding: 0 0; margin: -11px -7px 0; user-select: none; }

.lede { font-size: clamp(24px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 500; max-width: 980px; }
.lede b { font-weight: 700; }
.lede .muted { color: var(--muted); }
.cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.cta:hover { border-color: var(--accent); }

/* Gallery */
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.gallery-head h2 { font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.045em; line-height: .95; font-weight: 700; }
.tabs { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px; }
.tabs button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: transparent; padding: 8px 16px; border-radius: 99px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--ink); color: #fff; }

.masonry { columns: 3 320px; column-gap: 12px; }
.masonry figure { break-inside: avoid; margin-bottom: 12px; border-radius: var(--radius); overflow: hidden; position: relative; cursor: zoom-in; background: #ddd; border: 1px solid var(--line); }
.masonry img { width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s; }
.masonry figure:hover img { transform: scale(1.035); }
.masonry figcaption { position: absolute; left: 10px; bottom: 10px; background: rgba(13,13,13,.72); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 99px; opacity: 0; transform: translateY(6px); transition: .3s; }
.masonry figure:hover figcaption { opacity: 1; transform: none; }
.fade { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.fade.in { opacity: 1; transform: none; }

.see-more { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 14px; padding: 16px 18px; background: var(--accent); color: #062b10; border-radius: var(--radius); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; border: 1px solid rgba(0,0,0,.08); }
.see-more:hover { filter: brightness(.95); }

/* Work grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; }
.card h3 { font-size: 20px; letter-spacing: -0.02em; font-weight: 700; line-height: 1.1; }
.card p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.card .num { font-size: 42px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.services { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.services span { border: 1px solid var(--ink); border-radius: 99px; padding: 7px 14px; font-size: 13px; font-weight: 600; }

blockquote { margin-top: 56px; font-size: clamp(20px, 2.6vw, 32px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 500; max-width: 920px; }
blockquote cite { display: block; margin-top: 16px; font-style: normal; font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split img { border-radius: var(--radius); border: 1px solid var(--line); }
.split p { font-size: 17px; color: #2b2b2b; margin-bottom: 14px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.copy-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font: inherit; font-weight: 600; font-size: 15px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 10px 16px; cursor: pointer; }
.copy-btn small { color: var(--muted); font-weight: 500; }
form { display: grid; gap: 12px; }
input, textarea { font: inherit; font-size: 15px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 100%; }
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.btn { font: inherit; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .02em; background: var(--ink); color: #fff; border: 0; border-radius: var(--radius); padding: 15px; cursor: pointer; }
.btn:hover { background: #222; }

/* Footer */
footer { padding: 34px 0 44px; font-size: 14px; }
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot nav { display: flex; gap: 18px; font-weight: 600; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot p { color: var(--muted); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,8,.94); display: none; align-items: center; justify-content: center; padding: 30px; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.lb button:hover { background: rgba(255,255,255,.2); }
.lb .x { top: 18px; right: 18px; }
.lb .prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb .count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #bbb; font-size: 13px; }

/* Resume page */
.resume-head { padding: 64px 0 40px; }
.resume-head h1 { font-size: clamp(44px, 8vw, 110px); letter-spacing: -0.05em; line-height: .9; font-weight: 700; }
.resume-head p { margin-top: 18px; font-size: 17px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 34px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat b { display: block; font-size: 34px; letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.r-block { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 40px 0; border-top: 1px solid var(--line); }
.r-block > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; display: flex; align-items: center; gap: 8px; height: fit-content; }
.r-item + .r-item { margin-top: 26px; }
.r-item .row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.r-item h3 { font-size: 19px; letter-spacing: -0.02em; }
.r-item .role { color: var(--muted); font-weight: 500; }
.r-item .when { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.r-item ul, .r-list { margin-top: 10px; padding-left: 18px; color: #2b2b2b; }
.r-item li, .r-list li { margin: 5px 0; }
.r-text { color: #2b2b2b; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 500; }

/* Responsive */
@media (max-width: 860px) {
  .nav ul { display: none; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav ul.open { display: flex; }
  .nav ul li a { display: block; padding: 14px 20px; border-top: 1px solid var(--line); }
  .menu-btn { display: block; }
  .cards, .split, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .r-block { grid-template-columns: 1fr; gap: 14px; }
  .guides { background-image: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero { height: 78svh; min-height: 460px; }
  .hero h1 { top: 26px; padding: 0 12px; }
  .hero .tag { left: 16px; bottom: 16px; }
  .section-pad { padding: 52px 0; }
  .masonry { columns: 2; column-gap: 8px; }
  .masonry figure { margin-bottom: 8px; border-radius: 8px; }
  .masonry figcaption { display: none; }
  .gallery-head { align-items: flex-start; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 11px 10px; }
  .card { min-height: 0; }
  .services span { font-size: 12px; }
  .copy-btn { flex-wrap: wrap; font-size: 14px; max-width: 100%; word-break: break-all; text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 16px; }
  .stat b { font-size: 28px; }
  .r-item .row { flex-direction: column; gap: 2px; }
  .lb { padding: 10px; }
  .lb .prev, .lb .next { top: auto; bottom: 14px; transform: none; }
  .lb .count { bottom: 26px; max-width: 60%; text-align: center; }
  .foot { flex-direction: column; align-items: flex-start; }
}
/* Stop iPhones zooming in when tapping a form field */
@media (max-width: 860px) { input, textarea { font-size: 16px; } }
/* Bigger tap targets, no sticky hover effects on touch screens */
@media (hover: none) {
  .masonry figure:hover img { transform: none; }
  .nav a, .tabs button { min-height: 44px; }
}
body { padding-bottom: env(safe-area-inset-bottom); }

@media (prefers-reduced-motion: reduce) {
  .hero img { animation: none; transform: none; }
  .fade { opacity: 1; transform: none; transition: none; }
}
