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

:root {
  --bg: #ffffff;
  --bg-hover: #f5f4f4;
  --text: #0a0a0a;
  --text-secondary: #6b6b6b;
  --border: #e8e8e8;
  --link: #0a0a0a;
  --link-underline: #c0c0c0;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-hover: #161616;
  --text: #f5f4f4;
  --text-secondary: #888888;
  --border: #222222;
  --link: #f5f4f4;
  --link-underline: #444444;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

/* Header */

header {
  padding-bottom: 4px;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.name {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

.role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Theme toggle */

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  margin: -6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: none; }

/* Section titles */

.section-title {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Bio */

.bio {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

.link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

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

/* Item list */

.item-list {
  display: flex;
  flex-direction: column;
  margin: -6px -10px;
}

.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.12s ease;
  cursor: pointer;
}

.item:hover {
  background-color: var(--bg-hover);
}

.item:hover .item-arrow {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Project items */

.item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.item-title {
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: normal;
}

/* Writing items: title + date on same row */

.item > .item-title {
  flex: 1;
  white-space: normal;
}

.item-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Arrow icon */

.item-arrow {
  flex-shrink: 0;
  color: var(--text-secondary);
  opacity: 0.5;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

/* Responsive */

@media (max-width: 480px) {
  main {
    padding: 52px 20px 80px;
    gap: 40px;
  }
}
