/* Bring Next – static site base */
:root {
  --bg: #fff;
  --text: #111;
  --text-muted: rgba(0, 0, 0, 0.7);
  --border: rgba(0, 0, 0, 0.1);
  --accent: #111;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --text: #eee;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #fff;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.section {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .section {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1280px) {
  .section {
    padding: 0;
  }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}
.header a {
  color: inherit;
  text-decoration: none;
}
.header a:hover {
  opacity: 0.85;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-wrap img {
  width: 40px;
  height: 40px;
}
.header-title {
  font-size: 1.5rem;
  font-weight: 600;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav a {
  font-weight: 500;
  color: var(--text-muted);
}
.nav a:hover {
  color: var(--text);
}
@media (max-width: 640px) {
  .nav .desktop {
    display: none;
  }
}

/* Main */
main {
  min-height: 60vh;
  padding-bottom: 3rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
}
.footer-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-meta a {
  color: inherit;
}

/* Home */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin: 0;
}
.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 1.5rem auto 0;
}
.hero-btns {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn:hover {
  opacity: 0.9;
}

.stats {
  padding: 2rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}
.stats-grid .num {
  font-size: 2rem;
  font-weight: 700;
}
.stats-grid .label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.features {
  padding: 2rem 0 4rem;
}
.features h2 {
  text-align: center;
  font-size: 1.875rem;
  margin-bottom: 1rem;
}
.features .sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.features-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  padding: 1rem 0;
}
.feature h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.feature p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.projects-preview {
  padding: 2rem 0 4rem;
}
.projects-preview h2 {
  text-align: center;
  font-size: 1.875rem;
  margin-bottom: 1rem;
}
.projects-preview .sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.card-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bg);
}
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-body {
  padding: 1.25rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.card h3 a {
  color: inherit;
  text-decoration: none;
}
.card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.card .link {
  font-weight: 600;
  color: var(--text);
}
.cta-box {
  text-align: center;
  padding: 2rem 1rem;
}
.cta-box h2 {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}
.cta-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Inner pages */
.page-header {
  padding: 2rem 0 1rem;
}
.page-header h1 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
}
.page-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0;
}
.prose {
  max-width: 65ch;
}
.prose h2 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.prose p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
.prose a {
  color: var(--text);
  text-decoration: underline;
}

/* Projects list */
.project-item {
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.project-item .flex {
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .project-item .flex {
    flex-direction: row;
  }
}
.project-item .img-wrap {
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .project-item .img-wrap {
    width: 33.333%;
  }
}
.project-item img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}
.project-item .content {
  padding: 1.5rem;
  flex: 1;
}
.project-item h2 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}
.project-item h2 a {
  color: inherit;
  text-decoration: none;
}
.project-item .links {
  margin-top: 1rem;
}
.project-item .links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-right: 1rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.contact-info h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.contact-info h3 {
  font-size: 1rem;
  margin: 1rem 0 0.25rem;
}
.contact-info p {
  margin: 0;
  color: var(--text-muted);
}
.form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.form input,
.form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  margin-bottom: 1rem;
}
.form textarea {
  min-height: 120px;
  resize: vertical;
}
.form button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
}
.form button:hover {
  opacity: 0.9;
}
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.alert-success {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
}
@media (prefers-color-scheme: dark) {
  .alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
  }
}
