:root {
  --primary: #1652f0;
  --accent: #eab308;
  --bg: #f8fafc;
  --white: #fff;
  --gray: #666;
  --text-dark: #24292f;
  --round: 16px;
}

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

body {
  background: var(--bg);
  color: var(--text-dark);
  font-family: 'Inter', 'Poppins', Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 6vw 1rem 6vw;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0,0,0,0.03);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--primary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
  padding-bottom: 2px;
}

nav a.active, nav a:hover {
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
}

.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 3rem 8vw;
}

.card {
  background: var(--white);
  border-radius: var(--round);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card:hover, .card:focus-within {
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
  transform: translateY(-4px) scale(1.02);
  z-index: 2;
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: var(--round);
  border-top-right-radius: var(--round);
  transition: transform .2s;
}

.card:hover .card-img, .card:focus-within .card-img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.card-desc {
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

footer {
  background: var(--white);
  box-shadow: 0 -1px 6px rgba(0,0,0,0.03);
  padding: 1.5rem 6vw;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.socials a {
  margin-left: 1.2rem;
  font-size: 1.2rem;
  color: var(--gray);
  transition: color .2s;
  text-decoration: none;
}

.socials a:hover {
  color: var(--primary);
}

/* Responsive Design */
@media (max-width: 600px) {
  .site-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
  }
  .card-grid {
    padding: 2rem 1rem;
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    gap: .6rem;
  }
}

:root[data-theme='dark'] {
  --primary: #60aaff;
  --accent: #facc15;
  --bg: #121212;
  --white: #1e1e1e;
  --gray: #d1d5db;
  --text-dark: #f3f4f6;
}

:root[data-theme='dark'] body {
  background-color: var(--bg);
  color: var(--text-dark);
}

:root[data-theme='dark'] .site-header,
:root[data-theme='dark'] .card,
:root[data-theme='dark'] footer {
  background-color: var(--white);
  color: var(--text-dark);
}

:root[data-theme='dark'] nav a {
  color: var(--gray);
}
:root[data-theme='dark'] nav a.active,
:root[data-theme='dark'] nav a:hover {
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
}

:root[data-theme='dark'] .card-title {
  color: #fff;
}
:root[data-theme='dark'] .card-desc {
  color: var(--gray);
}
:root[data-theme='dark'] .socials a {
  color: var(--gray);
}
:root[data-theme='dark'] .socials a:hover {
  color: var(--primary);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}