/* ============================================================
   DOHYEON TECH BRIEF — dark slate magazine
   ============================================================ */
:root {
  --bg: #0d1117;
  --bg-soft: #10161d;
  --surface: #161b22;
  --surface-2: #1b2431;
  --border: #232e3c;
  --border-soft: #1a222d;
  --text: #e6edf3;
  --text-2: #c2ccd6;
  --muted: #8b98a6;
  --cyan: #38bdf8;
  --blue: #58a6ff;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --wrap: 1120px;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* subtle top glow, no neon */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 320px;
  background: radial-gradient(90% 100% at 50% 0%, rgba(56, 189, 248, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #8cc8ff; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 16px; top: 12px; z-index: 99;
  background: var(--surface); padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border);
}

/* ---------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  min-width: 0;
}
.brand:hover { color: var(--text); }

.brand__mark {
  width: 9px; height: 9px;
  background: var(--cyan);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
  flex: none;
}

.brand__text {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand__suffix {
  color: #5d6b7a;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--cyan); background: rgba(56, 189, 248, 0.08); }

/* ---------------------------------------------------------- hero */
.hero {
  padding-top: 64px;
  padding-bottom: 36px;
}
.hero__title {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
}
.hero__sub {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

/* ---------------------------------------------------------- cards */
.lead { margin-bottom: 28px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  padding-bottom: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.card:hover {
  border-color: #33445a;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}
.card__link { display: block; color: inherit; height: 100%; }
.card__link:hover { color: inherit; }

.card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b0f14;
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}
.card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card__thumb img { transform: scale(1.025); }

.card__body { padding: 18px 20px 22px; }

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.5;
  white-space: nowrap;
}

.card__title {
  margin: 0 0 9px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* featured */
.card--featured .card__link {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
}
.card--featured .card__thumb {
  border-bottom: none;
  border-right: 1px solid var(--border-soft);
  height: 100%;
}
.card--featured .card__body {
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card--featured .card__title {
  font-size: 26px;
  line-height: 1.38;
  -webkit-line-clamp: 3;
  margin-bottom: 12px;
}
.card--featured .card__excerpt {
  font-size: 14.5px;
  line-height: 1.7;
  -webkit-line-clamp: 3;
}

/* ---------------------------------------------------------- post */
.post { padding-top: 30px; padding-bottom: 40px; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #6b7885;
  margin-bottom: 26px;
}
.crumbs a { color: #6b7885; }
.crumbs a:hover { color: var(--cyan); }
.crumbs__here { color: var(--muted); }

.post__head { max-width: 800px; }

.post__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 16px;
}
.post__reading { color: #6b7885; }

.post__title {
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.36;
  letter-spacing: -0.022em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.post__summary {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-2);
  word-break: keep-all;
}

.post__byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.post__author { color: var(--text-2); }

.post__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #8598ab;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

.post__hero {
  max-width: 880px;
  margin: 30px auto 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b0f14;
}
.post__hero img { width: 100%; height: auto; }

/* body */
.post__body {
  max-width: 740px;
  margin: 40px auto 0;
  font-size: 16px;
  line-height: 1.78;
  color: var(--text-2);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.post__body > p { margin: 0 0 22px; }

.post__body h2 {
  margin: 54px 0 18px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.44;
  letter-spacing: -0.015em;
  color: var(--text);
  padding-left: 14px;
  border-left: 3px solid var(--cyan);
}
.post__body h3 {
  margin: 38px 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.post__body h4 {
  margin: 30px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.post__body strong { color: #f2f7fb; font-weight: 700; }
.post__body em { color: #f0f6fb; font-style: normal; }

.post__body a {
  color: var(--blue);
  border-bottom: 1px solid rgba(88, 166, 255, 0.32);
}
.post__body a:hover { border-bottom-color: var(--blue); }

.post__body ul, .post__body ol {
  margin: 0 0 24px;
  padding-left: 22px;
}
.post__body li { margin: 0 0 9px; }
.post__body li::marker { color: #55677a; }

.post__body blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  background: rgba(56, 189, 248, 0.045);
  border-left: 3px solid rgba(56, 189, 248, 0.6);
  border-radius: 0 8px 8px 0;
  color: var(--text-2);
}
.post__body blockquote p { margin: 0 0 12px; }
.post__body blockquote p:last-child { margin-bottom: 0; }

.post__body code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1.5px 5px;
  color: #a5d6ff;
  word-break: normal;
  overflow-wrap: break-word;
}

.codeblock {
  position: relative;
  margin: 26px 0 30px;
}
.post__body pre {
  margin: 0;
  padding: 20px 22px;
  background: #0a0e13;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  line-height: 1.7;
}
.post__body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #cbd7e3;
  white-space: pre;
  word-break: normal;
}

.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #7d8b99;
  background: #12181f;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.codeblock:hover .copy, .copy:focus { opacity: 1; }
.copy:hover { color: var(--cyan); border-color: rgba(56, 189, 248, 0.4); }
.copy.is-done { color: var(--cyan); border-color: rgba(56, 189, 248, 0.4); }

.post__body hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 36px 0;
}

.table-wrap { overflow-x: auto; margin: 26px 0; }
.post__body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  word-break: keep-all;
}
.post__body th:first-child, .post__body td:first-child { white-space: nowrap; }
.post__body th, .post__body td {
  border: 1px solid var(--border);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
.post__body th { background: var(--surface); color: var(--text); font-weight: 600; }

.post__body img {
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  margin: 26px 0;
}

.post__foot {
  max-width: 740px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.post__tags--foot { margin-bottom: 16px; }
.post__note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: #6b7885;
}

/* pager */
.pager {
  max-width: 740px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pager__item {
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.pager__item:hover { border-color: #33445a; transform: translateY(-1px); }
.pager__item span {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.pager__item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pager__item--next { text-align: right; }

/* ---------------------------------------------------------- archive */
.archive, .about { padding-top: 56px; padding-bottom: 60px; }

.page-head { margin-bottom: 34px; }
.page-head h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head p { margin: 0; color: var(--muted); font-size: 14.5px; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-soft); }
.row { border-bottom: 1px solid var(--border-soft); }
.row a {
  display: grid;
  grid-template-columns: 92px 108px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 16px 8px;
  color: var(--text);
  transition: background 0.15s;
}
.row a:hover { background: rgba(255, 255, 255, 0.02); color: var(--text); }
.row time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.row__cat {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #7dd3fc;
}
.row__title { font-size: 15.5px; font-weight: 600; line-height: 1.55; letter-spacing: -0.01em; }

/* ---------------------------------------------------------- about */
.about__lede { max-width: 640px; }
.about__body { max-width: 740px; font-size: 16px; line-height: 1.8; color: var(--text-2); }
.about__body h2 {
  margin: 40px 0 14px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  padding-left: 12px;
  border-left: 3px solid var(--cyan);
}
.about__body p { margin: 0 0 18px; }

/* ---------------------------------------------------------- empty/404 */
.empty {
  text-align: center;
  padding: 110px 24px 120px;
}
.empty__code {
  font-family: var(--mono);
  font-size: 64px;
  font-weight: 700;
  color: #26313f;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 18px;
}
.empty h1 { margin: 0 0 12px; font-size: 24px; font-weight: 700; }
.empty p { margin: 0 0 10px; color: var(--muted); }
.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 14px;
  font-weight: 600;
}
.btn:hover { background: rgba(56, 189, 248, 0.18); color: #a5e4ff; }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn--ghost:hover { color: var(--text); border-color: #33445a; }

/* ---------------------------------------------------------- footer */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding-top: 46px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 38px;
}
.footer__brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 12px;
}
.footer__desc {
  margin: 0;
  max-width: 340px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.footer__head {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #5d6b7a;
  margin-bottom: 12px;
}
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer__col--brand { display: block; }
.footer__col a { font-size: 13.5px; color: var(--muted); }
.footer__col a:hover { color: var(--cyan); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 26px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #5d6b7a;
  letter-spacing: 0.02em;
}
.footer__mono { white-space: nowrap; }

/* ---------------------------------------------------------- subscribe / tip */
.subscribe {
  max-width: 740px;
  margin: 40px auto 0;
  padding: 26px 28px 24px;
  background: linear-gradient(180deg, #131a23 0%, #10161d 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: 92px;
}
.subscribe__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: #5d6b7a;
  margin-bottom: 8px;
}
.subscribe__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.subscribe__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
}
.subscribe__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 14px;
}
.subbtn {
  display: block;
  padding: 12px 14px;
  background: #0f151c;
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.subbtn:hover {
  border-color: rgba(56, 189, 248, 0.42);
  background: #121b24;
  transform: translateY(-1px);
}
.subbtn__k {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #7dd3fc;
  margin-bottom: 5px;
}
.subbtn__v {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subbtn--mail .subbtn__v { font-family: var(--sans); font-size: 14px; color: var(--text); }
.subscribe__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: #6b7885;
}

.about__body .subscribe { margin: 22px 0 10px; }

.tip {
  max-width: 740px;
  margin: 18px auto 0;
  padding: 24px 28px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  scroll-margin-top: 92px;
}
.tip__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.tip__desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}
.tip__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  padding: 13px 0;
  border-top: 1px solid var(--border-soft);
}
.tip__k {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #7dd3fc;
  margin-bottom: 4px;
}
.tip__addr {
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-all;
}
.tip__copy {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #7d8b99;
  background: #12181f;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
}
.tip__copy:hover, .tip__copy.is-done { color: var(--cyan); border-color: rgba(56, 189, 248, 0.4); }
.tip__note { margin: 14px 0 0; font-size: 12px; color: #6b7885; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .card--featured .card__link { grid-template-columns: 1fr; }
  .card--featured .card__thumb { border-right: none; border-bottom: 1px solid var(--border-soft); }
  .card--featured .card__body { padding: 20px 20px 24px; }
  .card--featured .card__title { font-size: 22px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__col--brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero { padding-top: 42px; padding-bottom: 26px; }
  .brand__suffix { display: none; }
  .header__inner { min-height: 56px; gap: 8px; }
  .nav a { padding: 6px 8px; font-size: 11.5px; }
  .wrap { padding: 0 18px; }
  .post__title { font-size: 25px; }
  .post__body { font-size: 15.5px; margin-top: 30px; }
  .post__body h2 { font-size: 20px; margin-top: 44px; }
  .post__body pre { padding: 16px; }
  .post__body pre code { font-size: 12.5px; }
  .row a { grid-template-columns: 1fr; gap: 6px; }
  .row__cat { display: none; }
  .row time { font-size: 11px; }
  .pager { grid-template-columns: 1fr; }
  .pager__item--next { text-align: left; }
  .subscribe { padding: 22px 18px; }
  .subscribe__actions { grid-template-columns: 1fr; }
  .tip { padding: 20px 18px; }
  .tip__row { gap: 2px 8px; }
  .tip__addr { font-size: 12px; }
  .footer__inner { grid-template-columns: 1fr; gap: 26px; }
  .footer__bottom { flex-direction: column; gap: 6px; }
  .copy { opacity: 1; }
}
