:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #1a1a1d;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border: #27272a;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 8px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

.avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 auto 1.5rem;
  color: white;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1rem;
}

section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about p {
  color: var(--text-secondary);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

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

.highlight-icon {
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.highlight-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.highlight-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 0.25rem;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-content .company {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.timeline-content .achievement {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.timeline-content .tech {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.edu-item {
  margin-bottom: 1.25rem;
}

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

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

.edu-item .institution {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.edu-item .thesis {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.link-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
}

.link-icon {
  width: 24px;
  height: 24px;
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

.link-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.cv-note {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.download-form {
  display: flex;
  gap: 0.75rem;
}

#access-code {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#access-code::placeholder {
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

#access-code:focus {
  border-color: var(--accent);
}

#download-btn {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

#download-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

#download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  max-width: 90%;
  text-align: center;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-error {
  background: rgba(239, 68, 68, 0.95);
  color: white;
}

.toast-success {
  background: rgba(34, 197, 94, 0.95);
  color: white;
}

footer {
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .container {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .timeline-date {
    padding-top: 0;
  }

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

  .download-form {
    flex-direction: column;
  }

  #download-btn {
    width: 100%;
  }
}

@media print {
  .cv-download,
  footer {
    display: none !important;
  }

  .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  section {
    page-break-inside: avoid;
  }
}
