/* ==========================================================================
   폴리텍전준옥 — 전기·제어 학습 자료실
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;

  --accent: #FFC24B;
  --accent-2: #5EE7DF;
  --accent-ink: #1A1206;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 32px;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 40px);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 68px;
}

/* Dark (default) */
:root,
[data-theme="dark"] {
  --bg: #08090D;
  --bg-2: #0D0F15;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #F2F3F6;
  --text-2: #A9AEBB;
  --text-3: #6E7484;
  --glass: rgba(10, 11, 15, .72);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --grid-line: rgba(255, 255, 255, .045);
}

[data-theme="light"] {
  --bg: #FBFBFC;
  --bg-2: #F2F3F6;
  --surface: rgba(10, 12, 20, .028);
  --surface-2: rgba(10, 12, 20, .052);
  --line: rgba(10, 12, 20, .10);
  --line-2: rgba(10, 12, 20, .18);
  --text: #101218;
  --text-2: #4E5462;
  --text-3: #838A99;
  --glass: rgba(251, 251, 252, .78);
  --shadow: 0 20px 50px -22px rgba(16, 20, 34, .28);
  --grid-line: rgba(10, 12, 20, .05);
  --accent: #E08A00;
  --accent-2: #0E9C8C;
  --accent-ink: #FFFFFF;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 999;
  padding: 10px 18px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: none; }

.wrap {
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--pad);
}

/* ---------- Typography ---------- */
.h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.18;
  letter-spacing: -.035em;
  font-weight: 800;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lead { color: var(--text-2); font-size: clamp(15px, 1.6vw, 17.5px); }

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: var(--h); padding: 0 22px;
  border-radius: 999px;
  font-weight: 650; font-size: 14.5px; letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform .3s var(--ease), background .25s, border-color .25s, box-shadow .3s, color .25s;
}
.btn--lg { --h: 54px; padding: 0 30px; font-size: 15.5px; }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 13.5px; }

.btn--primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}

.btn--ghost {
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

.btn svg { flex: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom-color: var(--line);
}

.nav__inner {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__mark {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  padding: 6px;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 75%, transparent);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.22; }
.brand__text b { font-size: 15.5px; font-weight: 750; letter-spacing: -.03em; }
.brand__text i {
  font-style: normal; font-size: 10.5px; color: var(--text-3);
  letter-spacing: .04em; font-weight: 500;
}

.nav__links { display: flex; gap: 4px; margin-inline: auto; }
.nav__links a {
  position: relative;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 550; color: var(--text-2);
  transition: color .22s, background .22s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 16px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%);
}

.nav__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: color .22s, border-color .22s, background .22s, transform .22s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(12deg); }
.icon-btn svg { width: 17px; height: 17px; }

.i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }
[data-theme="light"] .i-moon { display: block; }

.nav__burger { display: none; flex-direction: column; gap: 4px; }
.nav__burger:hover { transform: none; }
.nav__burger span {
  width: 16px; height: 1.8px; border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.nav__progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 90px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg { position: absolute; inset: 0; z-index: -1; }

.hero__grid {
  position: absolute; inset: -10%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 25%, transparent 78%);
}

.hero__glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: float 16s var(--ease) infinite alternate;
}
.hero__glow--a {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -14%; left: -8%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 68%);
}
.hero__glow--b {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  bottom: -18%; right: -6%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 40%, transparent), transparent 68%);
  animation-delay: -8s;
}
[data-theme="light"] .hero__glow { opacity: .3; }

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(40px, 50px, 0) scale(1.14); }
}

.hero__circuit {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--accent); opacity: .16;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 10%, transparent 75%);
}
.hero__circuit .trace {
  stroke-dasharray: 8 1200;
  animation: dash 9s linear infinite;
}
.hero__circuit .trace:nth-child(2) { animation-delay: -2s; }
.hero__circuit .trace:nth-child(3) { animation-delay: -4s; }
.hero__circuit .trace:nth-child(4) { animation-delay: -6s; }
.hero__circuit .trace:nth-child(5) { animation-delay: -7.5s; }
@keyframes dash { to { stroke-dashoffset: -1208; } }

.hero__circuit .nodes circle { animation: pulse 3.2s ease-in-out infinite; }
.hero__circuit .nodes circle:nth-child(2n) { animation-delay: -1.1s; }
.hero__circuit .nodes circle:nth-child(3n) { animation-delay: -2.2s; }
@keyframes pulse { 0%, 100% { opacity: .3; r: 3; } 50% { opacity: 1; r: 4.5; } }

.hero__inner { position: relative; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  font-size: 12.5px; font-weight: 550; color: var(--text-2);
  letter-spacing: .01em;
  margin-bottom: 28px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: blip 2.4s ease-out infinite;
}
@keyframes blip {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70%  { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero__title {
  font-size: clamp(36px, 6.6vw, 76px);
  line-height: 1.1;
  letter-spacing: -.045em;
  font-weight: 830;
  margin-bottom: 24px;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 660px; margin: 0 auto 38px;
  color: var(--text-2);
  font-size: clamp(14.5px, 1.7vw, 17px);
  line-height: 1.8;
  text-wrap: pretty;
}
.hero__lead b { color: var(--text); font-weight: 700; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.hero__stats {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(18px, 4vw, 44px);
  margin-top: 56px;
}
.hero__stats > div { text-align: center; }
.hero__stats dt {
  font-size: clamp(24px, 3.2vw, 34px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1;
  background: linear-gradient(180deg, var(--text), var(--text-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__stats dd { font-size: 12.5px; color: var(--text-3); margin-top: 3px; letter-spacing: .02em; }
.hero__stats .sep { width: 1px; height: 32px; background: var(--line); }

.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 999px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px;
  width: 3px; height: 6px; border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: wheel 1.9s var(--ease) infinite;
}
@keyframes wheel {
  0% { opacity: 0; transform: translate(-50%, -4px); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 13px); }
}

.br-desktop { display: none; }
@media (min-width: 760px) { .br-desktop { display: inline; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  padding: 15px 0;
  user-select: none;
}
.marquee__track {
  display: flex; align-items: center; gap: 26px;
  width: max-content;
  animation: slide 42s linear infinite;
}
.marquee__track span {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.marquee__track i { color: var(--accent); font-size: 7px; font-style: normal; opacity: .8; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 11vw, 132px) 0; position: relative; }
.section--alt { background: var(--bg-2); }
.section--alt::before,
.section--alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line);
}
.section--alt::before { top: 0; }
.section--alt::after { bottom: 0; }

.sec-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 64px); }
.sec-head__desc { color: var(--text-2); margin-top: 16px; font-size: 15.5px; line-height: 1.75; }

/* ---------- About ---------- */
.about {
  display: grid; gap: clamp(36px, 6vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
}
/* Stacked: lead with the section heading, card follows. */
.about__text { order: 1; }
.about__media { order: 2; }

@media (min-width: 940px) {
  .about { grid-template-columns: .85fr 1fr; }
  .about__text { order: 2; }
  .about__media { order: 1; }
}

.profile {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    linear-gradient(160deg, var(--surface-2), transparent 60%),
    var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.profile__avatar {
  width: 88px; height: 88px;
  display: grid; place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  color: var(--accent-ink);
  font-size: 38px; font-weight: 800; letter-spacing: -.04em;
  box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--accent) 85%, transparent);
  margin-bottom: 22px;
  overflow: hidden;
}
.profile__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile__body h3 { font-size: 24px; font-weight: 780; letter-spacing: -.035em; }
.profile__role { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }
.profile__link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; padding: 7px 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12.5px; font-weight: 650; color: var(--text-2);
  transition: color .24s, border-color .24s, transform .24s var(--ease);
}
.profile__link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.profile__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.profile__tags li {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px; font-weight: 550; color: var(--text-2);
}
.profile__spark {
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 68%);
  filter: blur(24px);
  pointer-events: none;
}

.feature-list { display: grid; gap: 18px; margin-top: 32px; }
.feature-list li {
  display: flex; gap: 16px; align-items: flex-start;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.feature-list li:first-child { border-top: 0; padding-top: 0; }
.feature-list__ico {
  flex: none;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--accent);
  padding-top: 3px;
  letter-spacing: .06em;
}
.feature-list b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.feature-list p { color: var(--text-2); font-size: 14.5px; margin-top: 4px; line-height: 1.7; }

/* ---------- Steps ---------- */
.steps {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.step {
  position: relative;
  padding: 30px 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  transition: border-color .3s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.step:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.step__num {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 14px; font-weight: 650; color: var(--accent);
  margin-bottom: 18px;
}
.step h3 { font-size: 17.5px; font-weight: 730; letter-spacing: -.025em; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 14.5px; line-height: 1.72; }
.step b { color: var(--text); font-weight: 650; }

.note {
  display: flex; align-items: flex-start; gap: 11px;
  margin-top: 28px; padding: 16px 20px;
  border: 1px dashed var(--line-2); border-radius: var(--r-md);
  color: var(--text-2); font-size: 14px; line-height: 1.7;
}
.note svg { flex: none; margin-top: 2px; color: var(--accent); }
.note a { color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cards (courses) ---------- */
.cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 30px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease);
}
.section--alt .card { background: var(--bg); }
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }

.card__badge {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; color: var(--text-3);
}
.card__ico {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 25px; line-height: 1;
  margin-bottom: 20px;
  transition: transform .4s var(--ease), border-color .3s;
}
.card:hover .card__ico {
  transform: translateY(-3px) scale(1.06);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.card h3 {
  font-size: 18px; font-weight: 740; letter-spacing: -.028em;
  margin-bottom: 9px;
}
.card p { color: var(--text-2); font-size: 14.2px; line-height: 1.7; flex: 1; }
.card__go {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 22px;
  font-size: 13.5px; font-weight: 650; color: var(--accent);
  white-space: nowrap;
}
.card__go svg { transition: transform .3s var(--ease); }
.card:hover .card__go svg { transform: translateX(4px); }

/* Feature card — wide layout. Must come after `.card` so display wins. */
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card--feature { grid-column: span 3; }
}
@media (min-width: 1080px) {
  .card--feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 26px; row-gap: 6px;
    padding: 34px 34px 34px 30px;
  }
  .card--feature .card__ico { grid-column: 1; grid-row: 1 / span 2; margin-bottom: 0; }
  .card--feature h3 { grid-column: 2; grid-row: 1; margin-bottom: 0; align-self: end; }
  .card--feature p { grid-column: 2; grid-row: 2; max-width: 62ch; flex: none; align-self: start; }
  .card--feature .card__go { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; }
  .card--feature .card__badge { top: 18px; right: 22px; }
}

/* ---------- Lab menu (실습실 안내) ---------- */
.lab-menu { text-align: center; }
.lab-menu__text {
  font-size: clamp(17px, 2.4vw, 20px);
  font-weight: 600; color: var(--text); letter-spacing: -.02em;
}
.lab-menu__boxes {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 18px;
}
.lab-menu__box {
  padding: 14px 24px; border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: -.02em;
}

/* ---------- YouTube ---------- */
.yt {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.yt__card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s;
}
.yt__card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow);
}

.yt__thumb {
  position: relative;
  aspect-ratio: 16 / 8.2;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 58%),
    radial-gradient(circle at 78% 76%, color-mix(in srgb, var(--accent-2) 28%, transparent), transparent 58%),
    #0B0D13;
  overflow: hidden;
}
.yt__thumb--alt {
  background:
    radial-gradient(circle at 72% 22%, color-mix(in srgb, var(--accent-2) 34%, transparent), transparent 58%),
    radial-gradient(circle at 22% 80%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 58%),
    #0B0D13;
}
.yt__thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 34px 34px;
}
.yt__play {
  position: relative; z-index: 1;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
  color: #fff;
  padding-left: 3px;
  transition: transform .38s var(--ease), background .3s;
}
.yt__card:hover .yt__play {
  transform: scale(1.12);
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
}
.yt__wave {
  position: absolute; inset: auto 0 0; height: 40%; z-index: 1;
  background: linear-gradient(transparent, rgba(0, 0, 0, .45));
}

.yt__more { display: flex; justify-content: center; margin-top: 30px; }

.yt__meta { display: flex; flex-direction: column; padding: 20px 24px 24px; }
.yt__meta b { font-size: 17px; font-weight: 730; letter-spacing: -.028em; }
.yt__meta i { font-style: normal; font-size: 13.5px; color: var(--text-2); margin-top: 5px; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: clamp(44px, 7vw, 80px) clamp(26px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-2);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.contact__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 52%),
    radial-gradient(circle at 88% 100%, color-mix(in srgb, var(--accent-2) 17%, transparent), transparent 52%);
}
.contact__desc {
  color: var(--text-2); font-size: 15.5px; line-height: 1.8;
  margin: 18px auto 34px; max-width: 560px;
}
.contact__desc b { color: var(--text); font-weight: 700; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__inner {
  display: grid; gap: 44px;
  grid-template-columns: 1fr;
  padding-block: clamp(48px, 7vw, 72px);
}
@media (min-width: 860px) { .footer__inner { grid-template-columns: 1.1fr 2fr; } }

.footer__brand { display: flex; gap: 13px; align-items: flex-start; }
.footer__brand b { font-size: 16px; font-weight: 750; letter-spacing: -.03em; }
.footer__brand p { color: var(--text-3); font-size: 13.5px; margin-top: 6px; max-width: 30ch; line-height: 1.65; }

.footer__nav {
  display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.footer__nav h4 {
  font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px;
}
.footer__nav a {
  display: block; font-size: 14px; color: var(--text-2);
  padding: 5px 0;
  transition: color .22s, transform .22s var(--ease);
}
.footer__nav a:hover { color: var(--accent); transform: translateX(3px); }

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: space-between; align-items: center;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-3);
}

/* ---------- To top / Toast ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 80%, transparent);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.85);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }

.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 200;
  transform: translate(-50%, 20px);
  padding: 12px 22px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto;
    flex-direction: column; gap: 2px;
    margin: 0; padding: 14px var(--pad) 24px;
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .55);
    opacity: 0; visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 13px 16px; font-size: 15.5px; border-radius: var(--r-sm); }
  .nav__links a.is-active::after { display: none; }
  .nav__links a.is-active { background: var(--surface-2); color: var(--accent); }

  .nav:has(.nav__links.is-open) {
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    backdrop-filter: blur(22px) saturate(180%);
    border-bottom-color: transparent;
  }
}

@media (max-width: 560px) {
  .brand__text i { display: none; }
  .hero__stats { gap: 16px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .contact__actions .btn { flex: 1 1 100%; }
  .to-top { right: 14px; bottom: 14px; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .to-top, .hero__bg, .marquee, .hero__scroll { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- YouTube intro banner ---------- */
.yt__intro {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 24px; padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--bg-2);
  transition: transform .32s var(--ease), border-color .28s, box-shadow .32s;
}
.yt__intro:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow);
}
.yt__intro-play {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #ff0000; color: #fff;
  box-shadow: 0 8px 22px -8px rgba(255, 0, 0, .7);
}
.yt__intro-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.yt__intro-meta b { font-size: 16px; font-weight: 720; letter-spacing: -.02em; }
.yt__intro-meta i { font-style: normal; font-size: 13px; color: var(--text-3); }
.yt__intro-arrow { flex: none; margin-left: auto; color: var(--text-3); transition: color .28s, transform .3s var(--ease); }
.yt__intro:hover .yt__intro-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- Lab CTA (실습실) ---------- */
.lab-cta {
  position: relative; overflow: hidden;
  margin-bottom: 26px; padding: 32px clamp(22px, 4vw, 40px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background:
    linear-gradient(160deg, var(--surface-2), transparent 55%),
    var(--bg-2);
  box-shadow: var(--shadow);
  text-align: center;
}
.lab-cta__spark {
  position: absolute; right: -70px; top: -70px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 68%);
  filter: blur(26px); pointer-events: none;
}
.lab-cta__title { font-size: clamp(22px, 3.4vw, 28px); font-weight: 760; letter-spacing: -.035em; }
.lab-cta__desc {
  position: relative; max-width: 620px; margin: 12px auto 0;
  color: var(--text-2); font-size: 15px; line-height: 1.7;
}
.lab-cta__actions {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px; margin-top: 24px;
}

@media (max-width: 560px) {
  .lab-cta__actions .btn { flex: 1 1 100%; }
}
