:root{
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #121212;
  --ink-2: #4a4a47;
  --muted: #8b8a85;
  --line: #e8e6e0;
  --accent: #0e8a66;
  --accent-soft: rgba(14,138,102,0.09);
  --warm: #e0823d;
  --dark: #121513;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap{ max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.top{ position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 26px 0; font-size: 14.5px; }
.logo{ font-weight: 800; text-decoration: none; letter-spacing: -0.01em; }
.logo span{ color: var(--accent); }
.top nav{ display: flex; gap: 22px; }
.top nav a{ color: var(--ink-2); text-decoration: none; font-weight: 500; }
.top nav a:hover{ color: var(--ink); }
@media (max-width: 520px){ .top nav a.hide-sm{ display: none; } }

/* ---------- hero ---------- */
.hero{ position: relative; padding: 70px 0 96px; }
.hero::before{
  content: ""; position: absolute; z-index: -1;
  inset: -160px calc(50% - 50vw) auto; height: 640px;
  background:
    radial-gradient(420px 300px at 78% 38%, rgba(14,138,102,0.16), transparent 70%),
    radial-gradient(360px 260px at 92% 12%, rgba(224,130,61,0.14), transparent 70%),
    radial-gradient(1px 1px at 1px 1px, rgba(18,18,18,0.12) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
          mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.pill{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.pulse{ position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after{ content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-out infinite; }
@keyframes pulse{ from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }

.hero .hello{ margin: 34px 0 10px; font-size: 18px; font-weight: 600; color: var(--ink-2); }
.hero h1{
  font-size: clamp(52px, 11vw, 116px);
  line-height: .95;
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0 0 30px;
}
.grad{
  background: linear-gradient(100deg, var(--accent) 10%, #3bb58a 50%, var(--warm) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead{ font-size: clamp(18px, 2.4vw, 22px); line-height: 1.55; color: var(--ink-2); margin: 0 0 30px; max-width: 640px; }
.lead strong{ color: var(--ink); font-weight: 700; }

.tools{ display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; padding: 0; list-style: none; }
.tool{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
}
.tool i{ width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.actions{ display: flex; flex-wrap: wrap; gap: 12px; }
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); color: var(--ink); background: var(--surface);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.btn:hover{ transform: translateY(-1px); border-color: var(--ink); }
.btn-primary{ background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 24px -10px rgba(0,0,0,0.5); }
.btn-primary:hover{ box-shadow: 0 12px 28px -10px rgba(0,0,0,0.55); }
.btn .arr{ transition: transform .15s; }
.btn:hover .arr{ transform: translateX(3px); }

/* ---------- sections ---------- */
.section{ padding: 72px 0; }
.section-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-head h2{ margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.section-head .count{ font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* projects */
.projects{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px){ .projects{ grid-template-columns: 1fr; } }
.card{
  position: relative; display: flex; flex-direction: column;
  padding: 26px 26px 22px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover{ transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.25); border-color: #d9d6cf; }
.card.wide{ grid-column: 1 / -1; background: linear-gradient(135deg, #ffffff 40%, #eef7f3); }
.card-top{ display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.num{ font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 600; }
.ico{ width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ico svg{ width: 21px; height: 21px; }
.card h3{ margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
.card p{ margin: 0 0 18px; color: var(--ink-2); font-size: 15px; }
.chips{ margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.chip{ font-family: var(--mono); font-size: 12px; padding: 4px 9px; border-radius: 7px; background: #f3f2ee; color: var(--ink-2); }
.status{ font-size: 12px; font-weight: 600; color: var(--warm); background: rgba(224,130,61,0.1); padding: 3px 9px; border-radius: 999px; }
.card a.more{ font-weight: 600; text-decoration: none; color: var(--accent); }
.card a.more:hover{ text-decoration: underline; }

/* experience */
.timeline{ list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.job{ position: relative; padding: 0 0 36px 30px; }
.job:last-child{ padding-bottom: 0; }
.job::before{
  content: ""; position: absolute; left: -8px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
}
.job.now::before{ border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.when{ font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.job h3{ margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.job h3 .role{ font-weight: 500; color: var(--ink-2); }
.job p{ margin: 0; color: var(--ink-2); max-width: 680px; }

/* stack */
.stack{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 860px){ .stack{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px){ .stack{ grid-template-columns: 1fr; } }
.stack-group{ padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stack-group h3{ margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stack-group ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* contact */
.contact{
  position: relative; overflow: hidden;
  margin: 24px 0 0; padding: 56px 48px; border-radius: 28px;
  background: var(--dark); color: #f2f2ee;
}
.contact::before{
  content: ""; position: absolute; inset: auto -120px -180px auto; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(14,138,102,0.45), transparent 65%);
}
.contact h2{ position: relative; margin: 0 0 12px; font-size: clamp(34px, 6vw, 56px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.contact p{ position: relative; margin: 0 0 32px; color: #a9aba6; font-size: 17px; }
.contact .actions{ position: relative; margin-bottom: 36px; }
.contact .btn{ background: transparent; color: #f2f2ee; border-color: #3a3d3a; }
.contact .btn:hover{ border-color: #f2f2ee; }
.contact .btn-primary{ background: #f2f2ee; color: var(--dark); border-color: #f2f2ee; box-shadow: none; }
.links{ position: relative; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.links a{ color: #f2f2ee; text-decoration: none; border-bottom: 1px solid #4a4d4a; }
.links a:hover{ border-color: #f2f2ee; }
.links span{ color: #7d807b; margin-right: 6px; }
.contact .facts{ position: relative; margin: 28px 0 0; font-size: 14px; color: #7d807b; }
@media (max-width: 560px){ .contact{ padding: 40px 24px; border-radius: 22px; } }

footer{ padding: 32px 0 48px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference){
  .rise{ animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .d1{ animation-delay: .05s; } .d2{ animation-delay: .12s; } .d3{ animation-delay: .19s; } .d4{ animation-delay: .26s; } .d5{ animation-delay: .33s; }
  @keyframes rise{ from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce){ .pulse::after{ animation: none; } .card, .btn{ transition: none; } }

.meta{ margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--muted); }
