:root {
  color-scheme: dark;
  --bg: #000;
  --card: #080a09;
  --card-hover: rgba(16, 20, 18, 0.88);
  --border: #272a28;
  --border-soft: #141815;
  --text: #f7f7f4;
  --muted: #747b76;
  --accent: #35e06f;
  --accent-hover: #6ff49a;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.page {
  width: min(768px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0 44px;
}

.hero {
  margin-bottom: 64px;
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(4.25rem, 13vw, 6.75rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0;
}

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

.hero p {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.hero a,
.footer a {
  color: var(--accent);
  transition: color 160ms ease;
}

.hero a:hover,
.footer a:hover {
  color: var(--accent-hover);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.project-card {
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: var(--card);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: rgba(53, 224, 111, 0.55);
  background: var(--card-hover);
  transform: translateY(-2px);
}

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

.project-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}

.project-links {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: -6px;
  border-radius: 9px;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease;
}

.project-links a:hover {
  background: #141814;
  color: var(--accent);
}

.project-links svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.75;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 92px;
  border-top: 1px solid var(--border-soft);
  padding-top: 28px;
  color: #4e554f;
  font-size: 0.74rem;
}

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

.footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 32px, 768px);
    padding-top: 72px;
  }

  .hero {
    margin-bottom: 48px;
  }

  .hero h1 {
    font-size: clamp(3.9rem, 24vw, 5.25rem);
  }

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

  .project-card {
    padding: 18px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
