:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --border: #0a0a0a;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 24px;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

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

/* header */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 20px;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo .muted {
  transition: color 0.2s ease;
}

.logo:hover .muted {
  color: var(--fg);
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 2px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* hero */

.hero {
  padding-block: 72px 56px;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero .badge { animation: hero-in 0.6s ease both; }
.hero h1 { animation: hero-in 0.6s ease 0.12s both; }
.hero .bio { animation: hero-in 0.6s ease 0.24s both; }
.hero .stack { animation: hero-in 0.6s ease 0.36s both; }

.project-hero .badge { animation: hero-in 0.5s ease both; }
.project-hero .back-link { animation: hero-in 0.5s ease 0.08s both; }
.project-hero .section-label { animation: hero-in 0.5s ease 0.16s both; }
.project-hero h1 { animation: hero-in 0.5s ease 0.24s both; }
.project-hero .tagline { animation: hero-in 0.5s ease 0.32s both; }
.project-hero .meta-line { animation: hero-in 0.5s ease 0.4s both; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.8rem;
  margin-bottom: 24px;
}

.status-tag {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  vertical-align: middle;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 20px;
}

.cursor {
  display: inline-block;
  width: 0.5em;
  margin-left: 4px;
  border-right: 3px solid var(--fg);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.bio {
  max-width: 58ch;
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 28px;
}

.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.stack li {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.85rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.stack li:hover {
  background: var(--fg);
  color: var(--bg);
  transform: translateY(-2px);
}

/* sections */

.section {
  padding-block: 48px;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.section h2 {
  font-size: 1.6rem;
  margin: 0 0 24px;
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.visible {
  animation: reveal-in 0.5s ease forwards;
}

/* project cards */

.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  background-color: #f7f7f7;
}

.cards .card:nth-child(1) { animation-delay: 0ms; }
.cards .card:nth-child(2) { animation-delay: 90ms; }
.cards .card:nth-child(3) { animation-delay: 180ms; }
.cards .card:nth-child(4) { animation-delay: 270ms; }

.contact-list li:nth-child(1) { animation-delay: 0ms; }
.contact-list li:nth-child(2) { animation-delay: 80ms; }
.contact-list li:nth-child(3) { animation-delay: 160ms; }
.contact-list li:nth-child(4) { animation-delay: 240ms; }

.card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--fg);
}

.card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.card-link:hover svg {
  transform: translate(2px, -2px);
}

/* contact */

.contact-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 0;
  margin: 0;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.98rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.contact-list a:hover {
  border-color: var(--fg);
}

.contact-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

/* project detail pages */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 28px;
}

.back-link:hover {
  text-decoration: underline;
}

.project-hero {
  padding-block: 32px 40px;
}

.project-hero .section-label {
  margin-top: 24px;
}

.project-hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}

.tagline {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.meta-line {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.project-body p {
  max-width: 65ch;
  font-size: 1.02rem;
}

.feature-list {
  padding-left: 20px;
  max-width: 65ch;
}

.feature-list li {
  margin-bottom: 12px;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}

.store-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.store-btn svg {
  width: 18px;
  height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot,
  .cursor,
  .hero .badge, .hero h1, .hero .bio, .hero .stack,
  .project-hero .badge, .project-hero .back-link, .project-hero .section-label,
  .project-hero h1, .project-hero .tagline, .project-hero .meta-line {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .card:hover { transform: none; }
}

@media (max-width: 600px) {
  .site-footer { flex-direction: column; gap: 8px; align-items: flex-start; }
}
