:root {
  --bg: #0a0a0c;
  --bg-card: rgba(22, 22, 26, 0.75);
  --bg-card-hover: rgba(30, 30, 36, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text-primary: #f4f4f6;
  --text-secondary: #9da0aa;
  --text-muted: #5e626e;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-text: #d1d5db;
  --radius: 14px;
  --radius-sm: 8px;
  --font-main: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;
  --glow-color: rgba(59, 130, 246, 0.07);
}

[data-theme="light"] {
  --bg: #f9fafb;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.18);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.1);
  --badge-bg: rgba(0, 0, 0, 0.04);
  --badge-text: #374151;
  --glow-color: rgba(37, 99, 235, 0.05);
}

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

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  transition: background-color 0.25s ease, color 0.25s ease;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.glow-bg {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 580px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  margin-bottom: 36px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.avatar-box {
  position: relative;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-pulse {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: #10b981;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.profile-meta {
  margin-bottom: 14px;
}

.name {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.headline {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 8px;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.icon-pin {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
}

.bio {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-top: 12px;
}

/* Sections */
.section {
  margin-bottom: 32px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.title-line {
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

/* Links Grid */
.links-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.github-icon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.linkedin-icon {
  background: rgba(10, 102, 194, 0.1);
  color: #0a66c2;
}

[data-theme="light"] .linkedin-icon {
  background: rgba(10, 102, 194, 0.08);
}

.card-icon-wrapper svg {
  width: 22px;
  height: 22px;
}

.card-content {
  flex: 1;
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

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

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

.external-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.link-card:hover .external-arrow {
  color: var(--text-primary);
  transform: translate(2px, -2px);
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Projects */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-item {
  padding: 14px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.project-item:hover {
  border-color: var(--border-hover);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.project-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--border);
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer */
.footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.node-indicator {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
}

@media (max-width: 480px) {
  body {
    padding: 30px 16px;
  }
  .name {
    font-size: 24px;
  }
  .card-desc {
    white-space: normal;
  }
}

/* Legal Pages Styling */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--text-primary);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.legal-content h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.legal-content p {
  margin-bottom: 10px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  background-color: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  color: var(--text-primary);
}

.contact-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Project Links */
.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-link:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.project-name-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-arrow {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.project-link:hover .project-arrow {
  color: var(--text-primary);
  transform: translate(2px, -2px);
}
