/* === GENEL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  transition: background 0.3s, color 0.3s;
}

body {
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* === TEMA RENKLERİ === */
.light { background: #f5f7fa; color: #222; }
.dark { background: #0d1117; color: #e6edf3; }

/* === LOGO === */
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.logo .mavi { color: #004080; }
.logo .sari { color: #ffcc00; }
.logo:hover { opacity: 0.9; transform: scale(1.02); transition: all 0.3s ease; }

/* === YÜKLENME ANİMASYONU === */
#loader {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0d1117;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  visibility: visible;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.light #loader { background: #ffffff; }

.typewriter h2 {
  overflow: hidden;
  border-right: 3px solid #58a6ff;
  white-space: nowrap;
  animation: typing 1.6s steps(30) 1, blink 0.8s infinite;
  color: #58a6ff;
  font-weight: 500;
  letter-spacing: 1px;
}
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink { 50% { border-color: transparent; } }

/* === NAVBAR === */
header { position: sticky; top: 0; z-index: 999; }
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  backdrop-filter: blur(6px);
}
.light .navbar { background: rgba(255,255,255,0.9); border-bottom: 1px solid #ddd; }
.dark .navbar { background: rgba(22,27,34,0.9); border-bottom: 1px solid #30363d; }

.navbar a {
  color: inherit;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}
.navbar a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #007bff;
  transition: width 0.3s ease;
}
.navbar a:hover::after,
.navbar a.active::after { width: 100%; }
.navbar a.active { color: #007bff; font-weight: 600; }

#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 15px;
}

/* === HERO === */
#hero {
  text-align: center;
  padding: 120px 20px;
  background: linear-gradient(135deg, #004a99, #007bff);
  color: white;
}
#hero h1 { font-size: 2.5rem; margin-bottom: 10px; }
#hero h1 span { color: #ffcc00; }
#hero p { font-size: 1.3rem; margin-bottom: 30px; min-height: 30px; }

.typed-text { font-weight: 500; color: #ffcc00; }
.cursor {
  display: inline-block;
  background-color: #ffcc00;
  width: 3px;
  margin-left: 3px;
  animation: blinkCursor 0.7s steps(1) infinite;
}
@keyframes blinkCursor { 50% { opacity: 0; } }

.btn {
  background: #ff6600;
  color: white;
  padding: 10px 25px;
  border-radius: 30px;
  text-decoration: none;
  transition: 0.3s;
}
.btn:hover { background: #ffaa00; box-shadow: 0 0 15px #ffaa00; }
.dark .btn { background: #238636; }
.dark .btn:hover { background: #2ea043; box-shadow: 0 0 15px #2ea043; }

/* === İÇERİK === */
.content {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}
h2 { font-size: 2rem; margin-bottom: 20px; }

/* === FADE-IN ANİMASYONU === */
.reveal { opacity: 0; transform: translateY(40px); transition: all 1s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* === PROJELER === */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.project-card {
  border-radius: 10px;
  padding: 30px;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}
.project-card h3 { margin-top: 10px; }
.project-card p { font-size: 0.9rem; opacity: 0.9; margin-top: 5px; }

.light .project-card {
  background: #fff;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.light .project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  color: #004a99;
}
.dark .project-card {
  background: #161b22;
  color: #e6edf3;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.dark .project-card:hover {
  background: #21262d;
  transform: translateY(-5px);
  color: #58a6ff;
}

/* === İLETİŞİM === */
.contact {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 25px;
  padding: 0;
  text-align: center;
}
.contact li {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.contact strong { color: #ff6600; margin-right: 3px; }
.contact a { color: inherit; text-decoration: none; transition: color 0.3s; }
.contact a:hover { color: #007bff; text-decoration: underline; }

/* === YUKARI ÇIK BUTONU === */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.3s, transform 0.3s;
  z-index: 1000;
}
#scrollTopBtn:hover {
  background: #0056b3;
  transform: translateY(-3px);
}

/* === MOBİL === */
@media (max-width: 600px) {
  .contact { flex-direction: column; align-items: center; gap: 10px; }
  #hero h1 { font-size: 2rem; }
  .navbar { flex-direction: column; gap: 8px; }
  .project-card { padding: 20px; }
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  margin-top: 50px;
}
.light footer { background: #003366; color: #fff; }
.dark footer { background: #161b22; color: #8b949e; border-top: 1px solid #30363d; }
