/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');

/* CSS Variables */
:root {
  --accent: #007acc;
  --accent-dark: #005fa3;
  --text-main: #000;
  --text-muted: #555;
  --bg-light: #fff;
  --bg-card: #f9f9f9;
  --radius: 12px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: url('assets/images/blue-bg.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  line-height: 1.6;
  animation: fadeIn 0.4s ease-in-out;
}

/* Logo */
.logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-right: 12px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.navbar a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

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

/* Main Content */
main {
  background-color: var(--bg-light);
  padding: 2rem;
  margin: 2rem auto;
  border-radius: var(--radius);
  max-width: 900px;
  box-shadow: var(--shadow);
}

/* Cards */
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin: 0.5rem 0;
  font-size: 1.2rem;
}

.project-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.project-card a {
  margin-top: auto;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

@media (min-width: 1024px) {
  main {
    max-width: 1080px;
  }
}

/* Typography */
h1, h2 {
  font-family: 'Moonshine', cursive;
  color: var(--text-main);
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

ul li {
  margin-bottom: 0.5rem;
}

main a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s;
}

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

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project:hover {
  transform: translateY(-4px);
}

.project img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Project Controls */
.project-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.project-controls input[type="text"] {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filters button {
  background: var(--bg-light);
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.filters button.active,
.filters button:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 0 4px var(--accent);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination button {
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

.pagination button:hover {
  background: var(--accent-dark);
}

.pagination button.active {
  background: var(--accent-dark);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    margin-bottom: 1rem;
  }

  .navbar {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  main {
    margin: 1rem;
    padding: 1.25rem;
  }

  .project-controls {
    flex-direction: column;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
