/* === CSS Variables === */
:root {
  --bg: #0a0e17;
  --bg-card: #111827;
  --border: #1e2a3a;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #334155;
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-purple: #8b5cf6;
  --accent-purple-light: #a78bfa;
  --max-width: 800px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

a:hover {
  color: var(--accent-blue);
}

/* === Navigation === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
}

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

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-blue-light);
}

/* === Layout === */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.card-meta {
  font-size: 10px;
  color: var(--text-muted);
}

.card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* === Tags === */
.tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
}

.tag-blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue-light);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tag-purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple-light);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* === Skill Rows === */
.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.skill-label {
  min-width: 70px;
  text-align: right;
  font-size: 10px;
  color: var(--text-muted);
  padding-top: 4px;
  flex-shrink: 0;
}

/* === Hero Tags (pill style) === */
.hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-tag {
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12px;
}

.hero-tag-blue {
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--accent-blue-light);
}

.hero-tag-purple {
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: var(--accent-purple-light);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--accent-blue-light);
}

.btn-primary:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
}

/* === Contact Item === */
.contact-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.contact-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.contact-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-value {
  font-size: 12px;
  color: var(--text-primary);
}

/* === Info Block (about page) === */
.info-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.info-block h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.info-block .sub {
  font-size: 10px;
  color: var(--text-secondary);
}

.info-block .date {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

.info-block .body {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

/* === Divider === */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 16px 20px;
  color: var(--text-dim);
  font-size: 10px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* === Stat Row === */
.stat-row {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-blue-light);
}

.stat-label {
  font-size: 9px;
  color: var(--text-muted);
}

/* === Project Section (within project detail) === */
.project-block {
  margin-bottom: 16px;
}

.project-block h5 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.project-block p,
.project-block ul {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.project-block ul {
  list-style: none;
  padding: 0;
}

.project-block ul li::before {
  content: "·";
  color: var(--accent-blue-light);
  margin-right: 8px;
}

/* === Hero Background === */
.code-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48%;
  overflow: hidden;
  opacity: 0.18;
  pointer-events: none;
}

.code-left {
  left: 0;
}

.code-right {
  right: 0;
}

.code-scroll {
  font-family: "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: 24px;
  line-height: 1.8;
  white-space: pre;
  user-select: none;
  padding: 0 12px;
}

.code-scroll-up {
  color: var(--accent-blue-light);
  animation: scrollUp 28s linear infinite;
}

.code-scroll-down {
  color: var(--accent-purple-light);
  text-align: right;
  animation: scrollDown 28s linear infinite;
}

.code-mask-h {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 14, 23, 0.92) 3%,
    transparent 22%,
    transparent 35%,
    rgba(10, 14, 23, 0.55) 48%,
    rgba(10, 14, 23, 0.55) 52%,
    transparent 65%,
    transparent 78%,
    rgba(10, 14, 23, 0.92) 97%
  );
  pointer-events: none;
}

.code-mask-v {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 23, 0.92) 0%,
    rgba(10, 14, 23, 0.1) 25%,
    rgba(10, 14, 23, 0.1) 75%,
    rgba(10, 14, 23, 0.92) 100%
  );
  pointer-events: none;
}

.hero-foreground {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-accent {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
  margin-bottom: 20px;
}

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

.hero-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.hero-location {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 11px;
  }

  .section {
    padding: 32px 0;
  }

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

  .skill-label {
    text-align: left;
  }

  .stat-row {
    gap: 14px;
  }

  .code-scroll {
    font-size: 16px;
  }

  .hero-name {
    font-size: 22px;
    letter-spacing: 2px;
  }
}
