:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-overlay: #21262d;
  --border: #30363d;
  --border-muted: #21262d;
  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-subtle: #484f58;
  --accent: #58a6ff;
  --accent-muted: #1f6feb;
  --green: #3fb950;
  --green-bg: #1a2e1a;
  --yellow: #d29922;
  --yellow-bg: #2d2000;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

/* ─── Layout ────────────────────────────── */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header / Nav ──────────────────────── */

header {
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.logo::before {
  content: "~/";
  color: var(--text-muted);
  font-weight: 400;
}

.nav-breadcrumb {
  display: flex;
  align-items: center;
}

.nav-sep {
  color: var(--text-subtle);
  margin: 0 5px;
  font-weight: 400;
  font-size: 15px;
}

.nav-crumb {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.nav-crumb:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-current {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

nav ul li a {
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

nav ul li a:hover {
  color: var(--text);
  background: var(--bg-overlay);
  text-decoration: none;
}

/* ─── Hero ──────────────────────────────── */

.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-bg);
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.hero-tag::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--text-muted);
}

.hero p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent-muted);
  border: 1px solid var(--accent);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--accent);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background: var(--bg-overlay);
  color: var(--text);
  text-decoration: none;
}

/* ─── Sections ──────────────────────────── */

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

section:last-child {
  border-bottom: none;
}

.section-label {
  font-size: 11px;
  color: var(--text-subtle);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.section-label::before {
  content: "# ";
  color: var(--accent);
}

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

/* ─── About ─────────────────────────────── */

.about-body {
  max-width: 600px;
}

.about-body p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

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

.stack {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ─── About page cards ──────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}

.about-card-label {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: lowercase;
  margin-bottom: 10px;
}

.about-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.about-list {
  list-style: none;
  padding: 0;
}

.about-list li {
  color: var(--text-muted);
  font-size: 13px;
  padding: 3px 0;
}

.about-list li::before {
  content: "- ";
  color: var(--text-subtle);
}

/* ─── Projects ──────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.15s;
}

.project-card:hover {
  border-color: var(--accent-muted);
}

.project-card--span {
  grid-column: 1 / -1;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

.project-name a {
  color: var(--accent);
}

.badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-mobile {
  color: var(--yellow);
  border-color: var(--yellow);
  background: var(--yellow-bg);
}

.badge-wip {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--bg-overlay);
}

.project-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.lang-dot::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.lang-dot.swift::before { background: #f05138; }
.lang-dot.kotlin::before { background: #7f52ff; }
.lang-dot.ts::before { background: #3178c6; }
.lang-dot.dart::before { background: #00b4ab; }
.lang-dot.js::before { background: #f1e05a; }

/* ─── CV page ───────────────────────────── */

.cv-section {
  margin-bottom: 48px;
}

.cv-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 24px;
  margin-bottom: 24px;
}

.cv-date {
  color: var(--text-subtle);
  font-size: 12px;
  padding-top: 2px;
}

.cv-content h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.cv-content .org {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}

.cv-content p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ─── Footer ────────────────────────────── */

footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-subtle);
  font-size: 12px;
}

/* ─── Notable hero ──────────────────────── */

.notable-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 56px;
}

.notable-hero-content {
  flex: 1;
}

.notable-hero-content h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.notable-hero-content p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.notable-hero-icon {
  flex-shrink: 0;
}

.notable-hero-icon img {
  width: 130px;
  height: 130px;
  border-radius: 28px;
  border: 1px solid var(--border);
  display: block;
}

.breadcrumb {
  font-size: 12px;
  color: var(--text-subtle);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: none;
}

.breadcrumb span {
  margin: 0 6px;
}

/* ─── App showcase ───────────────────────── */

.showcase-row {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-bottom: 64px;
}

.showcase-row:last-child {
  margin-bottom: 0;
}

.showcase-row:nth-child(even) {
  flex-direction: row-reverse;
}

.showcase-text h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.showcase-text p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.showcase-text {
  flex: 1;
}

.showcase-img {
  flex: 0 0 200px;
}

.phone-frame {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 6px solid var(--bg-overlay);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: block;
}

/* ─── Notable CTA ────────────────────────── */

.notable-cta {
  text-align: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.notable-cta h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.notable-cta p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ─── Play Store button ──────────────────── */

.btn-play {
  background: linear-gradient(to bottom, #fecb3e, #f4a226);
  border: 1px solid #f4a226;
  color: #1a1200;
  font-weight: 700;
}

.btn-play:hover {
  background: linear-gradient(to bottom, #ffd84d, #f8b234);
  text-decoration: none;
  color: #1a1200;
}

nav ul li a.btn-play {
  background: linear-gradient(to bottom, #fecb3e, #f4a226);
  color: #1a1200;
  font-weight: 700;
  border: 1px solid #f4a226;
}

nav ul li a.btn-play:hover {
  background: linear-gradient(to bottom, #ffd84d, #f8b234);
  color: #1a1200;
}

/* ─── Responsive ────────────────────────── */

@media (max-width: 600px) {
  nav ul li a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .notable-hero {
    flex-direction: column-reverse;
    gap: 28px;
    padding: 48px 0 40px;
  }

  .showcase-row,
  .showcase-row:nth-child(even) {
    flex-direction: column;
    gap: 24px;
  }

  .showcase-img {
    flex: 0 0 auto;
    max-width: 180px;
    margin: 0 auto;
  }
}
