:root {
  --bg: #ffffff;
  --text: #111111;
  --text-muted: #555555;
  --border: #e5e5e5;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --accent: #0f9d78;
  --accent-bg: #e3f7ee;
}

[data-theme="dark"] {
  --bg: #111111;
  --text: #f2f2f2;
  --text-muted: #a0a0a0;
  --border: #2a2a2a;
  --card-bg: #1a1a1a;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --accent: #4ade9b;
  --accent-bg: rgba(74, 222, 155, 0.14);
}

* {
  box-sizing: border-box;
}

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

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 84px 24px 40px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
}

.logo svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.logo-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

h1 {
  font-size: 28px;
  margin: 0 0 16px;
}

.intro-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.name-tag {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 480px;
  margin: 0 0 20px;
}

.brand-icon {
  fill: currentColor;
}

.projects {
  margin-top: 56px;
}

.projects h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.project-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.project-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.project-title {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.project-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  border-radius: 999px;
  padding: 3px 10px;
}

.project-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.visit-link {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

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

.project-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}


.project-stack summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  width: fit-content;
}

.project-stack summary::-webkit-details-marker {
  display: none;
}

.project-stack summary::before {
  content: "▸";
  font-size: 10px;
  transition: transform 0.15s ease;
}

.project-stack[open] summary::before {
  transform: rotate(90deg);
}

.stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tech-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.tech-icon img {
  width: 15px;
  height: 15px;
}

footer {
  margin-top: 56px;
  color: var(--text-muted);
  font-size: 13px;
}

.navbar-right {
  display: flex;
  gap: 8px;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

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

@media (max-width: 480px) {
  .container {
    padding: 88px 16px 32px;
  }

  h1 {
    font-size: 24px;
  }

  .intro-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .project {
    padding: 14px;
  }

  .project-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
