:root {
  --bg: #fdfdfd;
  --text: #222;
  --card-bg: #ffffff;
  --footer-bg: #eee;
}
#projects .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
body.dark {
  --bg: #1e1e1e;
  --text: #f0f0f0;
  --card-bg: #2c2c2c;
  --footer-bg: #111;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 0 20px;
  transition: background 0.3s, color 0.3s;
}

header {
  position: relative;
  background: url('images/headerbg.png') center/cover no-repeat;
  color: white;
  padding: 80px 20px 40px;
  text-align: center;
  overflow: hidden;
}

header .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4); /* Karartma efekti */
  z-index: 1;
}

header h1, header p, #themeToggle {
  position: relative;
  z-index: 2;
}

header h1 {
  margin: 0;
  font-size: 36px;
}

header p {
  margin-top: 10px;
  font-size: 18px;
}

#themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

section {
  max-width: 900px;
  margin: 40px auto;
}

section h2 {
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 20px;
}

.card {
  background: var(--card-bg);
  padding: 16px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.card img {
  width: 85%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 12px; /* üst:0, sağ-sol:auto, alt:12px */
  max-height: 280px;
  display: block;
}

.card-content {
  padding: 20px;
}


a {
  color: #007acc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 20px;
  background-color: var(--footer-bg);
  color: #777;
}

@media (max-width: 600px) {
  header h1 { font-size: 28px; }
  #themeToggle { top: 10px; right: 10px; }
}

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  margin-top: 10px;
  margin-right: 8px;
  background-color: #007acc;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s ease;
}

.btn.secondary {
  background-color: #555;
}

.btn:hover {
  background-color: #005fa3;
}

.btn.secondary:hover {
  background-color: #333;
}
