/* ---------- Theme variables ---------- */
:root[data-theme="dark"] {
  --bg: #000000;
  --text: #EDEDED;
  --text-sub: #8A8A8A;
  --nav-bg: #1C1C1C;
  --nav-pill-active: rgba(255, 255, 255, 0.08);
  --border: #2A2A2A;
  --card-tag-bg: rgba(0, 0, 0, 0.45);
  --card-tag-text: #ffffff;
  --accent: #7FA37A;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --text: #111111;
  --text-sub: #6B6B6B;
  --nav-bg: #F0F0F0;
  --nav-pill-active: rgba(0, 0, 0, 0.06);
  --border: #E2E2E2;
  --card-tag-bg: rgba(255, 255, 255, 0.75);
  --card-tag-text: #111111;
  --accent: #4C7A47;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease;
  padding: 24px 32px 60px;
}

h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  margin: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.nav-pill {
  display: flex;
  gap: 4px;
  background: var(--nav-bg);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  padding: 5px;
}

.nav-item {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.nav-item.active {
  color: var(--text);
  background: var(--nav-pill-active);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font-size: 12px;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

/* ---------- Intro ---------- */
.intro {
  max-width: 520px;
  margin-bottom: 36px;
}

.intro h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.intro p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 0;
}

/* ---------- Block grid ---------- */
.block-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .block-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .block-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.block-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--nav-bg);
  text-decoration: none;
  display: block;
  border: 0.5px solid var(--border);
}

.block-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.block-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  color: var(--card-tag-text);
  background: var(--card-tag-bg);
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}

/* ---------- About page ---------- */
.about-page {
  max-width: 560px;
}

.about-section {
  margin-bottom: 32px;
}

.about-section h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.about-copy {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0;
}

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

.skill-list li {
  font-size: 13px;
  color: var(--text);
  background: var(--nav-bg);
  border: 0.5px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 32px;
  font-size: 11px;
  color: var(--text-sub);
}

/* ---------- Coming soon page ---------- */
.coming-soon-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 32px;
}

.coming-soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.coming-soon .sprout {
  margin-bottom: 28px;
}

.sprout-stem {
  stroke: var(--accent);
  fill: none;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: grow-stem 900ms ease-out 200ms forwards;
}

.sprout-leaf {
  stroke: var(--accent);
  fill: none;
  opacity: 0;
  transform-origin: 28px 26px;
  animation: unfurl-leaf 700ms ease-out 700ms forwards;
}

.sprout-leaf-2 {
  animation-delay: 900ms;
}

@keyframes grow-stem {
  to { stroke-dashoffset: 0; }
}

@keyframes unfurl-leaf {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.coming-soon h1 {
  font-size: 30px;
  max-width: 440px;
  line-height: 1.4;
  margin-bottom: 12px;
  opacity: 0;
  animation: fade-up 600ms ease-out 1200ms forwards;
}

.coming-soon p {
  font-size: 14px;
  color: var(--text-sub);
  opacity: 0;
  animation: fade-up 600ms ease-out 1400ms forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.coming-soon-footer {
  text-align: center;
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sprout-stem, .sprout-leaf, .coming-soon h1, .coming-soon p {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ---------- Accessibility ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

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