@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #000000;
  color: #e6e6e6;
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
}

a { color: #00ff80; }

p { margin: 0 0 18px; max-width: 68ch; overflow-wrap: break-word; }

.top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000000;
  border-bottom: 4px solid #00ff80;
  padding: 0 clamp(12px, 3vw, 32px);
}

.top-nav { flex: 1 1 0; min-width: 0; }
.top-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.top-nav-l ul { justify-content: flex-start; }
.top-nav-r ul { justify-content: flex-end; }
.top-nav a {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 0 10px;
  color: #e6e6e6;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.top-nav a:hover { background: #00ff80; color: #000000; }

.brand {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #00ff80;
  text-decoration: none;
  padding: 12px 12px;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.brand:hover { color: #ffffff; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0 clamp(16px, 4vw, 64px) clamp(70px, 12vw, 150px);
  background: repeating-linear-gradient(45deg, #000000 0 14px, #0a0a0a 14px 28px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 92%);
  border-bottom: 5px solid #00ff80;
}

.hero-img {
  position: absolute;
  left: 0;
  top: -12%;
  width: 100%;
  height: 124%;
  object-fit: cover;
  z-index: 0;
  will-change: transform;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 45%, #000000 100%);
}

.hero-txt { position: relative; z-index: 2; width: 100%; }

.hero-h1 {
  margin: 0;
  font-size: clamp(2rem, 7.5vw, 5.4rem);
  line-height: 1.03;
  font-weight: 700;
  color: #00ff80;
  text-shadow: 5px 5px 0 #000000;
  max-width: 15ch;
  overflow-wrap: break-word;
}

.badge {
  position: absolute;
  z-index: 3;
  right: clamp(16px, 4vw, 64px);
  bottom: clamp(180px, 22vw, 240px);
  background: #0000ff;
  color: #ffffff;
  border: 4px solid #00ff80;
  padding: 9px 14px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.strip {
  position: sticky;
  top: 0;
  z-index: 25;
  background: #00ff80;
  border-bottom: 4px solid #000000;
}

.strip-in {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 clamp(6px, 2vw, 24px);
  scrollbar-width: thin;
}

.strip-in a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 0 12px;
  color: #000000;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border-right: 2px solid #000000;
  white-space: nowrap;
}
.strip-in a:first-child { border-left: 2px solid #000000; }
.strip-in a:hover { background: #000000; color: #00ff80; }

.cols {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 34px);
  padding: clamp(20px, 3vw, 40px) clamp(14px, 3vw, 44px) 56px;
  border-top: 5px solid #00ff80;
  align-items: start;
}

.rail {
  position: sticky;
  top: 76px;
  border: 3px solid #0000ff;
  border-bottom: 9px solid #0000ff;
  border-radius: 18px;
  background: #070707;
  padding: 20px 14px 22px;
}

.rail-h {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #00ff80;
}

.subtitle {
  margin: 4px 0 16px;
  color: #9a9a9a;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: none;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid #2a2a2a;
  counter-reset: railc;
}

.rail-list li {
  border-bottom: 2px solid #2a2a2a;
  opacity: 0;
  transform: translateX(-14px);
}
.rail-list li.in { animation: railIn 0.28s steps(3, end) forwards; }

@keyframes railIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 4px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
}
.rail-list a:hover { color: #00ff80; }

.main { min-width: 0; }

.post { padding-left: 0; }

.post div {
  padding: 30px 0 34px;
  border-top: 4px solid #00ff80;
  scroll-margin-top: 78px;
}
.post div:first-child { border-top: 0; padding-top: 4px; }

.post div h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 4vw, 2.5rem);
  line-height: 1.14;
  color: #ffffff;
  border-left: 11px solid #00ff80;
  padding-left: 14px;
}

.post div h3 {
  margin: 26px 0 10px;
  font-size: 1.16rem;
  color: #00ff80;
}

.post p { color: #dcdcdc; }

.post ul, .post ol {
  margin: 0 0 20px;
  padding-left: 22px;
  max-width: 66ch;
}
.post li { margin-bottom: 8px; }
.post li::marker { color: #00ff80; font-weight: 700; }

.post a {
  color: #00ff80;
  text-decoration: none;
  border-bottom: 2px solid #0000ff;
}
.post a:hover { background: #00ff80; color: #000000; border-bottom-color: #000000; }

.post img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px 0;
  border: 4px solid #00ff80;
}

.post blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 8px solid #0000ff;
  background: #0b0b0b;
  color: #cfcfcf;
}

.post strong { color: #00ff80; }

.post code {
  font-family: ui-monospace, 'Courier New', monospace;
  background: #111111;
  border: 1px solid #0000ff;
  padding: 1px 5px;
  font-size: 0.92em;
}

.post hr {
  border: 0;
  border-top: 3px dashed #0000ff;
  margin: 28px 0;
}

.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}
.post th, .post td {
  border: 2px solid #0000ff;
  padding: 8px 10px;
  text-align: left;
}
.post th { background: #00ff80; color: #000000; }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 6px solid #00ff80;
  background: #000000;
  padding: 20px clamp(14px, 3vw, 44px) 34px;
  font-size: 0.88rem;
}

.foot-addr {
  font-style: normal;
  font-weight: 700;
  color: #00ff80;
  letter-spacing: 0.02em;
}

.foot-nav { order: 2; }
.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 0;
}
.foot-nav dt, .foot-nav dd { margin: 0; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  color: #e6e6e6;
  text-decoration: none;
  font-weight: 600;
}
.foot a:hover { color: #00ff80; }

.foot-links {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.totop {
  order: 4;
  border: 3px solid #00ff80;
  padding: 8px 14px !important;
  color: #00ff80 !important;
  font-weight: 700;
}
.totop:hover { background: #00ff80; color: #000000 !important; }

@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
}

@media (max-width: 780px) {
  .top {
    flex-wrap: wrap;
    gap: 0;
    padding: 4px 8px;
  }
  .brand {
    order: 1;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    border-bottom: 3px solid #00ff80;
    font-size: 1.05rem;
  }
  .top-nav { order: 2; overflow-x: auto; }
  .top-nav ul { flex-wrap: nowrap; }
  .top-nav a { min-height: 44px; font-size: 0.82rem; padding: 0 7px; }

  .hero { min-height: calc(100vh - 98px); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 95%); }
  .hero-h1 { font-size: clamp(1.9rem, 10vw, 3rem); }
  .badge { bottom: 22%; right: 16px; font-size: 0.8rem; padding: 7px 11px; }

  .post div h2 { border-left-width: 8px; padding-left: 10px; }
  .foot { justify-content: flex-start; }
  .totop { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail-list li { opacity: 1; transform: none; animation: none !important; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
