:root {
  --ink: #101820;
  --ink-soft: #34424a;
  --paper: #f4f8fb;
  --paper-strong: #ffffff;
  --line: rgba(16, 24, 32, 0.14);
  --line-dark: rgba(245, 247, 241, 0.18);
  --green: #55b7e8;
  --green-deep: #1f5f7d;
  --cyan: #68c7d4;
  --amber: #f5aa3d;
  --oxide: #bd6549;
  --dark: #0c1115;
  --dark-2: #14222b;
  --shadow: 0 18px 55px rgba(8, 12, 16, 0.18);
  --box-bg: #f8fcff;
  --box-tint: #eef8fe;
  --box-hover: #def1fc;
  --box-line: rgba(31, 95, 125, 0.22);
  --box-line-strong: rgba(31, 95, 125, 0.46);
  --dark-box-bg: rgba(11, 24, 32, 0.64);
  --dark-box-hover: rgba(15, 38, 52, 0.82);
  --dark-box-line: rgba(85, 183, 232, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

#top,
#linux,
#linux-kernel,
#linux-system-programming,
#rtos,
#rtos-zephyr,
#zephyr-kernel-architecture,
#zephyr-device-model,
#bootloader,
#bootloader-uboot,
#bootloader-lk,
#bootloader-barebox,
#file-system,
#profile {
  scroll-margin-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 32px;
  color: #f7fbf4;
  background: rgba(7, 13, 18, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, min-height 180ms ease;
}

.site-header.is-scrolled {
  min-height: 62px;
  background: rgba(7, 13, 18, 0.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-group {
  position: relative;
}

.site-nav a,
.nav-parent {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: rgba(247, 251, 244, 0.82);
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
}

.nav-parent {
  cursor: pointer;
}

.nav-parent::after {
  content: "⌄";
  margin-left: 7px;
  color: rgba(247, 251, 244, 0.58);
  font-size: 13px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.nav-parent:hover,
.nav-parent:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.subnav {
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  display: grid;
  min-width: 212px;
  padding: 8px;
  background: rgba(7, 13, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-group:hover .subnav,
.nav-group:focus-within .subnav,
.nav-group.is-open .subnav {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.subnav a {
  width: 100%;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--dark-box-line);
  border-radius: 0;
  color: #ffffff;
  background: var(--dark-box-bg);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 84svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #f8fbf5;
  background: var(--dark);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/hero-embedded.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 12, 8, 0.95) 0%, rgba(7, 12, 8, 0.78) 42%, rgba(7, 12, 8, 0.18) 100%),
    linear-gradient(0deg, rgba(7, 12, 8, 0.52), rgba(7, 12, 8, 0.12));
}

.hero-content {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 126px 0 68px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--green-deep);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 64px;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(248, 251, 245, 0.82);
  font-size: 19px;
}

.hero-policy {
  display: inline-block;
  margin: 18px 0 0;
  padding: 8px 10px;
  color: rgba(248, 251, 245, 0.84);
  background: var(--dark-box-bg);
  border: 1px solid var(--dark-box-line);
  border-radius: 0;
  font-size: 14px;
  font-weight: 800;
}

.hero-policy strong {
  color: #9ddeff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  color: #0c120d;
  background: var(--green);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #73c4ef;
}

.button-secondary {
  color: #f9fff5;
  background: var(--dark-box-bg);
  border-color: var(--dark-box-line);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--dark-box-hover);
  border-color: var(--green);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 930px;
  margin: 46px 0 0;
}

.metric-card {
  display: block;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--dark-box-line);
  border-radius: 0;
  background: var(--dark-box-bg);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.metric-card:hover,
.metric-card:focus-visible {
  transform: translateY(-2px);
  background: var(--dark-box-hover);
  border-color: var(--green);
  outline: none;
}

.metric-card strong {
  display: block;
  color: #9ddeff;
  font-size: 13px;
  font-weight: 900;
}

.metric-card span {
  display: block;
  margin-top: 4px;
  color: rgba(248, 251, 245, 0.8);
  font-size: 14px;
}

.intro-band {
  background: #e7f3fa;
  border-bottom: 1px solid var(--line);
}

.section-inner {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
}

.intro-grid p {
  max-width: 780px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 700;
}

.text-link {
  color: var(--green-deep);
  font-weight: 900;
}

.section {
  padding: 92px 0;
}

.section-light {
  background: var(--paper);
}

.section-dark {
  color: #f7fbf4;
  background:
    linear-gradient(135deg, rgba(11, 29, 42, 0.98), rgba(12, 17, 21, 1)),
    var(--dark);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-heading h2,
.profile-section h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  margin: 16px 0 0;
  color: rgba(247, 251, 244, 0.72);
  font-size: 17px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.expert-card,
.chain-step {
  border-radius: 0;
}

.expert-card {
  min-height: 310px;
  padding: 22px;
  background: var(--box-bg);
  border: 1px solid var(--box-line);
  box-shadow: 0 12px 26px rgba(16, 24, 32, 0.06);
}

.card-icon {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  margin-bottom: 26px;
  color: #071018;
  background: var(--green);
  border-radius: 0;
  font-size: 13px;
  font-weight: 900;
}

.expert-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.25;
}

.expert-card p {
  margin: 0;
  color: #3a4850;
}

.kernel-post-card {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 15px;
  color: inherit;
  background: var(--box-tint);
  border: 1px solid var(--box-line);
  border-radius: 0;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.kernel-post-card:hover,
.kernel-post-card:focus-visible {
  transform: translateY(-1px);
  background: var(--box-hover);
  border-color: var(--box-line-strong);
  outline: none;
}

.kernel-post-card strong {
  color: #101820;
  font-size: 17px;
  line-height: 1.32;
}

.kernel-post-card span {
  color: #3a4850;
  font-size: 14px;
}

.kernel-post-card .post-kicker {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kernel-subtopic-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.expert-card .kernel-subtopic-board {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.kernel-subtopic-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  color: #f7fbf4;
  background: linear-gradient(90deg, #14222b, #1f5f7d);
  border: 1px solid var(--box-line-strong);
  border-radius: 0;
}

.kernel-subtopic-heading span {
  color: rgba(247, 251, 244, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kernel-subtopic-heading strong {
  font-size: 22px;
  line-height: 1.2;
}

.expert-card .kernel-subtopic-heading {
  padding: 14px 15px;
}

.expert-card .kernel-subtopic-heading strong {
  font-size: 18px;
}

.kernel-topic-group {
  padding: 16px;
  background: var(--box-bg);
  border: 1px solid var(--box-line);
  border-radius: 0;
}

.expert-card .kernel-topic-group {
  padding: 14px;
  background: var(--box-bg);
}

.kernel-topic-group h3 {
  margin: 0 0 12px;
  color: #101820;
  font-size: 17px;
  line-height: 1.25;
}

.kernel-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kernel-topic-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: #142633;
  background: var(--box-tint);
  border: 1px solid var(--box-line);
  border-radius: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.kernel-topic-links a:hover,
.kernel-topic-links a:focus-visible {
  color: #0c1820;
  background: var(--box-hover);
  border-color: var(--box-line-strong);
  outline: none;
  transform: translateY(-1px);
}

.rtos-section {
  border-top: 1px solid var(--line);
}

.rtos-layout {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 28px;
  align-items: start;
}

.rtos-section .section-heading p:not(.eyebrow) {
  color: #3a4850;
}

.rtos-section .text-link {
  display: inline-flex;
  margin-top: 18px;
}

.rtos-overview-panel {
  min-width: 0;
  padding: 22px;
  background: var(--box-bg);
  border: 1px solid var(--box-line);
  border-radius: 0;
  box-shadow: 0 12px 26px rgba(16, 24, 32, 0.06);
}

.rtos-overview-panel h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.rtos-overview-panel p {
  margin: 0;
  color: #3a4850;
}

.rtos-topic-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.rtos-topic-heading {
  grid-column: 1 / -1;
  padding: 14px 15px;
  color: #f7fbf4;
  background: linear-gradient(90deg, #14222b, #1f5f7d);
  border: 1px solid var(--box-line-strong);
  border-radius: 0;
}

.rtos-topic-heading span {
  display: block;
  color: rgba(247, 251, 244, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rtos-topic-heading strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.rtos-topic-group {
  padding: 14px;
  background: var(--box-bg);
  border: 1px solid var(--box-line);
  border-radius: 0;
}

.rtos-topic-group h3 {
  margin: 0 0 12px;
  color: #101820;
  font-size: 17px;
  line-height: 1.25;
}

.rtos-topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rtos-topic-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: #142633;
  background: var(--box-tint);
  border: 1px solid var(--box-line);
  border-radius: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.rtos-topic-links a:hover,
.rtos-topic-links a:focus-visible {
  color: #0c1820;
  background: var(--box-hover);
  border-color: var(--box-line-strong);
  outline: none;
  transform: translateY(-1px);
}

.bootloader-layout {
  display: grid;
  grid-template-columns: 0.84fr 1.16fr;
  gap: 42px;
  align-items: start;
}

.bootloader-grid {
  position: relative;
  display: grid;
  gap: 14px;
}

.bootloader-grid::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 19px;
  width: 2px;
  background: linear-gradient(var(--green), #73c4ef);
}

.chain-step {
  position: relative;
  min-height: 92px;
  padding: 18px 18px 18px 62px;
  border: 1px solid var(--dark-box-line);
  background: var(--dark-box-bg);
}

.chain-step::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 11px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--dark-2);
  border-radius: 0;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(85, 183, 232, 0.18);
}

.chain-step:nth-child(2)::before {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(85, 183, 232, 0.18);
}

.chain-step:nth-child(3)::before {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(85, 183, 232, 0.18);
}

.chain-step:nth-child(4)::before {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(85, 183, 232, 0.18);
}

.chain-step span {
  display: block;
  font-size: 21px;
  font-weight: 900;
}

.chain-step p {
  margin: 6px 0 0;
  color: rgba(247, 251, 244, 0.72);
}

.file-system-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 42px;
  align-items: start;
}

.file-system-panel {
  min-height: 150px;
  padding: 26px;
  background: var(--box-bg);
  border: 1px solid var(--box-line);
  border-radius: 0;
  box-shadow: 0 12px 26px rgba(16, 24, 32, 0.05);
}

.file-system-panel p {
  margin: 0;
  color: #3a4850;
  font-size: 18px;
  font-weight: 700;
}

.profile-section {
  padding: 84px 0;
  color: #f7fbf4;
  background:
    linear-gradient(90deg, rgba(12, 17, 21, 0.96), rgba(15, 51, 72, 0.92)),
    var(--dark);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
}

.profile-layout h2 {
  max-width: 760px;
}

.profile-panel {
  display: grid;
  gap: 9px;
  min-width: 320px;
}

.profile-panel span {
  display: block;
  padding: 11px 13px;
  color: rgba(247, 251, 244, 0.86);
  background: var(--dark-box-bg);
  border: 1px solid var(--dark-box-line);
  border-radius: 0;
  font-size: 14px;
  font-weight: 800;
}

.site-footer {
  color: rgba(247, 251, 244, 0.72);
  background: #081018;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0;
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: #ffffff;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .site-header {
    padding: 0 22px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-metrics,
  .rtos-topic-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kernel-subtopic-board {
    grid-template-columns: 1fr;
  }

  .bootloader-layout,
  .file-system-layout,
  .rtos-layout,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .section-heading.compact {
    margin-bottom: 26px;
  }

  .profile-panel {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    display: grid;
    gap: 4px;
    padding: 12px;
    background: rgba(7, 13, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-group {
    display: grid;
    gap: 4px;
  }

  .nav-parent {
    width: 100%;
    justify-content: space-between;
  }

  .subnav {
    position: static;
    min-width: 0;
    margin: 0 0 8px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .subnav a {
    padding-left: 18px;
  }

  .nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero {
    min-height: 78svh;
  }

  .hero-media {
    background-position: 64% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(7, 12, 8, 0.94) 0%, rgba(7, 12, 8, 0.76) 100%),
      linear-gradient(0deg, rgba(7, 12, 8, 0.56), rgba(7, 12, 8, 0.18));
  }

  .hero-content {
    width: min(100% - 34px, 1120px);
    padding: 100px 0 42px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .hero-metrics,
  .category-grid,
  .kernel-subtopic-board,
  .rtos-topic-board,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .kernel-subtopic-heading {
    display: grid;
    align-items: start;
  }

  .section-inner {
    width: min(100% - 34px, 1120px);
  }

  .section {
    padding: 66px 0;
  }

  .section-heading h2,
  .profile-section h2 {
    font-size: 30px;
  }

  .expert-card {
    min-height: auto;
  }

  .footer-inner {
    display: grid;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 34px;
  }

  .button {
    width: 100%;
  }

  .metric-card {
    min-height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
