/* ---------------------------------
   COLOR VARIABLES
   Easy to change colors in one place
-----------------------------------*/
:root {
  --primary-color: #2c3e50;   /* dark blue for headings */
  --secondary-color: #18bc9c; /* soft teal for highlights */
  --accent-color: #f39c12;    /* soft orange for hover effects */
  --bg-color: #f5f5f5;        /* light background */
  --card-bg: #fff;             /* background of project cards */
  --text-color: #333;          /* main text color */
  --link-color: #18bc9c;       /* link color */
  --link-hover: #f39c12;       /* link hover color */
}

/* ---------------------------------
   GLOBAL STYLES
-----------------------------------*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------------------------------
   LAYOUT CONTAINER
   Keeps content centered and not too wide
-----------------------------------*/
.container {
  max-width: 1100px;
  margin: 0 auto;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  text-align: center;
  padding: 2rem 1rem; /* less side padding for mobile */
}

/* ---------------------------------
   HEADER STYLES
-----------------------------------*/
header h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--secondary-color);
  font-size: 1.2rem;
}

/* ---------------------------------
   NAVIGATION BAR
-----------------------------------*/
nav {
  margin-top: 1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* ---------------------------------
   PROJECT SECTION
-----------------------------------*/
.projects-section h2 {
  margin-bottom: 2rem;
}

/* ---------------------------------
   SECTION SPACING
-----------------------------------*/
section {
  margin-top: 3rem;
}

/* ---------------------------------
   PROJECT CARDS
-----------------------------------*/
.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.project-card {
  background-color: var(--card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  flex: 1 1 250px;
  max-width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02); /* smoother lift */
  box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}

.project-link {
  display: inline-block;
  text-decoration: none;
  color: var(--link-color);
  border: 2px solid var(--link-color);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.project-link:hover {
  background-color: var(--link-color);
  color: #fff;
}

/* ---------------------------------
   FOOTER
-----------------------------------*/
footer {
  margin-top: 3rem;
  color: #777;
  font-size: 0.9rem;
}

/* ---------------------------------
   RESPONSIVE DESIGN
-----------------------------------*/
@media (max-width: 768px) {
  .projects-container {
    flex-direction: column;
    align-items: center;
  }

  header h1 {
    font-size: 2rem;
  }
}

/* ---------------------------------
   DARK MODE SUPPORT
-----------------------------------*/
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #eee;
  }
}
