:root {
  --black: #030a13;
  --panel: rgba(4, 14, 26, .82);
  --white: #f7f8fa;
  --muted: #b3bac5;
  --blue: #2364b8;
  --blue-light: #3479de;
  --line: rgba(53, 126, 222, .48);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--black); scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  display: grid;
  font-family: var(--font);
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 320px;
}
body.modal-open { overflow: hidden; }
a, button { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 2px solid #72abff; outline-offset: 4px; }

.header {
  align-items: center;
  background: rgba(2, 8, 15, .96);
  border-bottom: 1px solid rgba(53, 126, 222, .34);
  display: flex;
  height: 104px;
  justify-content: space-between;
  padding: 0 clamp(38px, 3.5vw, 62px);
  position: relative;
  z-index: 20;
}

.logo { display: block; height: 84px; overflow: hidden; width: 184px; }
.logo img { display: block; height: 184px; mix-blend-mode: screen; object-fit: contain; transform: translateY(-40px); width: 184px; }

nav { align-items: stretch; align-self: stretch; display: flex; gap: clamp(38px, 4vw, 62px); }
nav a, nav button {
  align-items: center;
  background: none;
  border: 0;
  color: #e2e5e9;
  cursor: pointer;
  display: flex;
  font-size: 1.05rem;
  padding: 0 2px;
  position: relative;
  text-decoration: none;
}
nav a::after, nav button::after { background: var(--blue-light); bottom: 0; content: ""; height: 3px; left: 0; position: absolute; transform: scaleX(0); transition: transform .18s ease; width: 100%; }
nav a:hover::after, nav button:hover::after, nav .active::after { transform: scaleX(1); }
.menu-toggle { display: none; }

.landing {
  background:
    radial-gradient(circle at 83% 18%, rgba(25, 95, 175, .13), transparent 28%),
    radial-gradient(circle at 68% 48%, rgba(12, 62, 125, .08), transparent 34%),
    #020913;
  isolation: isolate;
  overflow: hidden;
  padding: 94px clamp(30px, 6vw, 94px) 70px;
  position: relative;
}

.landing::before {
  background-image:
    linear-gradient(rgba(46, 116, 200, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 116, 200, .045) 1px, transparent 1px);
  background-size: 58px 58px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to left, #000 8%, rgba(0, 0, 0, .84) 48%, transparent 92%);
  opacity: .8;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.network-canvas {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.hero,
.projects,
.discord-card {
  position: relative;
  z-index: 2;
}

.hero { min-height: 405px; }
/* .hero-copy { max-width: 650px; } */
h1 { font-size: clamp(3.2rem, 4.55vw, 4.8rem); letter-spacing: -.045em; line-height: 1.04; margin: 0; }
h1 span, h1 strong { display: block; }
h1 span { font-weight: 720; }
h1 strong { color: var(--blue-light); font-weight: 720; }
.hero-copy > p { color: var(--muted); font-size: clamp(1.15rem, 1.7vw, 1.65rem); line-height: 1.45; margin: 25px 0 28px; }

.primary-button {
  align-items: center;
  background: linear-gradient(135deg, #3379df, #2364b8);
  border: 1px solid #397ee0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-weight: 600;
  gap: 28px;
  justify-content: center;
  min-height: 74px;
  padding: 0 32px;
  text-decoration: none;
  transition: filter .18s ease, transform .18s ease;
}
.primary-button:hover { filter: brightness(1.12); transform: translateY(-2px); }
.primary-button span { font-size: 1.5rem; font-weight: 300; }

.projects {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  scroll-margin-top: 30px;
}

.project-card {
  background: linear-gradient(145deg, rgba(6, 21, 37, .93), rgba(2, 11, 21, .9));
  border: 1px solid rgba(68, 137, 225, .62);
  border-radius: 17px;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 36px 34px 29px;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.project-card:hover { border-color: #4b96f4; box-shadow: 0 18px 48px rgba(0, 77, 170, .19); transform: translateY(-5px); }
.card-icon { fill: none; height: 58px; margin-bottom: 20px; stroke: var(--blue-light); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.4; width: 58px; }
.card-icon .w-mark { stroke-width: 7; }
.project-card h2 { font-size: clamp(1.2rem, 1.6vw, 1.55rem); font-weight: 680; margin: 0 0 10px; }
.project-card > div { align-items: center; color: var(--blue-light); display: flex; font-size: clamp(.93rem, 1.25vw, 1.13rem); justify-content: space-between; margin-top: auto; }
.project-card b { color: #cfd6df; font-size: 1.55rem; font-weight: 300; }

.discord-card {
  align-items: center;
  background: linear-gradient(90deg, rgba(5, 18, 33, .94), rgba(3, 13, 25, .92));
  border: 1px solid rgba(68, 137, 225, .55);
  border-radius: 17px;
  color: white;
  display: grid;
  gap: 26px;
  grid-template-columns: 70px 1fr minmax(200px, .7fr) 34px;
  margin: 31px auto 0;
  max-width: 760px;
  min-height: 92px;
  padding: 20px 42px;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.discord-card:hover { border-color: #4b96f4; transform: translateY(-3px); }
.discord-card svg { fill: none; height: 52px; stroke: var(--blue-light); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.3; width: 52px; }
.discord-card strong { font-size: 1.25rem; }
.discord-card > span { color: var(--blue-light); }
.discord-card b { color: #cfd6df; font-size: 1.6rem; font-weight: 300; }

footer { background: #020810; color: #738091; display: flex; font-size: .84rem; justify-content: space-between; padding: 24px clamp(30px, 6vw, 94px); }

.lightbox { align-items: center; background: rgba(0, 4, 10, .86); backdrop-filter: blur(12px); display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 100; }
.dialog { background: linear-gradient(145deg, rgba(35, 100, 184, .18), transparent 45%), #07111d; border: 1px solid rgba(68, 137, 225, .64); border-radius: 18px; box-shadow: 0 40px 120px rgba(0, 0, 0, .7); max-width: 680px; padding: 58px; position: relative; width: 100%; }
.dialog-close { align-items: center; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; cursor: pointer; display: flex; font-size: 1.7rem; height: 44px; justify-content: center; position: absolute; right: 22px; top: 22px; width: 44px; }
.dialog-label { color: var(--blue-light) !important; font-size: .78rem !important; font-weight: 700; letter-spacing: .17em; margin: 0 0 22px !important; }
.dialog h2 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.045em; line-height: 1; margin: 0 0 26px; }
.dialog p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.dialog-action { margin-top: 12px; min-height: 58px; }

@media (max-width: 1100px) {
  .landing { padding-inline: 42px; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 465px; }
}

@media (max-width: 700px) {
  .header { height: 78px; padding-inline: 20px; }
  .logo { height: 58px; width: 112px; }
  .logo img { height: 112px; transform: translateY(-24px); width: 112px; }
  .menu-toggle { background: none; border: 1px solid var(--line); border-radius: 6px; display: block; padding: 9px 14px; }
  nav { align-items: center; background: rgba(2, 8, 15, .98); border-bottom: 1px solid var(--line); display: none; flex-direction: column; gap: 0; height: auto; left: 0; padding: 18px; position: absolute; right: 0; top: 78px; }
  nav.open { display: flex; }
  nav a, nav button { justify-content: center; min-height: 48px; width: 100%; }
  nav a::after, nav button::after { display: none; }
  .landing { padding: 62px 20px 48px; }
  .network-canvas { height: min(920px, 100%); }
  .hero { min-height: 465px; }
  h1 { font-size: clamp(2.65rem, 12vw, 4rem); }
  .hero-copy > p { font-size: 1.08rem; }
  .primary-button { min-height: 62px; padding-inline: 24px; }
  .projects { gap: 15px; grid-template-columns: 1fr; }
  .project-card { min-height: 185px; }
  .discord-card { gap: 16px; grid-template-columns: 50px 1fr 28px; padding: 18px 22px; }
  .discord-card > span { display: none; }
  .discord-card strong { font-size: 1.08rem; }
  footer { flex-direction: column; gap: 8px; padding-inline: 20px; }
  .dialog { max-height: 88vh; overflow: auto; padding: 54px 24px 28px; }
}

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