@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  --accent-primary: #58a6ff;
  --accent-success: #3fb950;
  --accent-warning: #d29922;
  --accent-error: #f85149;
  --accent-purple: #a371f7;
  --accent-pink: #db61a2;
  --accent-cyan: #39c5cf;
  --accent-orange: #f0883e;

  --border-color: #30363d;
  --border-highlight: #484f58;

  --glow-primary: rgba(88, 166, 255, 0.4);
  --glow-success: rgba(63, 185, 80, 0.4);

  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--glow-primary);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  display: block;
  padding-left: 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

.prompt {
  color: var(--accent-success);
  font-weight: 600;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background-color: var(--accent-success);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-prompt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md);
}

.card p {
  margin-bottom: 12px;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Page Header */
.page-header {
  margin-bottom: 48px;
}

.header-top {
  text-align: center;
  padding: 32px 20px 24px;
}

.header-top .profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.header-top .profile-name a {
  color: inherit;
}

.header-top .profile-title {
  margin: 0;
  font-size: 1.125rem;
}

.header-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.header-profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-profile .profile-picture {
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  object-fit: cover;
}

.header-profile .profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.header-profile .profile-name a {
  color: inherit;
}

.header-profile .profile-title {
  margin: 0;
}

.header-profile .profile-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-profile .info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.header-profile .info-item i {
  width: 16px;
  color: var(--accent-primary);
}

.header-profile .social-links {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.header-profile .social-link {
  font-size: 1.5rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.header-profile .social-link:hover {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.header-profile .blog-link {
  margin-top: 8px;
}

.header-profile .blog-link .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.header-profile .blog-link .btn:hover {
  border-color: var(--accent-primary);
  background: rgba(88, 166, 255, 0.1);
}

.header-profile .blog-link .btn i:first-child {
  font-size: 0.75rem;
}

.header-profile .blog-link .arrow-right {
  transition: transform var(--transition-fast);
}

.header-profile .blog-link .btn:hover .arrow-right {
  transform: translateX(4px);
}

.header-about {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-about-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
}

.header-about p {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 1.125rem;
  line-height: 1.7;
}

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

.header-about .blog-link {
  margin-top: 16px;
}

.header-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border-color) 0%, transparent 50%);
  margin-top: 24px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  margin-right: 6px;
  margin-bottom: 6px;
}

.tag-primary {
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent-primary);
  border-color: rgba(88, 166, 255, 0.3);
}

.tag-success {
  background: rgba(63, 185, 80, 0.15);
  color: var(--accent-success);
  border-color: rgba(63, 185, 80, 0.3);
}

.tag-warning {
  background: rgba(210, 153, 34, 0.15);
  color: var(--accent-warning);
  border-color: rgba(210, 153, 34, 0.3);
}

.tag-purple {
  background: rgba(163, 113, 247, 0.15);
  color: var(--accent-purple);
  border-color: rgba(163, 113, 247, 0.3);
}

.tag-pink {
  background: rgba(219, 97, 162, 0.15);
  color: var(--accent-pink);
  border-color: rgba(219, 97, 162, 0.3);
}

.tag-cyan {
  background: rgba(57, 197, 207, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(57, 197, 207, 0.3);
}

.tech-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Skill tags */
.skill-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Timeline items */
.timeline-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent-success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--glow-success);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 22px;
  width: 2px;
  height: calc(100% + 16px);
  background: var(--border-color);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Code blocks */
.code-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow-x: auto;
  margin: 12px 0;
}

.code-keyword {
  color: var(--accent-pink);
}

.code-string {
  color: var(--accent-warning);
}

.code-comment {
  color: var(--text-muted);
  font-style: italic;
}

.code-function {
  color: var(--accent-cyan);
}

.code-variable {
  color: var(--accent-purple);
}

.code-number {
  color: var(--accent-orange);
}

/* Section headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--accent-primary);
  font-size: 1.25rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Social links */
.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: var(--bg-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-highlight);
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive typography */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}