:root {
  --bg: #f5f7f3;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: #fbfcfa;
  --text: #101820;
  --muted: #6e797a;
  --accent: #4f7f68;
  --accent-soft: #cbdcd2;
  --line: rgba(79, 127, 104, 0.28);
  --border: rgba(16, 24, 32, 0.09);
  --terminal: #142026;
  --terminal-muted: #94a2a5;
  --shadow: 0 22px 70px rgba(27, 50, 41, 0.07);
  --radius-lg: 34px;
  --radius-md: 24px;
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 8%, rgba(140, 178, 155, 0.12), transparent 26%),
    linear-gradient(180deg, #f8f9f6 0%, var(--bg) 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.site-header {
  width: min(calc(100% - 48px), var(--max));
  margin: 20px auto 0;
  min-height: 68px;
  padding: 10px 12px 10px 22px;
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(248, 249, 246, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(16, 24, 32, .05);
}
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-name { font-weight: 700; }
.brand-sep { color: var(--accent); }
.brand-role { color: var(--muted); }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; transition: color .2s ease; }
.nav a:hover { color: var(--text); }

.button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: white;
  font-weight: 650;
  font-size: 14px;
  border: 1px solid var(--text);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,24,32,.12); }
.button-small { min-height: 44px; padding: 0 18px; }
.button-ghost { color: var(--text); background: transparent; border-color: var(--border); box-shadow: none; }

.section { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; padding: 120px 0; }
.section.compact { padding: 88px 0; }

.hero { min-height: calc(100vh - 108px); display: grid; align-items: center; padding-top: 70px; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 70px; align-items: center; }
.eyebrow, .kicker {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}
.eyebrow { display: flex; align-items: center; gap: 9px; letter-spacing: .05em; text-transform: none; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #63a982;
  box-shadow: 0 0 0 6px rgba(99,169,130,.11);
}
.hero h1 {
  max-width: 800px;
  font-size: clamp(56px, 6vw, 96px);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 30px 0 20px;
  font-weight: 500;
}
.hero h1 span { color: var(--accent); font-weight: 400; }
.hero h1 strong { font-weight: 500; color: var(--accent); }
.hero-subtitle { margin: 0 0 14px; font-size: clamp(28px, 3vw, 46px); letter-spacing: -.035em; }
.hero-description { max-width: 720px; margin: 0; font-size: 18px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.stack-line { margin-top: 50px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #566364; font-size: 13px; }
.stack-line i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.hero-visual {
  position: relative;
  min-height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(140deg, rgba(255,255,255,.9), rgba(229,236,231,.78)),
    var(--surface-strong);
  box-shadow: var(--shadow);
}
.hero-orbit { position: absolute; border-radius: 50%; background: linear-gradient(140deg, rgba(129,166,145,.28), rgba(255,255,255,.18)); }
.orbit-one { width: 440px; height: 440px; right: -100px; top: -80px; }
.orbit-two { width: 300px; height: 300px; right: 20px; bottom: -140px; }
.hero-visual::before, .hero-visual::after {
  content: "";
  position: absolute;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 48px 48px 0;
}
.hero-visual::before { width: 70%; height: 250px; right: 0; top: 174px; }
.hero-visual::after { width: 48%; height: 170px; right: 0; bottom: 70px; opacity: .55; }

.glass-card {
  position: absolute;
  top: 100px;
  left: 68px;
  width: 230px;
  padding: 30px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  background: rgba(255,255,255,.54);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(16,24,32,.04);
}
.glass-card span, .hero-side-note span {
  color: #748081;
  letter-spacing: .21em;
  font-size: 12px;
}
.glass-card em, .hero-side-note em {
  display: block;
  width: 30px;
  height: 2px;
  margin-top: 14px;
  background: var(--accent);
}

.terminal {
  position: absolute;
  right: 52px;
  top: 245px;
  width: min(78%, 430px);
  border-radius: 22px;
  overflow: hidden;
  background: var(--terminal);
  color: #d8e0df;
  box-shadow: 0 26px 60px rgba(14, 29, 27, .22);
  transform: rotate(-1deg);
}
.terminal-bar { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 18px; background: rgba(255,255,255,.035); border-bottom: 1px solid rgba(255,255,255,.06); }
.terminal-bar b { width: 11px; height: 11px; border-radius: 50%; background: #ec6a5e; }
.terminal-bar b:nth-child(2) { background: #f2be4f; }
.terminal-bar b:nth-child(3) { background: #61c454; }
.terminal-body { padding: 24px 26px 28px; font: 15px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }
.terminal-body p { margin: 0; }
.terminal-body .success { color: #75d89d; }
.muted { color: var(--terminal-muted); }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-side-note { position: absolute; right: 26px; bottom: 30px; display: grid; gap: 4px; }

.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-heading h2 { margin: 8px 0 12px; font-size: clamp(38px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.045em; font-weight: 520; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 17px; max-width: 680px; }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card {
  min-height: 270px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.58);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.service-card:hover { transform: translateY(-5px); border-color: var(--line); background: rgba(255,255,255,.82); }
.service-num { color: var(--accent); font: 13px ui-monospace, SFMono-Regular, monospace; }
.service-card h3 { margin: 70px 0 12px; font-size: 23px; line-height: 1.1; letter-spacing: -.025em; }
.service-card p { margin: 0; color: var(--muted); font-size: 14px; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card {
  position: relative;
  min-height: 590px;
  padding: 38px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 96% 0%, rgba(128,167,145,.18), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(239,244,240,.82));
  box-shadow: 0 22px 60px rgba(27,50,41,.045);
}
.project-card::before {
  content: "";
  position: absolute;
  width: 420px; height: 420px;
  right: -230px; bottom: -240px;
  border-radius: 50%;
  background: rgba(121,160,139,.16);
}
.project-card::after {
  content: "";
  position: absolute;
  right: 0; top: 150px;
  width: 42%; height: 260px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 48px 0 0 48px;
}
.project-featured { grid-column: 1 / -1; min-height: 560px; padding-right: 47%; }
.project-featured::after { width: 35%; right: 7%; }
.project-topline { display: flex; align-items: center; gap: 18px; color: var(--muted); letter-spacing: .18em; font-size: 11px; }
.project-topline em { width: 80px; height: 1px; background: #99a2a2; }
.project-card h3 { position: relative; z-index: 2; margin: 56px 0 18px; max-width: 650px; font-size: clamp(34px, 4vw, 58px); line-height: 1; letter-spacing: -.05em; font-weight: 520; }
.project-card h3 strong { color: var(--accent); font-weight: 520; }
.project-card > p { position: relative; z-index: 2; max-width: 620px; margin: 0; color: var(--muted); font-size: 15px; }
.tags { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tags span { padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.36); font-size: 12px; }
.project-flow, .mini-flow {
  position: relative; z-index: 2; margin-top: 30px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--border);
  color: #42504d;
  font-size: 11px;
  letter-spacing: .08em;
}
.mini-flow span { margin-right: 8px; }
.mini-flow.vertical { flex-direction: column; align-items: flex-start; }
.mini-flow.vertical b { color: var(--accent); }
.project-terminal {
  position: absolute;
  z-index: 3;
  right: 46px;
  top: 150px;
  width: 38%;
  padding: 26px;
  border-radius: 20px;
  background: var(--terminal);
  color: #7bdd9f;
  box-shadow: 0 24px 50px rgba(13,30,27,.18);
  font: 13px/1.85 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.project-terminal p { margin: 0; }
.project-terminal p:first-child { color: #d6dfdd; margin-bottom: 7px; }

.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.about-copy { max-width: 720px; }
.about-copy p { color: var(--muted); font-size: 17px; }
.about-copy .lead { color: var(--text); font-size: 24px; line-height: 1.4; letter-spacing: -.02em; margin-top: 0; }
.about-points { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 30px; }
.about-points span { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.46); font-size: 13px; }

.process { display: grid; grid-template-columns: 1fr 40px 1fr 40px 1fr 40px 1fr; gap: 0; align-items: start; }
.process > div { padding: 25px 0; }
.process > i { height: 1px; margin-top: 42px; background: var(--line); }
.process span { color: var(--accent); font: 12px ui-monospace, monospace; }
.process strong { display: block; margin: 10px 0 8px; font-size: 19px; }
.process p { margin: 0; color: var(--muted); font-size: 13px; padding-right: 18px; }

.contact-section { padding-top: 70px; }
.contact-card {
  position: relative;
  overflow: hidden;
  padding: 70px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% -10%, rgba(120,159,138,.26), transparent 35%),
    rgba(255,255,255,.66);
  box-shadow: var(--shadow);
}
.contact-card::after {
  content: "";
  position: absolute;
  right: -110px; bottom: -200px;
  width: 480px; height: 480px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.contact-card h2 { max-width: 1000px; margin: 14px 0 20px; font-size: clamp(40px, 5vw, 72px); line-height: 1.04; letter-spacing: -.05em; font-weight: 500; }
.contact-card h2 strong { color: var(--accent); font-weight: 500; }
.contact-card > p:not(.kicker) { max-width: 720px; color: var(--muted); font-size: 17px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.social-links { display: flex; gap: 24px; margin-top: 34px; font-size: 13px; color: var(--muted); }
.social-links a:hover { color: var(--text); }

.footer {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 28px 0 45px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
}

@media (max-width: 1050px) {
  .nav { display: none; }
  .site-header { justify-content: space-between; }
  .brand-role, .brand-sep { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 80px; }
  .hero-visual { min-height: 520px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .project-featured { padding-right: 38px; min-height: 760px; }
  .project-terminal { position: relative; top: auto; right: auto; width: min(100%, 520px); margin-top: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 15px; }
  .process { grid-template-columns: 1fr 1fr; gap: 14px 32px; }
  .process > i { display: none; }
}

@media (max-width: 720px) {
  .site-header { width: calc(100% - 24px); margin-top: 10px; top: 8px; min-height: 58px; padding: 8px 8px 8px 16px; }
  .site-header .button { padding: 0 14px; min-height: 40px; font-size: 12px; }
  .brand-name { font-size: 13px; }
  .section { width: calc(100% - 28px); padding: 80px 0; }
  .section.compact { padding: 62px 0; }
  .hero { min-height: auto; padding-top: 90px; }
  .hero h1 { font-size: clamp(46px, 14vw, 72px); }
  .hero-subtitle { font-size: 29px; }
  .hero-description { font-size: 16px; }
  .stack-line { margin-top: 34px; }
  .hero-visual { min-height: 440px; border-radius: 26px; }
  .glass-card { left: 26px; top: 56px; width: 195px; padding: 22px; }
  .terminal { right: 20px; top: 190px; width: 84%; }
  .terminal-body { font-size: 12px; padding: 20px; }
  .hero-side-note { display: none; }
  .services-grid, .projects-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 220px; }
  .service-card h3 { margin-top: 45px; }
  .project-featured { grid-column: auto; min-height: 680px; padding: 28px; }
  .project-card { min-height: 570px; padding: 28px; }
  .project-card h3 { margin-top: 42px; font-size: 41px; }
  .project-card::after { width: 55%; }
  .project-terminal { font-size: 11px; padding: 20px; }
  .about-points { grid-template-columns: 1fr; }
  .about-copy .lead { font-size: 21px; }
  .process { grid-template-columns: 1fr; }
  .contact-card { padding: 38px 26px; border-radius: 26px; }
  .contact-card h2 { font-size: 42px; }
  .contact-actions { align-items: stretch; }
  .contact-actions .button { width: 100%; overflow-wrap: anywhere; }
  .footer { width: calc(100% - 28px); gap: 16px; flex-direction: column; }
}
