:root {
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-card: #1c2128;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --code-bg: #0f1419;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --maxw: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at top, #1a2330 0%, var(--bg) 60%);
}

.hero-inner {
  max-width: 760px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0d1117;
  border-color: var(--accent-hover);
}

/* Sections */
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}

/* Projects */
.projects {
  padding: 72px 0;
}

.project-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.project-card:last-of-type {
  border-bottom: 1px solid var(--border);
}

.project-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  background: var(--code-bg);
}

.project-gif img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.project-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-desc {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1rem;
}

.tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tech li {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text);
}

/* Focus */
.focus {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.focus-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.focus-block h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: var(--accent);
}

.focus-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.focus-block li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* About */
.about {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.about p {
  max-width: 720px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-elevated);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer a:hover {
  text-decoration: underline;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0d1117;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

/* Project metric */
.project-metric {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 18px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 860px) {
  .project-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 56px 0 48px;
  }

  .projects, .focus, .about {
    padding: 48px 0;
  }

  .project-card {
    padding: 28px 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}