/* ----------------------------------------------------------------
   pawon.dev — first-draft design
   Editorial / restrained / engineer-meets-operator
   ---------------------------------------------------------------- */

/* Tokens */
:root {
  /* Palette */
  --bg:         #F7F6F2;
  --bg-alt:     #EFEDE5;
  --ink:        #0B0B0B;
  --ink-soft:   #4A4A4A;
  --ink-mute:   #8A8A85;
  --rule:       rgba(11, 11, 11, 0.08);
  --accent:     #14532D;
  --accent-bg:  rgba(20, 83, 45, 0.12);

  /* Type */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --gutter:        24px;
  --max-width:     1180px;
  --section-pad-y: 96px;

  --radius: 4px;
  --transition: 180ms ease;
}

@media (min-width: 768px) {
  :root {
    --gutter: 48px;
    --section-pad-y: 144px;
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  border-top: 1px solid var(--rule);
}

.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}
@media (min-width: 768px) {
  .section-head { margin-bottom: 80px; }
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 246, 242, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }
.logo span { color: var(--accent); font-weight: 600; }

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 500;
}
@media (min-width: 640px) {
  .nav { gap: 28px; font-size: 15px; }
}

.nav__cta {
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}
.nav__cta:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 80px;
  padding-bottom: 80px;
}
@media (min-width: 768px) {
  .hero {
    padding-top: 144px;
    padding-bottom: 144px;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 32px;
  background: var(--bg);
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.hero__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(44px, 7.5vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: 32px;
  color: var(--ink);
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 40px;
}
.hero__sub em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
}

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

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition),
              color var(--transition),
              border-color var(--transition);
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn--ghost {
  border-color: var(--rule);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--large {
  padding: 18px 28px;
  font-size: 16px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.link-arrow::after {
  content: '→';
  margin-left: 8px;
  display: inline-block;
  transition: transform var(--transition);
}
.link-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.link-arrow:hover::after { transform: translateX(4px); }

.inline-link {
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
}
.inline-link:hover { color: var(--accent); }

/* ---------- Problem ---------- */
.problem__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 36ch;
  color: var(--ink-soft);
}
@media (min-width: 768px) { .problem__list { max-width: 48ch; } }

.problem__list li {
  position: relative;
  padding-left: 36px;
}
.problem__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Services grid ---------- */
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .services__grid { grid-template-columns: 1fr 1fr; }
}

.service {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
@media (min-width: 768px) {
  .service { padding: 56px; gap: 16px; }
}

.service__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}
.service__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.service p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}
.service .link-arrow {
  margin-top: auto;
  align-self: flex-start;
  padding-top: 8px;
}

/* ---------- Work / case studies ---------- */
.work__list {
  display: flex;
  flex-direction: column;
}
.case {
  padding: 40px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.case:last-child { border-bottom: 1px solid var(--rule); }

@media (min-width: 768px) {
  .case {
    grid-template-columns: 220px 1fr;
    gap: 56px;
    padding: 56px 0;
  }
}

.case__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  text-transform: uppercase;
  line-height: 1.5;
  padding-top: 4px;
}
.case__title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  max-width: 28ch;
  color: var(--ink);
}
.case p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: 60ch;
}

/* ---------- Operator perspective ---------- */
.operator__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 880px) {
  .operator__inner {
    grid-template-columns: 5fr 6fr;
    gap: 96px;
    align-items: start;
  }
}
.operator__lead p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 18px;
  margin-top: 24px;
  max-width: 48ch;
}
.operator__list {
  border-top: 1px solid var(--rule);
}
.operator__list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.operator__list li::before {
  content: '→';
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}
.operator__list li span {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- How I work ---------- */
.how__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 720px) {
  .how__steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .how__steps { grid-template-columns: repeat(4, 1fr); }
}

.how__steps li {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.how__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
.how__steps h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.how__steps p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- About ---------- */
.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 768px) {
  .about__inner {
    grid-template-columns: 1.4fr 1fr;
    gap: 96px;
  }
}
.about__text p {
  color: var(--ink-soft);
  font-size: 18px;
  margin: 24px 0;
  max-width: 56ch;
}
.about__photo {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 260px;
  justify-self: start;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.about__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Writing / articles ---------- */
.articles {
  border-top: 1px solid var(--rule);
}
.articles li { border-bottom: 1px solid var(--rule); }
.articles a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 26px 0;
  align-items: baseline;
}
@media (min-width: 768px) {
  .articles a {
    grid-template-columns: 140px 1fr 80px;
    gap: 32px;
    padding: 32px 0;
  }
}
.articles__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.articles__title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color var(--transition);
  line-height: 1.3;
}
.articles__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (min-width: 768px) {
  .articles__tag { text-align: right; }
}
.articles a:hover .articles__title { color: var(--accent); }

/* ---------- CTA (dark moment) ---------- */
.cta {
  background: var(--ink);
  color: var(--bg);
  border-top: none;
}
.cta .eyebrow { color: var(--ink-mute); }

.cta__inner {
  text-align: left;
  max-width: 760px;
}

.cta__title {
  font-family: var(--font-sans);
  font-size: clamp(34px, 4.8vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.cta__sub {
  font-size: 18px;
  color: rgba(247, 246, 242, 0.7);
  margin-bottom: 40px;
  max-width: 56ch;
}
.cta__email {
  font-size: 18px;
  color: rgba(247, 246, 242, 0.85);
  margin-top: 0;
}
.cta__email a {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--bg);
  border-bottom: 1px solid rgba(247, 246, 242, 0.35);
  padding-bottom: 2px;
  transition: border-color var(--transition);
}
.cta__email a:hover {
  border-bottom-color: var(--bg);
  color: var(--bg);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--rule);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 64px;
  }
}

.site-footer__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.site-footer__col ul li { padding: 4px 0; }
.site-footer__col ul a { font-size: 15px; }
.site-footer__tag {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 8px;
}

.site-footer__col--bottom {
  grid-column: 1 / -1;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus states ---------- */
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}
