:root {
  --sage: #cfdbd5;
  --paper: #e8eddf;
  --yellow: #f5cb5c;
  --yellow-deep: #d4a81f;
  --ink: #242423;
  --ink-2: #333533;
  --canvas: #f6f7f1;
  --white: #fffef8;
  --muted: #626a64;
  --line: rgba(36, 36, 35, 0.12);
  --shadow: 0 18px 44px rgba(36, 36, 35, 0.08);
  --radius: 18px;
  --shell: min(1180px, calc(100% - 40px));
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  min-width: 280px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--yellow-deep); outline-offset: 4px; }
::selection { color: var(--ink); background: var(--yellow); }
.shell { width: var(--shell); margin-inline: auto; }
.section { padding: 88px 0; }
.eyebrow { margin: 0 0 18px; color: #65746a; font-size: .78rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 100; transform: translateY(-150%); padding: 10px 14px; border-radius: 8px; background: var(--yellow); color: var(--ink); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(36,36,35,.96); border-bottom: 1px solid rgba(255,255,255,.06); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-wrap { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 12px; }
.brand img { width: 48px; height: 48px; }
.site-nav { display: flex; align-items: center; gap: 30px; color: #fff; font-size: .95rem; font-weight: 700; }
.site-nav > a:not(.nav-cta) { opacity: .9; transition: color .2s ease, opacity .2s ease; }
.site-nav > a:not(.nav-cta):hover { color: var(--yellow); opacity: 1; }
.nav-cta, .button-primary, .project-button { background: var(--yellow); color: var(--ink); border: 1px solid #e9bd46; box-shadow: 0 8px 20px rgba(245,203,92,.14); }
.nav-cta { padding: 12px 18px; border-radius: 10px; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.04); padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px auto; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero { position: relative; overflow: hidden; background: linear-gradient(115deg, #f7f8f3 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { min-height: 650px; padding: 92px 0 82px; display: grid; grid-template-columns: 1.03fr .97fr; gap: clamp(44px, 6vw, 78px); align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { margin: 0; max-width: 700px; font-size: clamp(3rem, 5.35vw, 5.3rem); line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
.hero-copy h1 span { color: var(--yellow-deep); }
.lede { max-width: 620px; margin: 27px 0 0; color: #474d49; font-size: 1.13rem; line-height: 1.68; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 9px; font-weight: 850; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-secondary { border-color: rgba(36,36,35,.26); background: rgba(255,255,255,.42); }
.button-secondary:hover { background: rgba(255,255,255,.72); }
.external { margin-left: 7px; }
.hero-facts { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 46px; }
.hero-facts div { padding: 0 17px; border-left: 1px solid rgba(36,36,35,.14); }
.hero-facts div:first-child { padding-left: 0; border-left: 0; }
.hero-facts strong, .hero-facts span { display: block; }
.hero-facts strong { margin-bottom: 4px; font-size: .86rem; }
.hero-facts span { color: #59615b; font-size: .79rem; }

.code-window { position: relative; z-index: 2; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.05); border-radius: 18px; background: #1f211f; color: #e7eee9; box-shadow: 0 30px 60px rgba(36,36,35,.18); }
.window-bar { display: flex; gap: 8px; padding: 22px 24px 0; }
.window-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ee665c; }
.window-bar i:nth-child(2) { background: #e9bc45; }
.window-bar i:nth-child(3) { background: #42b875; }
.code-window pre { margin: 0; padding: 30px 32px 38px; overflow-x: auto; scrollbar-width: thin; font: 500 .94rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-window .muted { color: #81917f; }
.code-window .cyan { color: #86ced1; }
.code-window .yellow { color: var(--yellow); }
.terminal-line { padding: 20px 30px; border-top: 1px solid rgba(255,255,255,.08); color: #dfe3df; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.terminal-line span { margin-right: 10px; color: var(--sage); }
.decor { position: absolute; pointer-events: none; opacity: .55; }
.decor-dots { left: 24px; top: 78px; width: 70px; height: 118px; background-image: radial-gradient(#90a69a 1.6px, transparent 1.6px); background-size: 14px 14px; }
.decor-rings { right: -80px; bottom: -135px; width: 300px; height: 300px; border: 1px solid rgba(104,125,113,.22); border-radius: 50%; box-shadow: 0 0 0 38px transparent, 0 0 0 39px rgba(104,125,113,.16), 0 0 0 78px transparent, 0 0 0 79px rgba(104,125,113,.12); }

.projects-section { background: var(--canvas); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 38px; }
.section-heading .eyebrow { margin-bottom: 13px; }
.section-heading h2, .about-heading h2 { margin: 0; font-size: clamp(2.1rem, 4vw, 3.55rem); line-height: 1.02; letter-spacing: -.045em; }
.section-intro { max-width: 470px; margin: 0 0 3px; color: var(--muted); line-height: 1.65; }
.project-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.project-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.72); box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px rgba(36,36,35,.12); }
.project-image { aspect-ratio: 600 / 305; margin: 12px 12px 0; overflow: hidden; border: 1px solid rgba(36,36,35,.06); border-radius: 12px; background: linear-gradient(135deg,var(--sage),#eef2e8); }
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-body { display: flex; flex: 1; flex-direction: column; padding: 22px 18px 18px; }
.project-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.project-body h3 { margin: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.project-body p { margin: 0; color: #565d58; font-size: .92rem; line-height: 1.58; }
.status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: .66rem; font-weight: 850; letter-spacing: .02em; }
.status-live { background: #e2efe7; color: #316244; }
.status-soon { background: #fff2c9; color: #6a5416; }
.status-private { background: #e8e9e5; color: #5c625e; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 18px; }
.tags span { padding: 7px 10px; border-radius: 999px; background: var(--paper); color: #4c574f; font-size: .73rem; font-weight: 800; }
.tags span:first-child { background: #fff4cf; color: #6a5416; }
.project-button { width: 100%; min-height: 48px; margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; font-size: .88rem; font-weight: 850; text-align: center; transition: filter .2s ease, transform .2s ease; }
a.project-button:hover { filter: brightness(.97); transform: translateY(-1px); }
.project-button.is-disabled { border-color: #dde1d9; background: #eceee8; color: #727871; box-shadow: none; }
.project-button.is-private { border-color: var(--ink-2); background: var(--ink-2); color: #f5f6f1; box-shadow: none; }

.values-section { padding-top: 18px; background: var(--canvas); }
.about-heading { max-width: 650px; margin-bottom: 34px; }
.values-grid { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.values-grid article { padding: 38px 30px; border-left: 1px solid var(--line); }
.values-grid article:first-child { border-left: 0; }
.value-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 20px; border-radius: 50%; background: var(--sage); color: var(--ink-2); font-size: .78rem; font-weight: 900; }
.values-grid h3 { margin: 0 0 10px; font-size: 1.05rem; }
.values-grid p { margin: 0; color: #626963; font-size: .9rem; line-height: 1.62; }

.site-footer { background: var(--ink); color: #f5f5ef; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1fr .75fr; gap: 80px; padding-bottom: 54px; }
.footer-brand img { width: 54px; height: 54px; margin-bottom: 20px; }
.footer-grid h2 { margin: 0 0 14px; font-size: 1rem; }
.footer-grid p { max-width: 350px; margin: 0 0 10px; color: #cfd3ce; line-height: 1.65; }
.footer-link { display: inline-block; margin-top: 10px; color: var(--yellow); font-weight: 800; }
.footer-links a { display: block; width: fit-content; margin-top: 11px; color: #d8dcd7; }
.footer-links a:hover, .footer-link:hover { color: #fff; }
.footer-bottom { min-height: 66px; display: flex; align-items: center; justify-content: center; gap: 18px; border-top: 1px solid rgba(255,255,255,.1); color: #adb4ad; font-size: .82rem; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px; padding-top: 72px; }
  .hero-copy, .code-window { max-width: 780px; }
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .values-grid { grid-template-columns: repeat(2,1fr); }
  .values-grid article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .values-grid article:nth-child(4) { border-top: 1px solid var(--line); }
  .footer-grid { gap: 46px; }
}

@media (max-width: 780px) {
  :root { --shell: min(100% - 28px, 1180px); --header-h: 68px; }
  .section { padding: 64px 0; }
  .nav-wrap { min-height: var(--header-h); }
  .brand img { width: 42px; height: 42px; }
  .menu-toggle { display: block; }
  .site-nav { position: fixed; left: 14px; right: 14px; top: calc(var(--header-h) + 8px); display: none; max-height: calc(100dvh - var(--header-h) - 22px); overflow-y: auto; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: var(--ink-2); box-shadow: 0 20px 40px rgba(0,0,0,.28); align-items: stretch; flex-direction: column; gap: 4px; }
  .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 48px; display: flex; align-items: center; padding: 10px 12px; border-radius: 9px; }
  .site-nav > a:not(.nav-cta):hover { background: rgba(255,255,255,.05); }
  .nav-cta { justify-content: center; margin-top: 5px; }

  .hero-grid { min-height: auto; padding: 58px 0 62px; gap: 38px; }
  .hero-copy h1 { max-width: 650px; font-size: clamp(2.75rem, 12.4vw, 4.4rem); line-height: .99; }
  .lede { margin-top: 22px; font-size: 1rem; line-height: 1.62; }
  .hero-actions { margin-top: 28px; }
  .button { min-height: 52px; }
  .hero-facts { grid-template-columns: repeat(2,1fr); gap: 22px 0; margin-top: 38px; }
  .hero-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .code-window pre { padding: 26px 22px 30px; font-size: .82rem; }
  .terminal-line { padding: 18px 22px; font-size: .88rem; }
  .decor-dots { left: 8px; opacity: .32; }
  .decor-rings { opacity: .32; }

  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading h2 { margin-bottom: 16px; }
  .section-intro { max-width: 620px; }
  .project-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-card:hover { transform: none; }
  .project-image { margin: 10px 10px 0; }
  .project-body { padding: 20px 17px 17px; }
  .project-body p { font-size: .94rem; }
  .project-button { min-height: 50px; }

  .values-section { padding-top: 8px; }
  .values-grid { grid-template-columns: 1fr; }
  .values-grid article { border-left: 0; border-top: 1px solid var(--line); padding: 30px 4px; }
  .values-grid article:first-child { border-top: 0; }
  .values-grid article:nth-child(3), .values-grid article:nth-child(4) { border-left: 0; }

  .site-footer { padding-top: 52px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-bottom: 42px; }
  .footer-bottom { min-height: 0; flex-direction: column; gap: 4px; padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); text-align: center; }
}

@media (max-width: 480px) {
  :root { --shell: calc(100% - 24px); }
  .section { padding: 54px 0; }
  .eyebrow { margin-bottom: 14px; font-size: .72rem; }
  .hero-grid { padding: 46px 0 52px; gap: 30px; }
  .hero-copy h1 { font-size: clamp(2.45rem, 12.9vw, 3.45rem); letter-spacing: -.05em; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .hero-facts { margin-top: 32px; }
  .hero-facts div { min-width: 0; padding: 0 12px; }
  .hero-facts strong { font-size: .82rem; }
  .hero-facts span { font-size: .75rem; }
  .code-window { border-radius: 14px; }
  .window-bar { padding: 18px 18px 0; }
  .window-bar i { width: 10px; height: 10px; }
  .code-window pre { padding: 22px 18px 26px; font-size: .76rem; line-height: 1.7; }
  .terminal-line { padding: 16px 18px; }
  .section-heading h2, .about-heading h2 { font-size: clamp(2rem, 10vw, 2.65rem); }
  .project-title-row { align-items: flex-start; }
  .project-body h3 { font-size: 1.28rem; }
  .status { margin-top: 1px; }
  .tags { margin-top: 18px; }
}

@media (max-width: 340px) {
  :root { --shell: calc(100% - 20px); }
  .hero-copy h1 { font-size: 2.25rem; }
  .hero-facts { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .hero-facts div, .hero-facts div:nth-child(3) { padding: 12px 0; border-left: 0; border-top: 1px solid var(--line); }
  .hero-facts div:first-child { border-top: 0; }
  .project-title-row { display: block; }
  .status { display: inline-block; margin-top: 8px; }
}

@media (hover: none) and (pointer: coarse) {
  .project-card:hover, .button:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
