/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --border: #1e1e2e;
  --text: #cdd6f4;
  --text-muted: #6c7086;
  --accent: #a78bfa;
  --accent-glow: rgba(167, 139, 250, 0.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Noto Serif SC', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === Background Grid === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(167,139,250,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* === Container === */
.container {
  max-width: 640px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* === Avatar === */
.avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 0 40px var(--accent-glow);
  transition: box-shadow 0.3s ease;
}

.avatar:hover {
  box-shadow: 0 0 60px rgba(167,139,250,0.25);
}

.avatar svg {
  width: 100%;
  height: 100%;
}

/* === Intro === */
.intro {
  text-align: center;
  margin-bottom: 1.75rem;
}

.name {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #f5f5f7;
  margin-bottom: 0.35rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === Social Links === */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

/* === Divider === */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 1.5rem 0;
}

/* === Section Title === */
.section-title {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* === Projects === */
.projects {
  margin-bottom: 3rem;
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface), var(--accent-glow));
}

.project-meta {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.project-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #f5f5f7;
  margin-bottom: 0.25rem;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === About === */
.about {
  margin-bottom: 2rem;
}

.about-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  line-height: 1.7;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content strong {
  color: var(--text);
  font-weight: 500;
}

/* === Writing === */
.writing {
  margin-bottom: 2rem;
}

.writing-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.writing-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.writing-item:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface), var(--accent-glow));
  transform: translateY(-2px);
}

.writing-meta {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.writing-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #f5f5f7;
  margin-bottom: 0.25rem;
}

.writing-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Footer === */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === Responsive === */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem;
  }
  .name {
    font-size: 1.75rem;
  }
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
