:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #2563eb;
  --border: #e5e7eb;
  --code-bg: #f3f4f6;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #d0d0d0;
    --surface: #c0c0c0;
    --text: #111111;
    --muted: #444;
    --accent: #1d4ed8;
    --border: #aaa;
    --code-bg: #bbb;
  }
}

.quick-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.quick-links a {
  color: var(--accent);
  text-decoration: none;
}
.quick-links a:hover {
  text-decoration: underline;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

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

.header-text h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.header-text .title {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s;
}

.links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Sections */
section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

section:last-child {
  border-bottom: none;
}

section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 24px;
}

/* About */
#about p {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 600px;
}

#about p + p {
  margin-top: 12px;
}

#about blockquote {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 3px solid var(--border);
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
}

/* Skills */
.skill-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.skill-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  min-width: 80px;
  flex-shrink: 0;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.8rem;
  font-family: ui-monospace, "Fira Code", "Cascadia Code", monospace;
  background: var(--code-bg);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.tag.primary {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .tag.primary {
    background: #d0e0f0;
    border-color: #1d4ed8;
    color: #1d4ed8;
  }
}

/* Education */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.edu-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.edu-item .meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.edu-item ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edu-item ul li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.edu-item ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--border);
}

/* Research */
.research-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.research-item .venue {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.research-item p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Contact */
#contact p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-links a {
  font-size: 0.875rem;
}

footer {
  padding: 32px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Mobile */
@media (max-width: 540px) {
  header {
    padding: 48px 0 40px;
  }

  .header-inner {
    flex-direction: column;
    gap: 20px;
  }

  .header-text h1 {
    font-size: 1.6rem;
  }

  .skill-row {
    flex-direction: column;
    gap: 6px;
  }

  .skill-label {
    min-width: unset;
  }
}
