@charset "UTF-8";

/* =========================================================
   DEVELOPER OBSERVATORY — Tistory skin
   Structure
   1. Tokens          5. Hero / intro        9. Footer / pagination
   2. Base            6. List + search       10. Comments / forms
   3. Layout          7. Article             11. Responsive
   4. Sidebar / nav   8. Code / tables       12. Motion
========================================================= */

/* ---------------------------------------------------------
   1. Tokens
--------------------------------------------------------- */
:root {
  color-scheme: light;

  --bg: #F4F7FA;
  --surface: #FFFFFF;
  --surface-2: #EAF0F6;
  --surface-3: #E1E8F0;

  --text: #172033;
  --text-2: #4E5D72;
  --text-3: #5A677B;

  --border: #D8E0E9;
  --border-strong: #BCC9D8;
  --control-border: #7A889C;

  --accent: #2B68B3;
  --accent-soft: #78A9DB;
  --observation: #B98A14;
  --observation-text: #7D5B06;

  --code-bg: #0B1220;
  --code-text: #E7EDF7;
  --code-muted: #91A4BF;
  --code-accent: #84BAFF;

  --shadow-card: 0 10px 30px rgba(32, 53, 80, .055);
  --shadow-card-hover: 0 18px 42px rgba(25, 45, 75, .10);

  --sidebar: 240px;
  --content: 1080px;
  --article: 760px;

  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", monospace;
  --sans: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --fs-label: 11px;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0A111D;
  --surface: #101A29;
  --surface-2: #172337;
  --surface-3: #1D2A40;

  --text: #F4F7FB;
  --text-2: #B5C0D0;
  --text-3: #7E8CA0;

  --border: #26344A;
  --border-strong: #35465F;
  --control-border: #5B6E8A;

  --accent: #84BAFF;
  --accent-soft: #A7CCFF;
  --observation: #F0D477;
  --observation-text: #F0D477;

  --shadow-card: 0 14px 38px rgba(0, 0, 0, .20);
  --shadow-card-hover: 0 18px 42px rgba(0, 0, 0, .32);
}

/* ---------------------------------------------------------
   2. Base
--------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}

body.mobile-menu-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

main:focus {
  outline: none;
}

.blind,
.screen_out {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .18em;
}

/* ---------------------------------------------------------
   3. Layout
--------------------------------------------------------- */
.observatory {
  min-height: 100vh;
  min-height: 100dvh;
}

.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.main > main {
  flex: 1 0 auto;
}

.content {
  width: min(calc(100% - 64px), var(--content));
  margin: 0 auto;
  padding: 80px 0 100px;
}

.mobile-header,
.mobile-drawer {
  display: none;
}

/* ---------------------------------------------------------
   4. Sidebar / navigation
--------------------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--sidebar);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 32px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
}

.brand-mark {
  color: var(--observation);
  font-size: 16px;
}

.brand-word {
  color: var(--text);
  font-size: 14px;
}

.brand-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
}

.navigation {
  display: flex;
  flex-direction: column;
  margin-top: 40px;
}

.nav-label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .14em;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  transition: color .15s ease, background-color .15s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 18px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .15s ease;
}

.nav-item:hover,
.nav-item[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.nav-item:hover::before,
.nav-item[aria-current="page"]::before {
  opacity: 1;
}

.nav-icon {
  width: 18px;
  color: var(--accent);
  text-align: center;
}

/* sidebar search (shared base for every .search-form) */
.search-form {
  display: flex;
  align-items: stretch;
  width: min(390px, 100%);
  border: 1px solid var(--control-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 8px;
  padding: 0 13px;
}

.search-icon {
  color: var(--text-3);
  font-size: 22px;
  line-height: 1;
}

.search-form input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.search-form input::placeholder {
  color: var(--text-3);
}

.search-submit {
  min-width: 64px;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.search-submit:hover {
  background: var(--surface-2);
}

.search-form-side {
  width: 100%;
  margin-top: 28px;
}

.search-form-side input {
  height: 40px;
  font-size: 13px;
}

.search-form-side .search-icon {
  font-size: 18px;
}

.search-form-side .search-input-wrap {
  padding: 0 10px;
}

.search-form-side .search-submit {
  min-width: 52px;
  padding: 0 10px;
}

/* category widget (Tistory-generated markup) */
.category-navigation {
  margin-top: 34px;
}

.category-tree {
  margin-top: 4px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11px;
}

.category-tree .tt_category,
.category-tree .tt_category * {
  box-sizing: border-box;
}

.category-tree .tt_category,
.category-tree .tt_category :is(ul, li, a, span),
.category-tree [style*="background"] {
  background-color: transparent !important;
  background-image: none !important;
}

.category-tree .tt_category,
.category-tree .tt_category .category_list,
.category-tree .tt_category .sub_category_list {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.category-tree .tt_category {
  color: var(--text-2) !important;
  font: 400 11px/1.4 var(--mono) !important;
}

.category-tree .tt_category .category_list > li {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  list-style: none !important;
}

.category-tree .tt_category :is(.link_tit, .link_item) {
  position: relative;
  display: flex !important;
  align-items: center;
  width: 100%;
  min-height: 38px;
  margin: 0 !important;
  padding: 8px 8px 8px 0 !important;
  border: 0 !important;
  border-radius: 5px;
  color: var(--text-2) !important;
  font: 400 11px/1.35 var(--mono) !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-indent: 0 !important;
  white-space: normal !important;
  box-shadow: none !important;
}

.category-tree .tt_category .link_tit {
  color: var(--text) !important;
  font-weight: 600 !important;
}

.category-tree .tt_category .link_tit::before,
.category-tree .tt_category .category_list > li > .link_item::before {
  content: "✦";
  display: inline-block;
  flex: 0 0 22px;
  width: 22px;
  color: var(--observation);
  font-size: 9px;
  text-align: center;
}

.category-tree .tt_category :is(.link_tit, .link_item):hover {
  color: var(--accent) !important;
  background-color: var(--surface-2) !important;
}

.category-tree .tt_category .sub_category_list {
  width: calc(100% - 12px);
  margin: 0 0 5px 12px !important;
  padding: 2px 0 2px 10px !important;
  border: 0 !important;
  border-left: 1px solid var(--border) !important;
}

.category-tree .tt_category .sub_category_list li {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  list-style: none !important;
}

.category-tree .tt_category .sub_category_list li::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 7px;
  height: 1px;
  background-color: var(--border-strong) !important;
}

.category-tree .tt_category .sub_category_list .link_item {
  min-height: 34px;
  color: var(--text-3) !important;
}

.category-tree .tt_category .sub_category_list .link_item::before {
  content: "·";
  flex: 0 0 16px;
  width: 16px;
  color: var(--accent);
  font-size: 14px;
  text-align: center;
}

.category-tree .tt_category .c_cnt {
  display: inline-block;
  margin-left: 6px;
  color: var(--text-3) !important;
  font-family: var(--mono) !important;
  font-size: var(--fs-label) !important;
  font-weight: 400 !important;
}

/* Tistory's own fold icon stays as an invisible click target */
.category-tree .tt_category img {
  width: 14px !important;
  height: 14px !important;
  margin: 0 5px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
}

/* current location + open/closed markers (set by script.js) */
.category-tree .tt_category a[aria-current="page"],
.category-tree .tt_category .category_list a[aria-current="page"] {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

.category-tree .tt_category li.is-current-branch > a {
  color: var(--text) !important;
}

.sidebar .category-tree li.has-children > a::after {
  content: "▸";
  margin-left: auto;
  padding-left: 8px;
  color: var(--text-3);
  font-size: 11px;
  transition: transform .15s ease;
}

.sidebar .category-tree li.has-children.is-open > a::after {
  transform: rotate(90deg);
}

.visitor-panel {
  margin-top: 34px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.visitor-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.visitor-panel-head .nav-label {
  margin: 0;
}

.visitor-live {
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .05em;
}

.visitor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 13px;
}

.visitor-stat {
  min-width: 0;
  padding: 8px 6px;
  border-top: 1px solid var(--border);
}

.visitor-stat span,
.visitor-stat strong {
  display: block;
}

.visitor-stat span {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.visitor-stat strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.github-sidebar-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 9px;
  margin-top: 22px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}

.github-sidebar-card:hover {
  border-color: var(--accent);
}

.github-card-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--mono);
}

.github-sidebar-card span:not(.github-card-icon) {
  align-self: end;
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.github-sidebar-card small {
  color: var(--text-3);
  font-size: var(--fs-label);
}

.observatory-status {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.status-header {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-soft);
}

.observatory-status strong {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
}

.status-time {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.sidebar-bottom {
  margin-top: 20px;
}

.theme-switch {
  padding: 8px 0;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .05em;
}

.theme-switch:hover {
  color: var(--text);
}

.dark-label,
html[data-theme="dark"] .light-label {
  display: none;
}

html[data-theme="dark"] .dark-label {
  display: inline;
}

/* ---------------------------------------------------------
   5. Hero (night sky + magnifier) / intro — home only
   The hero is always a dark "night sky" panel, in both themes.
--------------------------------------------------------- */
.home-hero,
.home-intro {
  display: none;
}

body#tt-body-index .home-hero {
  --lens: 260px;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 590px;
  padding: 0 clamp(28px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #050A14 url("./images/observatory-sky.jpg") 72% 50% / cover no-repeat;
  color: #F4F7FB;
  isolation: isolate;
  cursor: crosshair;
}

body#tt-body-index .home-intro {
  position: relative;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 28px;
  padding: 84px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(5, 10, 20, .84) 0%, rgba(5, 10, 20, .52) 42%, rgba(5, 10, 20, 0) 72%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 590px;
}

.home-hero .eyebrow {
  color: #84BAFF;
}

.hero-title {
  margin: 0;
  color: #F4F7FB;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .55);
}

.hero-description {
  max-width: 560px;
  margin: 28px 0 0;
  color: #C3CFE0;
  font-size: 19px;
  line-height: 1.8;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
}

/* shooting stars: upper-right -> lower-left (positions randomised by script.js) */
.hero-stars {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.shooting-star {
  position: absolute;
  width: 140px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(160, 200, 255, 0), rgba(160, 200, 255, .7) 60%, #FFFFFF);
  transform-origin: 100% 50%;
  transform: rotate(145deg);
  opacity: 0;
  animation: shooting-star 9s linear infinite;
}

.shooting-star::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 8px 2px rgba(180, 210, 255, .85);
}

.shooting-star-1 { top: 8%;  right: 10%; animation-duration: 9s;    animation-delay: 1.2s; }
.shooting-star-2 { top: 22%; right: 34%; animation-duration: 12.5s; animation-delay: 4.8s; width: 110px; }
.shooting-star-3 { top: 4%;  right: 48%; animation-duration: 15s;   animation-delay: 8.5s; width: 170px; }

@keyframes shooting-star {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(145deg) scaleX(.35); }
  2%   { opacity: 1; }
  9%   { opacity: 1; }
  12%  { opacity: 0; transform: translate3d(-430px, 300px, 0) rotate(145deg) scaleX(1); }
  100% { opacity: 0; transform: translate3d(-430px, 300px, 0) rotate(145deg) scaleX(1); }
}

.home-hero.is-paused .shooting-star,
.home-hero.is-paused .sky-hint,
.home-hero.is-paused .planet-orbit {
  animation-play-state: paused;
}

/* faint twinkles that hint where something can be observed */
.sky-hint {
  position: absolute;
  z-index: 3;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #D6E4FF;
  box-shadow: 0 0 7px 1px rgba(160, 200, 255, .85);
  opacity: .5;
  pointer-events: none;
  animation: hint-twinkle 3.4s ease-in-out infinite;
}

@keyframes hint-twinkle {
  0%, 100% { opacity: .15; transform: scale(.8); }
  50% { opacity: .75; transform: scale(1.25); }
}

/* magnifier (built by script.js) */
.sky-lens {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: var(--lens);
  height: var(--lens);
  margin: calc(var(--lens) / -2) 0 0 calc(var(--lens) / -2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.sky-lens.is-active {
  opacity: 1;
}

.sky-lens-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 3px solid rgba(214, 228, 250, .7);
  border-radius: 50%;
  background: #050A14;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 10px 34px rgba(0, 0, 0, .6), inset 0 0 30px rgba(0, 0, 0, .6);
  transform: scale(.72);
  transition: transform .22s ease;
}

.sky-lens.is-active .sky-lens-frame {
  transform: scale(1);
}

.sky-lens-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}

.sky-lens-handle {
  position: absolute;
  top: 86%;
  left: 86%;
  width: 13px;
  height: calc(var(--lens) * .3);
  margin-left: -6px;
  border-radius: 7px;
  background: linear-gradient(90deg, #2A3547, #6B7A93 45%, #2A3547);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
  transform-origin: 50% 0;
  transform: rotate(-45deg);
}

.sky-lens-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

.sky-lens-bg {
  position: absolute;
  inset: 0;
  background: #050A14 url("./images/observatory-sky.jpg") 72% 50% / cover no-repeat;
}

.sky-lens-deep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.sky-lens-planets {
  position: absolute;
  inset: 0;
}

/* planets only exist inside the lens */
.planet {
  position: absolute;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
}

.planet-body {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  transition: box-shadow .25s ease;
  box-shadow: inset -5px -6px 10px rgba(0, 0, 0, .6), 0 0 16px var(--glow);
}

.planet.is-found .planet-body {
  box-shadow: inset -5px -6px 10px rgba(0, 0, 0, .6), 0 0 26px 4px var(--glow);
}

.planet-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-14deg, rgba(255, 255, 255, 0) 0 5px, rgba(255, 255, 255, .09) 5px 8px);
}

.planet-c {
  --glow: rgba(95, 125, 240, .65);
}

.planet-c .planet-body {
  background: radial-gradient(circle at 32% 28%, #BCCEFF 0, #5F7DF0 34%, #2538A8 68%, #0C1544 100%);
}

.planet-java {
  --glow: rgba(240, 138, 36, .6);
}

.planet-java .planet-body {
  background: radial-gradient(circle at 32% 28%, #FFE0AE 0, #F08A24 34%, #B3400E 68%, #3D1305 100%);
}

.planet-ring {
  position: absolute;
  top: 34%;
  right: -48%;
  bottom: 34%;
  left: -48%;
  border: 1.5px solid rgba(235, 244, 255, .5);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.planet-orbit {
  position: absolute;
  inset: -62%;
  animation: planet-orbit 9s linear infinite;
}

.planet-java .planet-orbit {
  animation-duration: 12s;
  animation-direction: reverse;
}

.planet-moon {
  position: absolute;
  top: 0;
  left: 50%;
  width: 13%;
  height: 13%;
  margin-left: -6.5%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #AEBBD2 60%, #5A6781);
  box-shadow: 0 0 6px rgba(200, 220, 255, .6);
}

@keyframes planet-orbit {
  to { transform: rotate(360deg); }
}

.sky-lens-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.planet-label {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  margin-left: -75px;
  color: #F4F7FB;
  font-family: var(--mono);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
  opacity: 0;
  transition: opacity .2s ease;
}

.planet-label.is-near {
  opacity: 1;
}

.planet-label strong,
.planet-label span,
.planet-label em {
  display: block;
}

.planet-label strong {
  font-size: 16px;
  letter-spacing: .04em;
}

.planet-label span {
  margin-top: 1px;
  font-size: var(--fs-label);
}

.planet-label em {
  margin-top: 1px;
  color: #A7CCFF;
  font-size: var(--fs-label);
  font-style: normal;
}

.intro-marker {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--observation);
  font-size: 20px;
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 4%, transparent);
}

.intro-title {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.035em;
}

.intro-copy p:not(.intro-title) {
  margin: 18px 0 0;
  color: var(--text-2);
  font-size: 16px;
}

.intro-orbit {
  position: relative;
  width: 130px;
  height: 130px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.intro-orbit::before,
.intro-orbit::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.intro-orbit span {
  position: absolute;
  top: 12px;
  right: 25px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--observation);
  box-shadow: 0 0 14px var(--observation);
}

/* ---------------------------------------------------------
   6. Page headers / list cards
--------------------------------------------------------- */
.page-header {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15;
  letter-spacing: -.04em;
}

.page-header p {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--text-2);
}

.page-count {
  margin-top: 18px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.page-header-with-search {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  color: var(--text);
}

body#tt-body-index .page-header-with-search {
  padding-top: 84px;
}

body#tt-body-index .page-header-with-search .eyebrow {
  margin-bottom: 12px;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px;
  padding-top: 36px;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 255px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.article-card-meta a {
  color: var(--accent);
}

.article-card h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.article-card h2 a:hover {
  color: var(--accent);
}

.article-card p {
  display: -webkit-box;
  max-width: 720px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.article-card-arrow {
  display: inline-block;
  margin-top: auto;
  padding-top: 20px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.empty-state {
  padding: 80px 0;
  color: var(--text-3);
  text-align: center;
}

.empty-mark {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 32px;
}

.empty-state strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
}

.empty-state p {
  margin: 8px 0 0;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 40px;
}

.tag-cloud a {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
}

.tag-cloud a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.local-log {
  padding-top: 32px;
  font-family: var(--mono);
}

.local-spot,
.local-info {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.local-spot {
  color: var(--accent);
  font-size: 12px;
}

.local-info a {
  color: var(--text-2);
  font-size: 13px;
}

/* ---------------------------------------------------------
   7. Article
--------------------------------------------------------- */
.article-header {
  max-width: var(--article);
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.25;
  letter-spacing: -.04em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.article-meta a:hover {
  color: var(--accent);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--article)) 180px;
  gap: 64px;
  margin-top: 52px;
}

.article-layout.no-toc {
  grid-template-columns: minmax(0, var(--article));
}

.article-content {
  min-width: 0;
  font-size: 18px;
  line-height: 1.95;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content h2 {
  margin: 64px 0 20px;
  font-size: 30px;
  line-height: 1.4;
}

.article-content h3 {
  margin: 48px 0 16px;
  font-size: 23px;
  line-height: 1.5;
}

.article-content h4 {
  margin: 36px 0 12px;
  font-size: 18px;
}

.article-content p {
  margin: 1.2em 0;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: 3px;
}

/* Tistory editor can add inline sizes to images, hence !important */
.article-content img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 36px auto;
}

.article-content :is(iframe, video, embed, object) {
  max-width: 100%;
}

.article-content :is(iframe[src*="youtube"], iframe[src*="youtu.be"], iframe[src*="player.vimeo"]) {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.article-content figure {
  margin: 36px 0;
}

.article-content figcaption {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}

.article-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  color: var(--text-2);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
}

.article-content hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.article-content :not(pre) > code {
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--surface);
  color: var(--accent);
  font-size: .9em;
}

.article-content code {
  font-family: var(--mono);
}

.article-toc {
  position: sticky;
  top: 32px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.toc-label,
.footer-label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
}

.article-toc a,
.toc-inline a {
  display: block;
  padding: 5px 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  transition: color .15s ease;
}

.article-toc a.toc-h3,
.toc-inline a.toc-h3 {
  padding-left: 10px;
  font-size: 11px;
}

.article-toc a:hover,
.article-toc a.active,
.toc-inline a:hover {
  color: var(--accent);
}

/* collapsible TOC for narrow screens (created by script.js) */
.toc-inline {
  display: none;
  margin-top: 36px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.toc-inline summary {
  color: var(--text-2);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
  cursor: pointer;
}

.toc-inline nav {
  margin-top: 10px;
}

.article-footer {
  max-width: var(--article);
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.article-tags {
  margin-bottom: 42px;
}

.tag-content a,
.article-tags a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.tag-content a:hover,
.article-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.article-page {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  margin-bottom: 42px;
  border: 1px solid var(--border);
  background: var(--border);
}

.article-nav {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
}

.article-nav:hover {
  background: var(--surface-2);
}

.article-nav span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.article-nav strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-nav.current {
  color: var(--accent);
}

.related {
  margin-bottom: 42px;
}

.related ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.related li {
  border-bottom: 1px solid var(--border);
}

.related a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.related strong {
  font-size: 14px;
  font-weight: 500;
}

.related span {
  flex-shrink: 0;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.github-project-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.github-project-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.github-project-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  font-size: 18px;
}

.github-project-copy {
  flex: 1;
  min-width: 0;
}

.github-project-copy small,
.github-project-copy strong,
.github-project-copy em {
  display: block;
}

.github-project-copy small {
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.github-project-copy strong {
  margin-top: 3px;
  font-size: 16px;
}

.github-project-copy em {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-project-arrow {
  color: var(--accent);
  font-size: 20px;
}

.article-status {
  margin-bottom: 32px;
  color: var(--observation-text);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
}

.protected-box {
  max-width: var(--article);
  margin-top: 52px;
  padding: 64px 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.protected-mark {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 32px;
}

.protected-box strong {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
}

.protected-box p {
  color: var(--text-2);
}

.protected_form {
  display: flex;
  max-width: 420px;
  margin: 24px auto 0;
}

.protected_form input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--control-border);
  border-right: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
}

.protected_form input:focus-visible {
  outline-offset: -2px;
}

.protected_form button {
  padding: 0 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

/* ---------------------------------------------------------
   8. Code blocks / tables
--------------------------------------------------------- */
.article-content pre {
  position: relative;
  overflow-x: auto;
  margin: 34px 0;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  word-break: normal;
  overflow-wrap: normal;
  -webkit-overflow-scrolling: touch;
}

.article-content pre code {
  color: inherit;
  font-size: 13px;
}

.article-content .code-block {
  position: relative;
  margin: 34px 0;
}

.article-content .code-block::before {
  content: "✦  코드 기록";
  position: absolute;
  top: 13px;
  left: 18px;
  z-index: 1;
  color: var(--code-muted);
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: .05em;
  pointer-events: none;
}

.article-content .code-block > pre {
  margin: 0;
  padding: 48px 22px 22px;
}

.code-copy-button {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  color: #C3CFE0;
  font-family: var(--mono);
  font-size: var(--fs-label);
  line-height: 1;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.code-copy-button:hover,
.code-copy-button.is-copied {
  border-color: var(--code-accent);
  background: rgba(132, 186, 255, .14);
  color: var(--code-accent);
}

.code-copy-button:focus-visible {
  outline-color: var(--code-accent);
}

.article-content .table-scroll {
  max-width: 100%;
  margin: 32px 0;
  overflow-x: auto;
}

.article-content table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.article-content .table-scroll table {
  min-width: 480px;
  margin: 0;
}

.article-content th,
.article-content td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th {
  background: var(--surface);
  font-weight: 600;
}

/* ---------------------------------------------------------
   9. Footer / pagination
--------------------------------------------------------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  width: min(calc(100% - 64px), var(--content));
  margin: 0 auto;
  padding: 30px 0 44px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: var(--fs-label);
}

.footer div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer strong {
  color: var(--text-2);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 72px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-number,
.page-link {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
}

.page-link {
  min-width: 110px;
  white-space: nowrap;
}

.page-number:hover,
.page-link:hover {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--accent);
}

.page-number[aria-current="page"] {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
}

.no-more-prev,
.no-more-next {
  opacity: .35;
  pointer-events: none;
}

/* ---------------------------------------------------------
   10. Comments / guestbook / forms
--------------------------------------------------------- */
.guestbook,
.article-reply {
  max-width: var(--article);
  padding-top: 32px;
  color: var(--text);
}

.guestbook :where(input, textarea),
.article-reply :where(input, textarea) {
  max-width: 100%;
  border: 1px solid var(--control-border);
  background: var(--surface);
  color: var(--text);
}

/* ---------------------------------------------------------
   11. Responsive  (breakpoints: 1100 / 860 / 560)
--------------------------------------------------------- */
@media screen and (max-width: 1100px) {
  :root {
    --sidebar: 210px;
  }

  .content {
    width: min(calc(100% - 48px), var(--content));
  }

  .article-layout,
  .article-layout.no-toc {
    grid-template-columns: minmax(0, var(--article));
  }

  .article-toc {
    display: none;
  }

  .toc-inline {
    display: block;
  }

  body#tt-body-index .home-intro {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .intro-orbit {
    display: none;
  }
}

@media screen and (max-width: 860px) {
  html {
    scroll-padding-top: 80px;
  }

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .content {
    width: min(calc(100% - 40px), var(--content));
    padding: 48px 0 80px;
  }

  .footer {
    width: calc(100% - 40px);
    flex-direction: column;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .icon-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--text-2);
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
    padding: 0 13px;
  }

  .menu-toggle span {
    display: block;
    height: 1.5px;
    background: var(--text);
  }

  body#tt-body-index .home-hero {
    --lens: 220px;
    min-height: 520px;
    border-radius: 12px;
    background-image: url("./images/observatory-sky-sm.jpg");
    background-position: 76% 50%;
  }

  .sky-lens-bg {
    background-image: url("./images/observatory-sky-sm.jpg");
    background-position: 76% 50%;
  }

  body#tt-body-index .home-intro {
    grid-template-columns: 1fr;
    padding: 64px 0;
  }

  body#tt-body-index .page-header-with-search {
    padding-top: 64px;
  }

  .intro-marker {
    margin-bottom: 4px;
  }

  .page-header-with-search {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form,
  .search-form-page {
    width: 100%;
  }

  .article-layout {
    display: block;
  }

  .article-content {
    font-size: 16px;
  }

  .pagination {
    gap: 12px;
  }

  .page-numbers {
    gap: 6px;
  }

  .page-number,
  .page-link {
    min-width: 40px;
    height: 44px;
    font-size: 13px;
  }

  .page-link {
    min-width: 96px;
  }

  /* drawer */
  .mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: block;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .25s;
  }

  body.mobile-menu-open .mobile-drawer {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .2s ease;
  }

  body.mobile-menu-open .mobile-drawer-backdrop {
    opacity: 1;
  }

  .mobile-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(82vw, 340px);
    height: 100%;
    padding: 24px 24px 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--border);
    background: var(--surface);
    transform: translateX(100%);
    transition: transform .25s ease;
  }

  body.mobile-menu-open .mobile-drawer-panel {
    transform: translateX(0);
  }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
  }

  .drawer-head .eyebrow {
    margin: 0;
  }

  .drawer-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    color: var(--text-2);
    font-size: 28px;
    line-height: 1;
  }

  .search-form-drawer {
    margin-bottom: 20px;
  }

  .drawer-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    font-family: var(--mono);
    font-size: 13px;
  }

  .drawer-nav a[aria-current="page"] {
    color: var(--accent);
  }

  .drawer-nav a > span {
    color: var(--accent);
  }

  .drawer-categories {
    margin-top: 28px;
  }

  .drawer-categories[hidden] {
    display: none;
  }

  .drawer-categories .category-tree .tt_category .sub_category_list {
    display: block !important;
  }

  .drawer-categories .category-tree .tt_category img {
    display: none !important;
  }

  .drawer-categories .category-tree .tt_category :is(.link_tit, .link_item) {
    min-height: 44px;
    font-size: 13px !important;
  }
}

@media screen and (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .content {
    width: calc(100% - 32px);
    padding-top: 36px;
  }

  .footer {
    width: calc(100% - 32px);
  }

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

  .hero-description {
    font-size: 16px;
  }

  body#tt-body-index .home-hero {
    --lens: 190px;
    min-height: 420px;
    padding: 0 22px;
  }

  .intro-title {
    font-size: 27px;
  }

  .article-card {
    padding: 24px;
  }

  .article-card h2 {
    font-size: 21px;
  }

  .article-header h1 {
    font-size: 32px;
  }

  .article-page {
    grid-template-columns: 1fr;
  }

  .article-nav.current {
    display: none;
  }

  .related a {
    flex-direction: column;
    gap: 4px;
  }

  .protected_form {
    display: block;
  }

  .protected_form input,
  .protected_form button {
    width: 100%;
    border: 1px solid var(--control-border);
  }

  .protected_form button {
    height: 44px;
    margin-top: 8px;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

/* ---------------------------------------------------------
   12. Motion
--------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  html.theme-transition,
  html.theme-transition *,
  html.theme-transition *::before,
  html.theme-transition *::after {
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease !important;
  }
}

/* hover lift only where hover exists, so touch devices never keep a "stuck" card */
@media (hover: hover) {
  .article-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-soft);
    box-shadow: var(--shadow-card-hover);
  }

  .github-sidebar-card:hover {
    transform: translateY(-2px);
  }

  .github-project-card:hover {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .shooting-star,
  .planet-orbit {
    animation: none !important;
  }

  .sky-hint {
    animation: none !important;
    opacity: .5;
  }
}
