/* macanuts.net — personal-website (remivezy.com) と同系統のデザイントークンを採用 */

*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

:root {
  --background: 0 0% 100%;
  --foreground: 224 71.4% 4.1%;

  --card: 0 0% 100%;
  --card-foreground: 224 71.4% 4.1%;

  --primary: 220.9 39.3% 11%;
  --primary-foreground: 210 20% 98%;

  --secondary: 220 14.3% 95.9%;
  --secondary-foreground: 220.9 39.3% 11%;

  --muted: 220 14.3% 95.9%;
  --muted-foreground: 220 8.9% 46.1%;

  --accent: 220 14.3% 95.9%;
  --accent-foreground: 220.9 39.3% 11%;

  --border: 220 13% 91%;
  --radius: 0.5rem;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: ui-sans-serif, system-ui, sans-serif, "Noto Sans JP", "Hiragino Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

body {
  margin: 0;
  padding-top: 20px;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd {
  margin: 0;
}

ul, ol {
  list-style: none;
  padding: 0;
}

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

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

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Layout */
.container {
  width: 100%;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 6rem;
}

@media (min-width: 768px) {
  .container {
    padding: 2rem 2rem 6rem;
  }
}

.space-y {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Typography helpers */
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Header / hero */
.site-header {
  margin-bottom: 2rem;
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.site-header .tagline {
  margin-top: 0.375rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Section heading underline, matching resume site's section markers */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 2px;
  background: hsl(var(--muted-foreground) / 0.35);
  margin: 0.25rem 0 0.75rem 0;
  border-radius: 1px;
}

/* Cards (posts, list items) */
.card {
  display: block;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.card:hover,
.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.card + .card {
  margin-top: 0.75rem;
}

.card .meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.card h2, .card h3 {
  margin-top: 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.card p.description {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Tag chips, matching the resume site's role-chip */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  padding: 0 0.5rem;
  height: 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Post content (prose) */
.prose {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose h2, .prose h3 {
  font-weight: 700;
  margin-top: 1.75rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose pre {
  background: hsl(var(--secondary));
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.prose code {
  background: hsl(var(--secondary));
  border-radius: 0.25rem;
  padding: 0.1rem 0.3rem;
  font-size: 0.85rem;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose hr {
  border-top: 1px solid hsl(var(--border));
  margin: 1.5rem 0;
}

/* Floating nav, same treatment as the resume site */
.navigation {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  gap: 0.25rem;
  background-color: hsl(var(--card) / 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.nav-item {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-item:hover,
.nav-item[aria-current="true"] {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

footer {
  margin-top: 3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

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