:root {
  --bg: #14171c;
  --surface: #191d23;
  --line: #262b33;
  --text: #ece9e2;
  --muted: #838b99;
  --accent: #d9a24b;
  --up: #e4573d;
  --down: #4e86e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

a {
  color: inherit;
}

/* ============ 랜딩 (홈, /) ============ */
.landing-body {
  margin: 0;
}

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 8vw;
  position: relative;
}

.landing-clock {
  position: absolute;
  top: 26px;
  right: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.landing-headline {
  margin: 90px 0 0;
  text-align: center;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(22px);
  animation: landing-headline-in 1200ms cubic-bezier(0.16, 1, 0.3, 1) 200ms forwards;
}

@keyframes landing-headline-in {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-headline {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@media (max-width: 600px) {
  .landing-headline {
    font-size: 1.6rem;
    margin-top: 70px;
  }
}

.landing-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.landing-description {
  align-self: center;
  margin: 0 0 40px;
  max-width: 46ch;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.line-mask {
  display: block;
  overflow: hidden;
}

.line-inner {
  display: block;
  transform: translateY(115%);
  animation: line-slide-in 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.line-mask:nth-child(1) .line-inner {
  animation-delay: 900ms;
}

.line-mask:nth-child(2) .line-inner {
  animation-delay: 1060ms;
}

@keyframes line-slide-in {
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .line-inner {
    animation: none;
    transform: none;
  }
}

.landing-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 32px;
}

.landing-menu .btn {
  min-width: 160px;
  text-align: center;
  opacity: 0;
  animation: landing-btn-in 600ms ease-out forwards;
}

.landing-menu .btn:nth-child(1) {
  animation-delay: 1600ms;
}

.landing-menu .btn:nth-child(2) {
  animation-delay: 1720ms;
}

@keyframes landing-btn-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-menu .btn {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .landing {
    padding: 0 24px;
  }
}

/* ============ 앱 셸 (사이드바 + 메인) — 블로그/정보 피드 화면 ============ */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 26px 20px;
}

.sidebar .logo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
  display: block;
  margin-bottom: 30px;
}

.sidebar .logo span {
  color: var(--accent);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  padding: 9px 10px;
  border-radius: 4px;
}

.side-nav a:hover {
  color: var(--text);
}

.side-nav a.current {
  color: var(--text);
  background: rgba(217, 162, 75, 0.1);
}

.main {
  padding: 30px 36px 60px;
  max-width: 980px;
}

/* ============ 기존 상단 헤더 (글쓰기/로그인/설정 화면) ============ */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.main-nav a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.main-nav a:hover {
  color: var(--text);
}

/* ============ 섹션 공통 ============ */
.section {
  padding: 0 0 40px;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 14px;
}

.clock-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 26px;
}

/* ============ 블로그 목록 ============ */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.post-item:first-child {
  padding-top: 0;
}

.post-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.post-item h3 {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 600;
}

.post-item time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: var(--muted);
}

/* ============ 정보 피드 2단 그리드 ============ */
.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.stock-list,
.news-list {
  max-height: 460px;
  overflow-y: auto;
}

.stock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0 7px 10px;
  border-left: 2px solid transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.stock-row.up {
  border-left-color: var(--up);
}

.stock-row.down {
  border-left-color: var(--down);
}

.stock-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-badge {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stock-price {
  text-align: right;
  flex-shrink: 0;
  min-width: 150px;
}

.stock-change {
  font-size: 0.78rem;
}

.stock-change.up {
  color: var(--up);
}

.stock-change.down {
  color: var(--down);
}

.stock-change.flat {
  color: var(--muted);
}

.news-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.87rem;
  line-height: 1.5;
}

.news-item a:hover {
  text-decoration: underline;
}

.news-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ============ 스포츠/취미 (준비 중) ============ */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.feed-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}

.feed-card h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ============ 폼 (글쓰기/로그인/설정) ============ */
.post-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 620px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.form-row input[type="text"],
.form-row input[type="password"],
.form-row textarea {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row textarea {
  resize: vertical;
  line-height: 1.6;
}

.thumbnail-preview {
  margin-top: 8px;
  max-width: 240px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.form-actions {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #14171c;
  font-weight: 600;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.form-error {
  color: var(--up);
  font-size: 0.86rem;
}

.form-success {
  color: #7bc47f;
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .main {
    padding: 24px 20px 50px;
  }

  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 8px;
  }
}
