:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe3ec;
  --accent: #29bf12;
  --accent-dark: #1f9410;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 24px;
  text-align: center;
}

.brand {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 112px 24px 96px;
  text-align: center;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.section-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(3rem, 7vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.intro {
  max-width: 620px;
  margin-right: auto;
  margin-bottom: 34px;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.45;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 18px;
  font-size: 0.94rem;
  font-weight: 700;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #ffffff;
}

.button.secondary {
  background: #ffffff;
  color: var(--text);
}

.projects {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 76px 24px 86px;
}

.projects > * {
  max-width: var(--max-width);
  margin-right: auto;
  margin-left: auto;
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

h2 {
  max-width: 720px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  justify-content: center;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  min-height: 164px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: #b6c7dc;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  color: var(--text);
  transform: translateY(-2px);
}

.project-card:focus-within {
  outline: 3px solid rgba(41, 191, 18, 0.22);
  outline-offset: 3px;
}

.card-hit-area {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.card-hit-area:focus {
  outline: none;
}

.project-card-content {
  position: relative;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.project-title {
  display: block;
  margin-bottom: 10px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.project-description {
  display: block;
  color: var(--muted);
  font-size: 0.96rem;
}

.project-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  z-index: 2;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  background: #f0fdf0;
  border-color: var(--accent);
  color: var(--accent);
}

.project-link:focus-visible {
  outline: 2px solid rgba(41, 191, 18, 0.28);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 34px;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: center;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 780px) {
  .nav,
  .site-footer {
    align-items: center;
    flex-direction: column;
  }

  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .hero {
    padding-top: 76px;
    padding-bottom: 70px;
  }

  h1 {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
  }

  .project-list {
    grid-template-columns: 1fr;
  }
}
