:root {
  --bg: #f3f4f6;
  --grid-line: #e5e7eb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --ink: #111827;
  --ink-muted: #4b5563;
  --ink-subtle: #6b7280;
  --border: #1f2937;
  --border-soft: #d1d5db;
  --shadow: 3px 3px 0 #1f2937;
  --shadow-sm: 2px 2px 0 #1f2937;
  --accent: #1e293b;
  --accent-soft: #eef2ff;
  --accent-ink: #1e3a8a;
  --green: #15803d;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  line-height: 1.55;
  padding: 44px 16px 56px;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Window Card (Hero) */
.window-card,
.stack-card,
.project-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: #f8fafc;
  padding: 9px 16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom: 1.5px solid var(--border);
}

.window-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.window-body {
  padding: 24px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}

.profile-meta {
  flex: 1;
  min-width: 0;
}

.name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.subtitle {
  margin-top: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.intro {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* Numbered Navigation Rows */
.quick-nav {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.nav-row:hover {
  background: #eef2f6;
  border-color: var(--border);
  transform: translateX(2px);
}

.nav-num {
  color: var(--ink-subtle);
  font-weight: 600;
}

.nav-label {
  flex: 1;
  font-weight: 500;
}

.nav-arrow {
  color: var(--ink-muted);
}

/* Stack Cards (Skills & Contact) */
.stack-card {
  padding: 20px 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.section-index {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.section-note {
  font-size: 0.78rem;
  color: var(--ink-subtle);
}

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

.skill-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: start;
  gap: 10px;
}

.skill-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-subtle);
  padding-top: 4px;
}

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

.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.73rem;
  font-weight: 500;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border-soft);
  padding: 3px 9px;
  border-radius: 6px;
}

.tag-primary {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: #c7d2fe;
}

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

.section-divider {
  padding: 2px 4px;
}

.section-divider span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.project-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.project-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--border);
}

.project-main {
  flex: 1;
  min-width: 0;
}

.project-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.project-header h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.project-desc {
  font-size: 0.87rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.icon-box {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.icon-box:hover {
  background: #e2e8f0;
  transform: translate(-1px, -1px);
}

/* Contact */
.contact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 10px 14px;
}

.email-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-text:hover {
  text-decoration: underline;
}

.copy-btn {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.copy-btn:hover {
  opacity: 0.9;
}

/* Bottom Square Icon Dock */
.icon-dock {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.dock-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.dock-btn:hover {
  background: var(--surface-alt);
  transform: translate(-1px, -1px);
}

.footer {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin-top: 2px;
}

/* Responsive */
@media (max-width: 520px) {
  body {
    padding: 24px 12px 44px;
  }

  .window-body,
  .stack-card,
  .project-card {
    padding: 16px;
  }

  .skill-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .icon-box {
    align-self: flex-end;
  }
}
