*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: #080808 !important;
  color: #ffffff !important;
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* CANVAS — fixed behind everything */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* Sections sit above canvas with solid/semi-solid backgrounds */
nav    { position: fixed !important; z-index: 500; }
.hero  { position: relative; z-index: 2; background: transparent; }
.stats { position: relative; z-index: 2; background: rgba(6,6,6,0.85); }
.work  { position: relative; z-index: 2; background: rgba(6,6,6,0.7); }
.about { position: relative; z-index: 2; background: rgba(6,6,6,0.7); }
.caps  { position: relative; z-index: 2; background: rgba(10,10,10,0.9); }
.contact { position: relative; z-index: 2; background: rgba(6,6,6,0.7); }
footer   { position: relative; z-index: 2; background: rgba(4,4,4,0.95); }
.nav-drawer { z-index: 499; }

/* NAV */
nav {
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px clamp(24px,5vw,64px);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(8,8,8,0.96) !important;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-color: rgba(255,255,255,0.1);
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; flex-shrink: 0; }
.nav-wordmark { font-size: 16px; font-weight: 300; letter-spacing: 6px; color: #ffffff !important; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.14em; color: rgba(255,255,255,0.45) !important; text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: #ffffff !important; }
.nav-cta { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.14em; color: #080808 !important; background: #ffffff; padding: 10px 20px; border-radius: 6px; text-decoration: none; transition: opacity 0.2s; }
.nav-cta:hover { opacity: 0.8; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 1px; background: #ffffff; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-drawer { display: none; position: fixed !important; inset: 0; background: #080808 !important; flex-direction: column; justify-content: center; align-items: center; gap: 44px; opacity: 0; transition: opacity 0.25s; }
.nav-drawer.open { opacity: 1; }
.drawer-link { font-size: 36px; font-weight: 200; letter-spacing: -0.02em; color: #ffffff !important; text-decoration: none; }
.drawer-cta { font-family: 'DM Mono', monospace; font-size: 12px; letter-spacing: 0.12em; color: #080808 !important; background: #ffffff; padding: 14px 28px; border-radius: 8px; text-decoration: none; }

/* HERO */
.hero { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 0 clamp(24px,5vw,64px); overflow-x: hidden; overflow-y: visible; }
.hero-glow { position: absolute; right: -200px; top: 50%; transform: translateY(-50%); width: 900px; height: 900px; background: radial-gradient(circle, rgba(79,158,248,0.08) 0%, transparent 65%); pointer-events: none; z-index: 1; }
.hero-bg-mark { position: absolute; right: clamp(-200px, -12vw, -40px); top: 50%; transform: translateY(-50%); width: clamp(360px,55vw,700px); height: clamp(360px,55vw,700px); pointer-events: none; z-index: 1; opacity: 1; }
.hero-content { display: flex; flex-direction: column; justify-content: flex-end; padding-top: 140px; padding-bottom: 80px; position: relative; z-index: 3; max-width: 820px; }
.hero-tag { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.28em; color: #4F9EF8 !important; margin-bottom: 36px; display: flex; align-items: center; gap: 12px; animation: fadeIn 0.8s 0.1s both; }
.hero-tag::before { content: ''; display: block; width: 32px; height: 1px; background: #4F9EF8; }
.hero-headline { font-size: clamp(48px,9vw,108px); font-weight: 200; letter-spacing: -0.04em; line-height: 0.96; color: #ffffff !important; margin-bottom: 48px; animation: fadeIn 0.9s 0.2s both; }
.hero-headline em { font-style: italic; color: transparent !important; -webkit-text-stroke: 1px rgba(255,255,255,0.45); }
.hero-headline strong { font-weight: 200; color: #4F9EF8 !important; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; animation: fadeIn 0.9s 0.35s both; }
.hero-sub { font-size: clamp(14px,1.6vw,16px); color: rgba(255,255,255,0.6) !important; line-height: 1.75; max-width: 400px; font-weight: 300; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.btn-outline { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.14em; color: #ffffff !important; border: 1px solid rgba(255,255,255,0.3); padding: 14px 28px; border-radius: 8px; text-decoration: none; transition: background 0.2s, border-color 0.2s; }
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }
.btn-signal { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.14em; color: #080808 !important; background: #4F9EF8; padding: 14px 28px; border-radius: 8px; text-decoration: none; transition: opacity 0.2s; }
.btn-signal:hover { opacity: 0.85; }
.hero-scroll { display: flex; align-items: center; gap: 14px; padding-bottom: 40px; position: relative; z-index: 3; animation: fadeIn 0.8s 0.6s both; }
.scroll-bar { width: 1px; height: 56px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3)); }
.scroll-txt { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.24em; color: rgba(255,255,255,0.3) !important; }

/* STATS */
.stats { border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 0 clamp(24px,5vw,64px); display: grid; grid-template-columns: repeat(4,1fr); }
.stat-cell { padding: 48px 0 48px 40px; border-right: 1px solid rgba(255,255,255,0.1); }
.stat-cell:first-child { padding-left: 0; }
.stat-cell:last-child { border-right: none; }
.stat-num { font-size: clamp(36px,5vw,60px); font-weight: 200; letter-spacing: -0.04em; color: #ffffff !important; line-height: 1; margin-bottom: 8px; }
.stat-num sup { font-size: 0.45em; color: #4F9EF8 !important; vertical-align: super; }
.stat-lbl { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.2em; color: rgba(255,255,255,0.4) !important; }

/* WORK */
.work { padding: 120px clamp(24px,5vw,64px); max-width: 1300px; margin: 0 auto; }
.sec-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 4px; }
.sec-lbl { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.24em; color: rgba(255,255,255,0.4) !important; }
.sec-count { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.4) !important; }
.work-row { display: grid; grid-template-columns: 56px 1fr 200px 72px 48px; align-items: center; gap: 28px; padding: 32px 0; border-bottom: 1px solid rgba(255,255,255,0.08); text-decoration: none; color: #ffffff !important; position: relative; cursor: pointer; transition: padding-left 0.2s; }
.work-row::before { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.03); opacity: 0; transition: opacity 0.2s; margin: 0 clamp(-24px,-5vw,-64px); }
.work-row:hover::before { opacity: 1; }
.work-row:hover .row-arrow { color: #4F9EF8 !important; transform: translate(4px,-4px); }
.work-row:hover .row-num { color: #4F9EF8 !important; }
.row-num { font-family: 'DM Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.3) !important; transition: color 0.2s; }
.row-title { font-size: clamp(20px,3vw,28px); font-weight: 300; letter-spacing: -0.025em; color: #ffffff !important; margin-bottom: 6px; }
.row-desc { font-size: 13px; color: rgba(255,255,255,0.55) !important; line-height: 1.5; }
.row-tags { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tag { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.1em; color: rgba(255,255,255,0.5) !important; border: 1px solid rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 4px; background: rgba(255,255,255,0.05); }
.row-arrow { font-size: 20px; color: rgba(255,255,255,0.3) !important; justify-self: end; transition: color 0.2s, transform 0.2s; }
.row-preview-hint { font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.14em; color: rgba(255,255,255,0.25) !important; justify-self: end; align-self: center; transition: color 0.2s; }
.work-row:hover .row-preview-hint { color: rgba(79,158,248,0.7) !important; }
.work-row:focus:not(:focus-visible) { outline: none; }
.work-row:focus-visible { outline: 2px solid #4F9EF8; outline-offset: 4px; }
.work-row[role="button"] {
  width: 100%; font: inherit; text-align: left; background: transparent; color: inherit;
  margin: 0; cursor: pointer; border: 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* WORK — preview dialog */
.work-preview {
  max-width: 520px; width: calc(100vw - 40px);
  padding: 0; border: none; border-radius: 16px;
  background: rgba(14,14,16,0.98);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  margin: auto;
}
.work-preview::backdrop {
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.work-preview-inner { position: relative; padding: 28px 28px 26px; max-height: min(78vh, 620px); overflow-y: auto; }
.work-preview-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border: none; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.work-preview-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.work-preview-kicker { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.24em; color: rgba(255,255,255,0.4) !important; margin-bottom: 12px; }
.work-preview-title { font-size: clamp(22px,4vw,30px); font-weight: 300; letter-spacing: -0.03em; color: #fff !important; margin-bottom: 16px; padding-right: 44px; line-height: 1.15; }
.work-preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.work-preview-tags .tag { font-size: 10px; }
.work-preview-body { font-size: 14px; color: rgba(255,255,255,0.68) !important; line-height: 1.75; font-weight: 300; }
.work-preview-body p { margin-bottom: 14px; }
.work-preview-body p:last-child { margin-bottom: 0; }
.work-preview-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.35) !important; }

/* ABOUT */
.about { padding: 120px clamp(24px,5vw,64px); max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; border-top: 1px solid rgba(255,255,255,0.08); }
.about-kicker { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.24em; color: #4F9EF8 !important; margin-bottom: 28px; }
.about-headline { font-size: clamp(28px,3.5vw,44px); font-weight: 200; letter-spacing: -0.03em; line-height: 1.15; color: #ffffff !important; margin-bottom: 24px; }
.about-body { font-size: 15px; color: rgba(255,255,255,0.6) !important; line-height: 1.8; font-weight: 300; }
.about-card { background: rgba(20,20,22,0.95); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 48px; position: relative; overflow: hidden; }
.about-card::before { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(79,158,248,0.12), transparent 70%); }
.about-list { list-style: none; }
.about-item { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.about-item:last-child { border-bottom: none; }
.about-item-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.12em; color: rgba(255,255,255,0.4) !important; }
.about-item-val { font-size: 14px; font-weight: 400; color: #ffffff !important; }
.about-item-val.signal { color: #4F9EF8 !important; }
.about-item-social { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
.about-item-social a { color: #4F9EF8 !important; text-decoration: none; font-weight: 400; }
.about-item-social a:hover { opacity: 0.85; }
.about-item-dot { color: rgba(255,255,255,0.35); user-select: none; }

/* CAPS */
.caps { border-top: 1px solid rgba(255,255,255,0.08); padding: 80px clamp(24px,5vw,64px); }
.caps-inner { max-width: 1300px; margin: 0 auto; }
.caps-lbl { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.24em; color: rgba(255,255,255,0.4) !important; margin-bottom: 48px; }
.caps-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; overflow: hidden; }
.cap-col { padding: 40px 36px; border-right: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); transition: background 0.2s; }
.cap-col:last-child { border-right: none; }
.cap-col:hover { background: rgba(255,255,255,0.05); }
.cap-name { font-size: 15px; font-weight: 400; color: #ffffff !important; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.cap-dot { width: 5px; height: 5px; border-radius: 50%; background: #4F9EF8; flex-shrink: 0; }
.cap-tags { display: flex; flex-direction: column; gap: 10px; }
.cap-tag { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.06em; color: rgba(255,255,255,0.5) !important; }

/* CONTACT */
.contact { padding: 120px clamp(24px,5vw,64px); max-width: 720px; margin: 0 auto; }
.contact-block { max-width: 560px; }
.contact-kicker { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.24em; color: rgba(255,255,255,0.4) !important; margin-bottom: 28px; }
.contact-headline { font-size: clamp(36px,5vw,64px); font-weight: 200; letter-spacing: -0.04em; line-height: 1.0; color: #ffffff !important; margin-bottom: 24px; }
.contact-sub { font-size: 15px; color: rgba(255,255,255,0.6) !important; line-height: 1.75; margin-bottom: 32px; font-weight: 300; }
.contact-socials {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 16px;
  width: 100%;
}
.contact-social {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex: 1 1 auto; min-width: min(100%, 200px);
  min-height: 48px;
  box-sizing: border-box;
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.12em;
  text-decoration: none; border-radius: 10px; padding: 14px 20px;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.contact-social-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  display: block;
}
.contact-social--in {
  color: #ffffff !important; background: #0a66c2;
  border: 1px solid #0a66c2;
}
.contact-social--in:hover,
.contact-social--in:focus-visible { filter: brightness(1.08); outline: none; }
.contact-social--gh {
  color: #ffffff !important; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
}
.contact-social--gh:hover,
.contact-social--gh:focus-visible { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.45); outline: none; }

/* FOOTER */
footer { border-top: 1px solid rgba(255,255,255,0.1); padding: 28px clamp(24px,5vw,64px); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 10px; }
.footer-wm { font-size: 14px; font-weight: 300; letter-spacing: 5px; color: #ffffff !important; }
.footer-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-lnk { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 0.12em; color: rgba(255,255,255,0.35) !important; text-decoration: none; transition: color 0.2s; }
.footer-lnk:hover { color: #ffffff !important; }
.footer-copy { font-family: 'DM Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.2) !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2,1fr); }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(3) { border-right: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.1); }
  .stat-cell:nth-child(4) { border-right: none; border-top: 1px solid rgba(255,255,255,0.1); }
  .work-row { grid-template-columns: 40px 1fr 48px; }
  .row-tags { display: none; }
  .row-preview-hint { display: none; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .caps-grid { grid-template-columns: 1fr; }
  .cap-col { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .cap-col:last-child { border-bottom: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer { display: flex; }
  .hero-headline { font-size: clamp(40px,12vw,72px); }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn-outline, .btn-signal { text-align: center; width: 100%; padding: 16px; }
  .contact { padding-top: 88px; padding-bottom: 88px; }
  .contact-socials {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    max-width: 100%;
  }
  .contact-social {
    flex: none;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 16px 20px;
    justify-content: center;
    letter-spacing: 0.1em;
  }
  .contact-social:active { transform: scale(0.99); }
  .about-card { padding: 32px 24px; }
}
