:root {
  --bg-color: #F2F2F2;
  --text-color: #333;
  --text-light: #555;
  --card-bg: #fff;
  /* Glass Effect Variables */
  --nav-bg: rgba(255, 255, 255, 0.15);
  --nav-border: rgba(255, 255, 255, 0.2);
  --nav-text: #fff;
  /* Keep white for contrast on hero image */
  --nav-scrolled: rgba(20, 20, 20, 0.6);
  /* Semi-transparent dark for scroll */
  --shadow: rgba(0, 0, 0, 0.15);
  --primary: #000;
}

.dark-mode {
  --bg-color: #121212;
  --text-color: #f1f1f1;
  --text-light: #aaa;
  --card-bg: #1E1E1E;
  --nav-bg: rgba(0, 0, 0, 0.2);
  --nav-border: rgba(255, 255, 255, 0.1);
  --nav-text: #fff;
  --nav-scrolled: rgba(0, 0, 0, 0.85);
  --shadow: rgba(255, 255, 255, 0.1);
  --primary: #fff;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-style: normal;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--nav-bg);
  z-index: 1000;

  /* Liquid Glass Effect */
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);

  transition: all 0.4s ease;
  padding: 1.5rem 0;
  /* Increased initial padding */
}

.navbar a {
  position: relative;
  text-decoration: none;
  color: var(--nav-text);
  font-weight: bold;
  font-size: 1rem;
}

.navbar.scrolled {
  background: var(--nav-scrolled);
  backdrop-filter: blur(20px);
  padding: 0.8rem 0;
  /* Shrink on scroll */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0.5rem;
  margin: 0;
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
  .navbar ul {
    display: none;
    /* Hide nav links on mobile */
  }

  .nav-content {
    justify-content: center;
  }
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  margin-left: 1rem;
}



.navbar a {
  position: relative;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1rem;
}

.navbar a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -4px;
  background-color: white;
  transition: width 0.3s ease;
}

.navbar a:hover::after {
  width: 100%;
}

.slide {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--bg-color);
  border-bottom: 1px solid #ccc;
  padding: 2rem;
  box-sizing: border-box;
}

.intro {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 4px 4px 16px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 1.5s ease forwards;
  opacity: 0;
}

#typewriter {
  border-right: 2px solid white;
  white-space: nowrap;
  overflow: hidden;
}

.about-section {
  position: relative;
  background-image: url('resources/images/arda.JPG');
  /* Fotoğrafını buraya koy */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 100vh;
  color: white;
  isolation: isolate;
}


.about-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1;
}

.about-section::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(4px);
  z-index: 0;
}


.overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  /* ORTA DİKEY */
  justify-content: flex-start;
  /* SOLA */
  padding-left: 10vw;
  /* soldan boşluk */
  text-align: left;
}

.projects-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  background-color: var(--bg-color);
  text-align: center;
}

.projects-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.project-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.project-card {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: min(360px, 90vw);
  height: 440px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.6s ease;
  text-overflow: ellipsis;
  max-height: 100%;
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  /* Gashga için siyah filtre */
  z-index: 1;
}

.project-card:hover .card-content {
  transform: translateY(-10px);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1.2rem 1rem;
  /* background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)); REMOVED per user request */
  color: white;
  z-index: 2;

  /* Yeni eklenen */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 40%;
  /* Kartın alt %40'ında kalsın */
}

.card-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.card-content p {
  font-size: 0.9rem;
  line-height: 1.3;
  max-height: 3.6em;
  /* yaklaşık 3 satır */
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.card-content a {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: #ffffff;
  color: #000;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  margin-top: 0.8rem;
  font-size: 0.85rem;
}

.card-content a:hover {
  background: #ddd;
}

.contact-section {
  background: var(--bg-color);
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* About Details Section */
.section-padding {
  padding: 5rem 2rem;
  background-color: var(--bg-color);
  display: flex;
  justify-content: center;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1100px;
  width: 100%;
}

.about-image img {
  width: 300px;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  /* Requested Border Radius */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.02);
}

.about-text {
  max-width: 600px;
  text-align: left;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-light);
}

/* Mobile Responsive for About Details */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .about-text {
    text-align: center;
  }
}

.contact-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #222;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  background-color: var(--card-bg);
  color: var(--text-color);
}

.contact-form button {
  background-color: #000;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form button:hover {
  background-color: #333;
}

/* Sosyal linkler */
.social-links {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links a {
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.social-links a:hover {
  color: #0077b5;
}




@keyframes fadeInUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .intro {
    font-size: 2rem;
  }

  .overlay {
    justify-content: center;
    /* Center text on mobile */
    padding-left: 0;
    text-align: center;
    align-items: center;
  }

  .project-cards {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .project-card {
    width: 90vw;
    /* Take most of the screen width */
    max-width: 360px;
    height: auto;
    /* Allow flexible height if needed, or keep fixed */
    aspect-ratio: 3/4;
    /* Maintain consistency */
  }

  .contact-form {
    width: 100%;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .skill-item {
    padding: 1rem;
  }
}

/* --- NEW STYLES --- */

/* Navbar Controls */
.nav-controls {
  display: flex;
  gap: 1rem;
}

.nav-controls button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  /* Navbar content is light initially */
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.navbar.scrolled .nav-controls button {
  border-color: rgba(255, 255, 255, 0.8);
}

/* Skills Section */
.skills-section h2,
.projects-section h2,
.contact-section h2 {
  color: var(--text-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.3s;
}

.skill-item:hover {
  transform: translateY(-5px);
}

.skill-item i {
  font-size: 2.5rem;
  color: var(--text-color);
}

.skill-item span {
  font-size: 1rem;
  font-weight: 500;
}

/* Particles */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  /* Below overlay (z=2) */
}

/* Animation Classes Removed */

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 2rem;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
}

.btn-details {
  background: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 1rem;
  font-weight: bold;
}

.btn-details:hover {
  background: #ddd;
}