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

:root {
  --bg: #ffffff;
  --surface: #f2f2f7;
  --border: #c6c6c8;
  --text: #1c1c1e;
  --muted: #6c6c70;
  --dim: #aeaeb2;

  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;

  --sp-1: 8px;
  --sp-2: 4px;
  --sp-3: 2px;
  --sp-4: 12px;
  --sp-5: 40px;
  --sp-7: 16px;
  --sp-8: 48px;
  --sp-9: 32px;

  --r1: 4px;
  --r2: 6px;
}

[data-theme="dark"] {
  --bg: #1c1c1e;
  --surface: #2c2c2e;
  --border: #3a3a3c;
  --text: #f5f5f7;
  --muted: #636366;
  --dim: #48484a;
}

html,
body {
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  padding: 0 var(--sp-7);
  transition: background 0.2s, color 0.2s;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 0 100px;
}

/* NAV */
nav {
  display: flex;
  gap: var(--sp-9);
  margin-bottom: 56px;
}

nav a {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.1s;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

/* HEADER ROW */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

h1 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text);
}

/* THEME SWITCHER */
.theme-sw {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: var(--sp-3);
  transition: background 0.2s, border-color 0.2s;
}

.th-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r1);
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.th-btn:hover {
  color: var(--text);
}

.th-btn.active {
  background: var(--border);
  color: var(--text);
}

.th-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* SUBTITLE */
.subtitle {
  font-size: 15px;
  line-height: 22px;
  color: var(--muted);
  margin-bottom: 28px;
}

.subtitle a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--dim);
  transition: color 0.1s;
}

.subtitle a:hover {
  color: var(--text);
}

/* BIO */
.bio {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 20px;
}

.bio em {
  font-family: var(--sans);
  font-style: italic;
}

.bio a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--dim);
}

/* PROJECTS */
.proj-label {
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  margin-top: 52px;
  margin-bottom: 14px;
}

.proj-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.proj-list li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-1);
  font-size: 15px;
  line-height: 24px;
  flex-wrap: wrap;
}

.proj-list a {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}

.proj-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.1s;
}

.proj-list a:hover .proj-name {
  color: var(--muted);
}

.proj-arrow {
  font-size: 11px;
  color: var(--dim);
}

.proj-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
}

/* WAVE */
.wave {
  margin-top: 52px;
  color: var(--dim);
  font-size: 20px;
  user-select: none;
}

/* FOOTER */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}

.foot-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--sp-1) var(--sp-7);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.foot-left {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.foot-icon {
  color: var(--dim);
  display: flex;
  align-items: center;
}

.foot-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.1s;
}

.foot-link:hover {
  color: var(--text);
}

.foot-year {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 600px) {
  .wrap {
    padding: 64px 0 80px;
  }
}