@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --purple-deep: #5b21b6;
  --purple-mid: #7c3aed;
  --purple-light: #a78bfa;
  --purple-pale: #ede9fe;
  --purple-ink: #4c1d95;
  --line-color: #c4b5fd44;
  --margin-line: #f9a8d4aa;
  --text-dark: #1e1b2e;
  --text-body: #3b3554;
  --white: #ffffff;
  --paper-bg: #fdfcff;
  --nav-bg: rgba(255,255,255,0.88);
  --card-bg: white;
  --footer-border: var(--purple-pale);
}

/* ── DARK MODE DEĞİŞKENLERİ ── */
body.dark-mode {
  --purple-deep: #c4b5fd;
  --purple-mid: #a78bfa;
  --purple-light: #7c3aed;
  --purple-pale: #2d1b69;
  --purple-ink: #ddd6fe;
  --line-color: #7c3aed22;
  --margin-line: #f9a8d433;
  --text-dark: #f0ebff;
  --text-body: #c4b5fd;
  --paper-bg: #0f0b1e;
  --nav-bg: rgba(15, 11, 30, 0.92);
  --card-bg: #1a1030;
  --footer-border: #2d1b69;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', serif;
  color: var(--text-dark);
  background-color: var(--paper-bg);
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      var(--line-color) 31px,
      var(--line-color) 32px
    );
  background-size: 100% 32px;
  min-height: 100vh;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 72px;
  width: 2px;
  height: 100%;
  background: var(--margin-line);
  z-index: 0;
  pointer-events: none;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--purple-light);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 20px #7c3aed18;
  transition: background 0.4s ease;
}

.nav-logo {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--purple-mid);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: var(--text-body);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--purple-mid);
  border-radius: 2px;
  transition: width 0.3s ease;
}

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

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

/* ── DARK MODE TOGGLE ── */
.dark-toggle {
  background: none;
  border: 2px solid var(--purple-light);
  border-radius: 50px;
  width: 52px;
  height: 28px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.3s, background 0.3s;
  flex-shrink: 0;
}

.dark-toggle::after {
  content: '☀️';
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  font-size: 14px;
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), content 0.1s;
  line-height: 1;
}

body.dark-mode .dark-toggle {
  background: var(--purple-pale);
  border-color: var(--purple-mid);
}

body.dark-mode .dark-toggle::after {
  content: '🌙';
  left: 26px;
}

.dark-toggle:hover {
  border-color: var(--purple-mid);
}

/* ── NAV SAĞ GRUP ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.9s ease both;
}

.hero-tag {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: var(--purple-light);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

.hero-name {
  font-family: 'Caveat', cursive;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--purple-deep);
  position: relative;
  display: inline-block;
}

.hero-name .highlight {
  color: var(--purple-mid);
  position: relative;
}

.hero-name .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--purple-light);
  opacity: 0.4;
  border-radius: 3px;
  z-index: -1;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-body);
  margin-top: 1.5rem;
  font-style: italic;
  opacity: 0.85;
}

.hero-deco {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 9rem;
  color: var(--purple-light);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  font-weight: 700;
}

.hero-deco.d1 { top: 10%; left: 5%; transform: rotate(-15deg); }
.hero-deco.d2 { bottom: 10%; right: 5%; transform: rotate(10deg); }

.hero-btn {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.75rem 2.2rem;
  background: var(--purple-mid);
  color: white;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 24px #7c3aed44;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.hero-btn:hover {
  background: var(--purple-deep);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px #7c3aed55;
}

/* ── SECTIONS ── */
.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem 5rem;
  position: relative;
  z-index: 1;
}

.section-label {
  font-family: 'Caveat', cursive;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: 'Caveat', cursive;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--purple-deep);
  margin-bottom: 2rem;
  line-height: 1.1;
}

.section-title span {
  border-bottom: 3px solid var(--purple-light);
  padding-bottom: 2px;
}

/* ── CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1.5px solid var(--purple-pale);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s, background 0.4s;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--purple-mid), var(--purple-light));
  border-radius: 4px 0 0 4px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px #7c3aed1a;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  display: block;
}

.card-title {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--purple-mid);
  margin-bottom: 0.35rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ── HOBBY TAGS ── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tag {
  background: var(--purple-pale);
  color: var(--purple-ink);
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid var(--purple-light);
  transition: background 0.2s, transform 0.2s;
  cursor: default;
}

.tag:hover {
  background: var(--purple-mid);
  color: white;
  transform: scale(1.05);
}

/* ── PROJECT CARD ── */
.project-card {
  background: var(--card-bg);
  border: 2px solid var(--purple-pale);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 4px 4px 0 var(--purple-pale);
  transition: box-shadow 0.2s, transform 0.2s, background 0.4s;
}

.project-card:hover {
  box-shadow: 6px 6px 0 var(--purple-light);
  transform: translate(-2px, -2px);
}

.project-badge {
  display: inline-block;
  background: var(--purple-mid);
  color: white;
  font-family: 'Caveat', cursive;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.2rem 0.9rem;
  border-radius: 50px;
  width: fit-content;
}

.project-name {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--purple-deep);
}

.project-desc {
  color: var(--text-body);
  font-size: 0.97rem;
  line-height: 1.7;
}

/* ── CONTACT ── */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--card-bg);
  border: 1.5px solid var(--purple-light);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  color: var(--purple-ink);
  text-decoration: none;
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.contact-link:hover {
  background: var(--purple-mid);
  color: white;
  border-color: var(--purple-mid);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px #7c3aed33;
}

.contact-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  color: var(--purple-light);
  border-top: 1.5px solid var(--footer-border);
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

footer span {
  color: var(--purple-mid);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* ── YUKARIYA ÇIK BUTONU ── */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--purple-mid);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px #7c3aed44;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.85);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

#scrollTopBtn:hover {
  background: var(--purple-deep);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 28px #7c3aed55;
}

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
  z-index: 200;
}

.hamburger:hover {
  background: var(--purple-pale);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--purple-mid);
  border-radius: 4px;
  transition: transform 0.35s ease, opacity 0.25s ease, width 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ── MOBİL MENÜ OVERLAY ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(91, 33, 182, 0.15);
  backdrop-filter: blur(2px);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.open {
  opacity: 1;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  body::before { left: 48px; }
  .section { padding: 3.5rem 1.2rem 2rem 3.5rem; }
  nav { padding: 0 1rem; }
  .hero-deco { display: none; }

  .hamburger { display: flex; }

  .nav-overlay { display: block; pointer-events: none; }
  .nav-overlay.open { pointer-events: all; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(280px, 80vw);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-left: 2px solid var(--purple-light);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 5rem 2rem 2rem;
    z-index: 199;
    transform: translateX(110%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -8px 0 40px #7c3aed22;
  }

  body.dark-mode .nav-links {
    background: rgba(15, 11, 30, 0.97);
  }

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

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--purple-pale);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 1rem 0.5rem;
    font-size: 1.6rem;
    color: var(--purple-ink);
  }

  .nav-links a::after {
    bottom: 0;
  }

  #scrollTopBtn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}
