:root {
  --bg: #061521;
  --bg-soft: #0a1d2a;
  --panel: #0d2230;
  --panel-hover: #112c3b;
  --line: rgba(148, 190, 211, 0.16);
  --text: #eef7fb;
  --muted: #91aab7;
  --accent: #36a9e1;
  --accent-strong: #178dcc;
  --accent-soft: rgba(54, 169, 225, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

body::selection { background: var(--accent); color: #041018; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 18px 0;
  background: rgba(6, 21, 33, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; min-width: 190px; }
.brand img {
  display: block;
  width: 170px;
  height: auto;
  background: transparent;
}

nav { display: flex; align-items: center; gap: 8px; }
nav a {
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color .2s ease, background .2s ease;
}
nav a:hover, nav a.active {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px;
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) { display: block; width: 22px; height: 2px; margin: 4px; background: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

main { overflow: hidden; }
.hero, .section { width: min(100% - 40px, var(--max-width)); margin: 0 auto; }
.hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 100px 0 90px;
}
.hero-copy { max-width: 760px; }
.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(3.3rem, 8vw, 6.6rem);
  line-height: .95;
  letter-spacing: -.055em;
  font-weight: 760;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-text { max-width: 660px; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 650;
  font-size: .92rem;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--accent); color: #04131d; }
.button.primary:hover { background: #56b9e9; }
.button.ghost { border-color: var(--line); background: transparent; color: var(--text); }
.button.ghost:hover { background: rgba(255,255,255,.05); }

.section { padding: 105px 0; border-top: 1px solid var(--line); }
.section-label { margin-bottom: 24px; color: var(--accent); font-size: .76rem; font-weight: 750; letter-spacing: .14em; }
h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; letter-spacing: -.04em; }
.about-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 80px; }
.large-copy { margin: 0 0 22px; font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.4; }
.muted { color: var(--muted); }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 40px; }
.heading-note { max-width: 300px; margin: 0; text-align: right; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.project-card {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 22px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel), #091a26);
  box-shadow: var(--shadow);
}
.project-card:hover { background: var(--panel-hover); }
.card-number { color: var(--muted); font-size: .8rem; font-weight: 700; }
.project-icon { font-size: 1.8rem; line-height: 1; }
.card-content { min-width: 0; }
.card-type { display: block; margin-bottom: 8px; color: var(--accent); font-size: .72rem; font-weight: 750; letter-spacing: .12em; }
.card-content h3 { margin: 0 0 8px; font-size: 2rem; letter-spacing: -.03em; }
.card-content p { margin: 8px 0; color: var(--muted); }
.card-content strong { color: var(--text); }
.card-content .button { margin-top: 14px; }
.arrow { color: var(--accent); font-size: 1.25rem; }

.channels-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 70px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.channels-copy { position: relative; z-index: 2; max-width: 650px; }
.channels-copy h2 { margin-bottom: 20px; }
.channels-copy p { color: var(--muted); font-size: 1.05rem; }
.channel-lines { position: absolute; inset: 0; pointer-events: none; opacity: .4; }
.channel-lines div { position: absolute; height: 1px; width: 80%; right: -20%; background: var(--line); transform: rotate(-25deg); }
.channel-lines div:nth-child(1) { top: 15%; }
.channel-lines div:nth-child(2) { top: 35%; }
.channel-lines div:nth-child(3) { top: 55%; }
.channel-lines div:nth-child(4) { top: 75%; }
.channel-lines div:nth-child(5) { top: 95%; }

footer {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 45px 0 55px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  font-size: .9rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 135px; height: auto; display: block; }

@media (max-width: 800px) {
  .site-header { width: min(100% - 28px, var(--max-width)); }
  .menu-toggle { display: block; }
  nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-top: 0;
  }
  nav.open { display: flex; }
  nav a { padding: 12px; }
  .hero, .section { width: min(100% - 28px, var(--max-width)); }
  .hero { min-height: 65vh; padding: 75px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .section-heading { align-items: start; flex-direction: column; gap: 15px; }
  .heading-note { text-align: left; }
  .project-card { grid-template-columns: auto minmax(0, 1fr); }
  .project-icon { grid-column: 2; grid-row: 1; }
  .card-number { grid-column: 1; grid-row: 1; }
  .card-content { grid-column: 1 / -1; }
  .arrow { position: absolute; top: 28px; right: 28px; }
  footer { width: min(100% - 28px, var(--max-width)); flex-direction: column; align-items: flex-start; }
}


/* ModCore project status */
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(65, 205, 158, .24);
  border-radius: 999px;
  color: #8ce6c5;
  background: rgba(65, 205, 158, .08);
  font-size: .8rem;
  font-weight: 700;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #54d6a7;
  box-shadow: 0 0 10px rgba(84, 214, 167, .55);
}
.modcore-card .project-icon { color: #8ce6c5; }


/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.contact-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  min-height: 290px; padding: 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(145deg, var(--panel), #091a26);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: rgba(54,169,225,.4); background: var(--panel-hover); }
.contact-icon {
  width: 52px; height: 52px; display: grid; place-items: center; margin: 16px 0 10px;
  border-radius: 14px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line);
}
.contact-card h3 { margin: 0; font-size: 1.8rem; letter-spacing: -.03em; }
.contact-card p { margin: 0 0 18px; color: var(--muted); max-width: 420px; }
.contact-link { margin-top: auto; color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.contact-link:hover { text-decoration: underline; }
.email-row { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.email-row .contact-link { margin-top: 0; }
.copy-btn {
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px;
  transition: background .2s ease;
}
.copy-btn:hover { background: var(--accent-soft); }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.footer-links a:hover { color: var(--accent); }

/* Polish */
.project-card { transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.project-card:hover { transform: translateY(-3px); border-color: rgba(54,169,225,.3); }
a:focus-visible, button:focus-visible { outline: 3px solid #9fdcf7; outline-offset: 3px; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { min-height: 250px; padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
