/*
 * Responsive portfolio template
 *
 * This stylesheet implements both light and dark themes, and
 * defines reusable classes for layout, typography, and cards.
 * Toggle between themes by adding the class "dark" to the body.
 */

/* Light theme variables */
:root {
  --background-light: #f5f5f5;
  --text-light: #2c3e50;
  --primary-light: #007acc;
  --secondary-light: #ffffff;
  --card-bg-light: #ffffff;
  --accent-light: #005b99;

  /* Dark theme variables */
  --background-dark: #0a192f;
  --text-dark: #ccd6f6;
  --primary-dark: #64ffda;
  --secondary-dark: #112240;
  --card-bg-dark: #112240;
  --accent-dark: #64ffda;

  --transition-duration: 0.3s;
  --border-radius: 8px;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  transition: background-color var(--transition-duration), color var(--transition-duration);
}

/* Theme specific styles */
body.light {
  background-color: var(--background-light);
  color: var(--text-light);
}

body.dark {
  background-color: var(--background-dark);
  color: var(--text-dark);
}

/* Header and navigation */
header {
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: bold;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  font-weight: bold;
  transition: color var(--transition-duration);
}

body.light nav a {
  color: var(--primary-light);
}

body.dark nav a {
  color: var(--primary-dark);
}

nav a:hover {
  opacity: 0.8;
}

.theme-toggle {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid currentColor;
  font-size: 0.8rem;
  background: transparent;
  transition: background-color var(--transition-duration);
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* Hero section */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 60vh;
  gap: 30px;
}

.hero-img {
  flex: 0 0 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  max-width: 600px;
}

.button-group button {
  margin-right: 15px;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color var(--transition-duration);
}

body.light .button-group button {
  background-color: var(--primary-light);
  color: #fff;
}

body.dark .button-group button {
  background-color: var(--primary-dark);
  color: #0a192f;
}

.button-group button:hover {
  filter: brightness(0.9);
}

/* Section headings */
h2.section-title {
  font-size: 2rem;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
}

h2.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 8px;
}

body.light h2.section-title::after {
  background-color: var(--primary-light);
}

body.dark h2.section-title::after {
  background-color: var(--primary-dark);
}

/* Cards */
.card {
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  transition: background-color var(--transition-duration);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

body.light .card {
  background-color: var(--card-bg-light);
}

body.dark .card {
  background-color: var(--card-bg-dark);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.card ul {
  list-style-type: disc;
  margin-left: 20px;
}

.card ul li {
  margin-bottom: 6px;
}

/* Projects grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--transition-duration), box-shadow var(--transition-duration);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.project-card-content {
  padding: 15px;
}

.project-card-content h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.project-card-content p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.9rem;
  transition: background-color var(--transition-duration);
}

body.light footer {
  background-color: var(--primary-light);
  color: #fff;
}

body.dark footer {
  background-color: var(--primary-dark);
  color: #0a192f;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 40px;
  }
  .hero-img {
    margin-bottom: 20px;
  }
  nav a {
    margin-left: 12px;
  }
}
.btn {
  background: var(--primary-light);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}
.btn:hover {
  background: var(--primary-dark);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  align-items: stretch; /* force same height */
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--card-light);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark .project-card {
  background: var(--card-dark);
}

.project-card img {
  width: 100%;
  height: 180px;          /* fixed height for images */
  object-fit: cover;      /* keep proportion */
}

.project-card-content {
  flex: 1;                /* stretch to fill remaining space */
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.project-card-content h3 {
  margin-bottom: 10px;
}

.project-card-content p {
  font-style: italic;
  color: gray;
  margin-bottom: 10px;
}

.project-card-content ul {
  margin-top: 0;
  padding-left: 20px;
  flex: 1;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
