:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --border: #232323;
  --border-strong: #2e2e2e;
  --text: #ededed;
  --text-muted: #9a9a9a;
  --text-faint: #6b6b6b;
  --accent: #ffffff;
  --accent-soft: #d4d4d4;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 48px rgba(0, 0, 0, 0.55);
  --radius-card: 14px;
  --radius-thumb: 10px;
  --max-width: 1200px;
  --transition: 180ms cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.hero-sub {
  max-width: 720px;
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
}

.hero-sub a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.hero-sub a:hover {
  text-decoration-color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  background: var(--bg-elevated);
}

.gallery {
  padding: 64px 0 96px;
}

.gallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
}

.gallery-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.gallery-count {
  margin: 0;
  color: var(--text-faint);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.grid-status {
  grid-column: 1 / -1;
  padding: 80px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
}

.card-thumb-link {
  display: block;
  background: var(--bg-elevated);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, #1a1a1a 0%, #0e0e0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 320ms cubic-bezier(0.2, 0, 0, 1);
}

.card:hover .card-thumb img {
  transform: scale(1.02);
}

.card-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-thumb-placeholder::before {
  content: "no preview";
}

.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--text);
}

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

.card-desc:empty {
  display: none;
}

.card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-faint);
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.card-meta-item:empty {
  display: none;
}

.card-meta-item + .card-meta-item::before {
  content: "·";
  margin-right: 12px;
  color: var(--border-strong);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tags:empty {
  display: none;
}

.card-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.card-action {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.card-action-primary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
  flex: 1;
  text-align: center;
}

.card-action-primary:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.card-action-secondary {
  color: var(--text-muted);
  border-color: var(--border);
}

.card-action-secondary:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.empty-state {
  text-align: center;
  padding: 80px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  color: var(--text-muted);
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.empty-state a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-faint);
  font-size: 13px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.site-footer a:hover {
  color: var(--text);
  border-bottom-color: var(--border-strong);
}

.footer-meta {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
}

@media (max-width: 640px) {
  .hero {
    padding: 64px 0 48px;
  }

  .gallery {
    padding: 40px 0 64px;
  }

  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  .card:hover {
    transform: none;
  }
}
