:root {
  --bg: #0a0a0a;
  --text: #e6e6e6;
  --dim: #6b6b6b;
  --faint: #3d3d3d;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.doc {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 24px 72px;
  text-align: left;
}

header {
  margin-bottom: 40px;
}

.meta {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 16px;
}

.meta a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.meta a:hover {
  color: #ffffff;
  border-color: var(--dim);
}

h1 {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.md {
  font-family: var(--mono);
  font-size: 0.72em;
  color: var(--dim);
  font-weight: 400;
}

.cursor {
  display: inline-block;
  width: 0.3em;
  height: 0.95em;
  background: var(--text);
  vertical-align: -0.08em;
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

.toc {
  margin-bottom: 56px;
}

.toc p {
  font-size: 14px;
  margin-bottom: 20px;
}

.toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc a {
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

section {
  margin-bottom: 56px;
}

h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 20px 0 8px;
}

.projects {
  display: flex;
  flex-direction: column;
}

.row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--faint);
}

.col-name a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.col-name a:hover {
  color: #ffffff;
  border-color: var(--dim);
}

.tip {
  position: fixed;
  z-index: 50;
  width: 264px;
  background: #0d0d0d;
  border: 1px solid var(--faint);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.tip.show {
  opacity: 1;
  transform: translateY(0);
}

.tip img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--faint);
  border-radius: 8px 8px 0 0;
}

.tip-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 14px 4px;
}

.tip-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin: 0;
  white-space: nowrap;
}

.tip-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tip-text {
  font-size: 13px;
  line-height: 1.5;
  color: #b8b8b8;
  margin: 0 14px 12px;
}

.col-desc {
  font-size: 15px;
  line-height: 1.65;
  color: #b8b8b8;
}

@media (max-width: 560px) {
  .row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

p {
  margin-bottom: 16px;
  color: var(--text);
}

.links {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.links a:hover {
  color: #ffffff;
  border-color: var(--dim);
}

footer {
  margin-top: 40px;
  text-align: center;
}

.dim {
  color: var(--dim);
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.6s ease forwards;
}

.reveal:nth-of-type(2) { animation-delay: 0.05s; }
.reveal:nth-of-type(3) { animation-delay: 0.1s; }
.reveal:nth-of-type(4) { animation-delay: 0.15s; }
.reveal:nth-of-type(5) { animation-delay: 0.2s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .cursor { animation: none; opacity: 1; }
}
