:root {
  --bg: #f4f6f9;
  --paper: #ffffff;
  --sidebar: #0f172a;
  --sidebar-text: #e2e8f0;
  --sidebar-muted: #94a3b8;
  --text: #1e293b;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --border: #e2e8f0;
  --tag-bg: #f1f5f9;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

a:hover {
  opacity: 0.8;
}

.page {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1100px;
  margin: 32px auto;
  min-height: calc(100vh - 64px);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.profile {
  text-align: center;
}

.avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

.name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.title {
  font-size: 13px;
  color: var(--accent-soft);
  font-weight: 500;
  margin-bottom: 4px;
}

.location {
  font-size: 13px;
  color: var(--sidebar-muted);
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sidebar-muted);
  margin-bottom: 12px;
}

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

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}

.contact-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.contact-link>.fa-brands,
.contact-link>.fa-solid:first-child {
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  color: var(--sidebar-muted);
  font-size: 14px;
}

.contact-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-arrow {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--sidebar-muted);
}

.skill-group {
  margin-bottom: 16px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--sidebar-muted);
  margin-bottom: 8px;
}

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

.tag {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.content .tag {
  background: var(--tag-bg);
  color: var(--text);
  border-color: var(--border);
}

.tag-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.edu-item {
  margin-bottom: 16px;
}

.edu-item:last-child {
  margin-bottom: 0;
}

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

.edu-place,
.edu-detail {
  font-size: 12px;
  color: var(--sidebar-muted);
  line-height: 1.5;
}

.edu-period {
  font-size: 11px;
  color: var(--sidebar-muted);
  margin-top: 2px;
  font-family: var(--mono);
}

.sidebar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.content {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-soft);
}

.lead {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
  margin-bottom: 12px;
  color: var(--text);
}

.section p {
  color: var(--text-muted);
  line-height: 1.7;
}

.timeline-item {
  position: relative;
}

.timeline-item+.timeline-item {
  margin-top: 28px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.meta-sep {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
}

.item-company {
  font-size: 14px;
  color: var(--text-muted);
}

.period {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
}

.item-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.item-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.bullet-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bullet-list li {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.bullet-list li::marker {
  color: var(--accent);
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.project-card:last-child {
  margin-bottom: 0;
}

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

.project-link {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.65;
}

.project-tags {
  margin-bottom: 0;
}

.content .tags {
  gap: 6px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  list-style: none;
  margin-top: 14px;
}

.feature-grid li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.feature-grid li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.highlight-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
}

.highlight-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  font-family: var(--mono);
}

.highlight-label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .page {
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }

  .sidebar {
    padding: 28px 24px;
  }

  .sidebar-actions {
    flex-direction: row;
  }

  .content {
    padding: 28px 24px 40px;
  }

  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .highlights-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-header {
    flex-direction: column;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    max-width: none;
    grid-template-columns: 260px 1fr;
  }

  .no-print {
    display: none !important;
  }

  .sidebar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .section {
    break-inside: avoid;
  }

  a {
    color: var(--text);
  }

  .contact-arrow {
    display: none;
  }

  .contact-link::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    color: var(--sidebar-muted);
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .contact-text {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}