* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0f172a;
    --card-color: #1e293b;
    --text-color: #f1f5f9;
    --secondary-text: #94a3b8;
    --accent-color: #3b82f6;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 80px;
}

header {
    text-align: center;
    margin-bottom: 80px;
}

header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

header p {
    font-size: 18px;
    color: var(--secondary-text);
}

section {
    max-width: 1000px;
    margin: 0 auto 50px auto;
    scroll-margin-top: 100px;
}

h2 {
    margin-bottom: 20px;
    font-size: 28px;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
}

ul {
    list-style: none;
}

li {
    margin-bottom: 8px;
}

.hero {
    text-align: center;
    margin-bottom: 120px;
    padding: 120px 20px;
    background: radial-gradient(circle at top, rgba(59,130,246,0.15), transparent 60%);
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s ease;
}

.btn:hover {
    background-color: #2563eb;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skills-card {
    background-color: var(--card-color);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: 0.3s ease;
}

.skills-card:hover {
    background-color: #334155;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap:20px;
}

.project-tech {
    margin: 15px 0;
}

.project-tech span {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--text-color);
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    margin-right: 8px;
    font-size: 14px;
    border: 1px solid rgba(37, 99, 235,0.15);
}

.project-tech span:hover {
    background-color: var(--accent-color);
    color: white;
    cursor: default;
}

body.light-mode .project-tech span {
    background-color: rgba(15, 23, 42, 0.05);
    border: none;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: bold;
}

.project-link:hover {
    text-decoration: underline;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background-color: #0f172a;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-color);
    display: flex;
    position: relative;
    align-items: center;
}

.logo::after {
    content: "";
    position: absolute;
    bottom: -1px;   /* navbar border ile hizalanır */
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 24px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {

    .hamburger {
        display: flex;
        z-index: 1000;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        width: 100%;
        height: 100vh;
        background: linear-gradient(to bottom, #0f172a, #0b1220);
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 22px;
        position: relative;
        transition: color 0.3s ease;
    }

    .nav-links a::after {
        content: "";
        position: absolute;
        bottom: -6px;
        left: 50%;
        width: 0%;
        height: 2px;
        background: var(--accent-color);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .nav-links a:hover::after {
        width: 50%;
    }

    .nav-container {
        padding: 0 20px;   
    }

    .hero h1 {
        font-size: 28px;
        text-align: center;
    }

    .hero p {
        text-align: center;
        font-size: 14px;
    }

    section {
        padding: 20px;
    }

    .project-card {
        width: 100%;
        padding: 20px;
        text-align: center;
    }

    .logo {
        position: relative;
        top: 12px;
        padding-bottom: 2px;
    }

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

    .project-links {
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 12px 0;
    }

    .project-tech {
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .project-image {
        padding: 15px;
    }

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

    .project-links a {
        font-size: 13px;
        padding: 5px 12px;
        border: 1px solid var(--accent-color);
        border-radius: 6px;
    }

    .theme-toggle {
        position: absolute;
        right: 55px;   
        top: 28px;     
        font-size: 22px;
    }

    .scroll-top-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}

.project-image {
    position: relative;
    border-radius: 18px;
    margin-bottom: 25px;
    background: var(--card-color);
    padding: 15px;
    box-shadow: 
        inset 0 0 0 1px rgba(59,130,246,0.15),
        0 10px 30px rgba(0,0,0,0.4);
}

.project-image img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.project-card {
    background: var(--card-color);
    padding: 25px;
    border-radius: 22px;
    border: 1px solid rgba(59,130,246,0.2);
    transition: 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.project-card + .project-card {
    margin-top: 30px;
}

.project-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.project-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.project-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.project-links a:hover::after {
    width: 100%;
}

.project-content {
    padding: 20px;
    width: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.project-header h3 {
    margin:0;
}

.terminal-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.terminal-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-bar span:nth-child(1) {
    background: #ff5f56;
}

.terminal-bar span:nth-child(2) {
    background: #ffbd2e;
}

.terminal-bar span:nth-child(3) {
    background: #27c93f;
}

body.light-mode {
    --bg-color: #f8fafc;
    --card-color: #ffffff;
    --text-color: #0f172a;
    --secondary-text: #475569;
    --accent-color: #2563eb;
}

.theme-toggle {
    cursor: pointer;
    font-size: 24px;
    margin-left: 20px;
    --rotate: 0deg;
    --scale: 1;
    transform: rotate(var(--rotate)) scale(var(--scale));
    transition: transform 0.4s ease;
}

.theme-toggle.rotate {
    --rotate: 360deg;
}

@media (hover: hover) and (pointer: fine) {
    .theme-toggle:hover {
        --scale: 1.15;
    }
}

.theme-toggle:focus {
    outline: none;
}

@media (hover: none) {
    .theme-toggle:focus {
        transform: none;
    }
}

@media (min-width: 769px) {
    .theme-toggle {
        position: relative;
        top: -6px;
    }
}

.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;

  background-color: var(--accent-color);
  color: white;
  font-size: 30px;
  font-weight: bold;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;

  z-index: 999;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-4px) scale(1.08);
}

body:not(.light-mode)::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    120deg,
    #0f172a,
    #1e293b,
    #0f172a
  );
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
  z-index: -2;
  opacity: 0.8;
}

body.light-mode::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(59,130,246,0.05),
    transparent 70%
  );
  z-index: -2;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#bg-animation {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.light-mode {
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #fef3c7 40%,
    #e0f2fe 100%
  );
}

body.light-mode .hero {
  position: relative;
  overflow: hidden;
}

body.light-mode .hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(255, 200, 120, 0.45) 0%,
    rgba(255, 200, 120, 0.25) 35%,
    rgba(255, 200, 120, 0.1) 55%,
    transparent 75%
  );
  filter: blur(60px);
  z-index: -1;
}

body.light-mode h2 {
  border-bottom: 2px solid rgba(59,130,246,0.3);
}

body.light-mode .hero h1 {
  text-shadow: 0 5px 25px rgba(59,130,246,0.15);
}

body.light-mode .project-card,
body.light-mode .skills-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 200, 120, 0.2);
}

body.light-mode::after {
  content: "";
  position: fixed;
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: radial-gradient(circle,
      rgba(255, 0, 150, 0.15),
      rgba(255, 180, 0, 0.15),
      rgba(0, 200, 255, 0.15),
      transparent 70%);
  filter: blur(120px);
  pointer-events: none;
  z-index: -2;
}

body.light-mode .skills-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 15px 40px rgba(255, 180, 0, 0.15);
}