:root {
  --bg: #fdf0f5;
  --bg-alt: #fbe0ec;
  --surface: #fff8fb;
  --text: #3a2430;
  --text-muted: #8c5d72;
  --accent: #e0347e;
  --accent-hover: #c21f68;
  --accent-soft: rgba(224, 52, 126, 0.14);
  --border: #f2c9dd;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.25);
  --max-width: 980px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main > section {
  scroll-margin-top: 64px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 8px; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { color: var(--text-muted); }

a { color: var(--accent); text-decoration: none; transition: color 0.3s var(--ease); }
a:hover { color: var(--accent-hover); }

.section h2 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease) 0.08s, transform 0.7s var(--ease) 0.08s;
}

section.in-view h2 { opacity: 1; transform: translateY(0); }

.lead {
  font-size: 1.05rem;
  max-width: 640px;
  text-align: justify;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 240, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 28px;
  background: linear-gradient(to bottom, rgba(253, 240, 245, 0.85), rgba(253, 240, 245, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.nav-inner {
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 800;
  color: var(--text);
  font-size: 0.98rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.3s var(--ease);
}

.logo:hover { color: var(--accent-hover); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  padding-bottom: 2px;
}

.nav-bullet {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Dil değiştirici (açılır menü) */
.lang-switch {
  position: relative;
  display: inline-flex;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.lang-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.25s var(--ease);
}

.lang-switch.open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 132px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 200;
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-btn:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  will-change: transform, opacity;
  transform-origin: center top;
  background:
    radial-gradient(circle at 50% 42%, rgba(224, 52, 126, 0.55) 0%, rgba(224, 52, 126, 0.24) 38%, rgba(224, 52, 126, 0.08) 62%, transparent 85%),
    var(--bg);
}

.hero-inner { position: relative; will-change: transform, opacity; }

.hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  will-change: transform;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 999px;
  z-index: 1;
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 999px;
  background: var(--accent);
  animation: scroll-cue-move 1.6s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0% { top: 8px; opacity: 1; }
  70% { top: 20px; opacity: 0; }
  100% { top: 20px; opacity: 0; }
}

.eyebrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-bottom: 0; }

.hero-text { position: relative; }

.hero-text > .eyebrow,
.hero-text > h1 {
  transition: color 0.4s ease;
}

/* Giriş animasyonu: isim harfleri tek tek belirir */
.hero .eyebrow {
  opacity: 0;
  animation: hero-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

/* JS harfleri bölene kadar isim gizli kalsın (flash önlenir) */
.hero-text h1 { opacity: 0; }
.hero-text h1.chars-ready { opacity: 1; }

.hero .char {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity, filter;
  animation: hero-char-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-char-reveal {
  0% { opacity: 0; transform: translateY(0.55em) rotateX(-45deg); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow,
  .hero .char {
    opacity: 1;
    animation: none;
  }
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 12px 24px -12px var(--accent);
}

.btn-secondary {
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.5);
}

/* Sections */
.section {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 48px 0 56px;
  overflow: hidden;
}

.section-alt { background: var(--bg-alt); }

.section > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 0.8s var(--ease) 0.05s, transform 0.8s var(--ease) 0.05s;
}

section.in-view > .container { opacity: 1; transform: translateY(0); }

.section-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 24px;
  padding: 0 24px;
}

.section-heading h2 { margin-bottom: 0; }

.section-bullet {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}

.section::before {
  content: attr(data-num);
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
  font-size: clamp(8rem, 22vw, 18rem);
  font-weight: 800;
  line-height: 1;
  color: var(--surface);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.9s var(--ease);
}

.section.in-view::before { transform: translateY(-50%) translateX(-12px); }

/* About */
.about-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 55%;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  margin-top: 20px;
  align-items: start;
}

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.fact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
}

.fact-list li > span:first-child {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.about-side {
  display: grid;
  gap: 16px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.about-card h3 {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.about-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.about-card .tag-list {
  margin-top: 0;
}

/* Eğitim */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
  max-width: 520px;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), opacity 0.5s var(--ease);
}

.edu-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -20px rgba(224, 52, 126, 0.3);
}

.edu-card h4 { margin-bottom: 4px; }

/* Timeline (Deneyim) */
.timeline {
  margin-top: 20px;
  border-left: 2px solid var(--border);
  padding-left: 28px;
  display: grid;
  gap: 32px;
}

.timeline-item { position: relative; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-date {
  display: block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline-item h4 { margin-bottom: 4px; }

.timeline-item p,
.timeline-item ul {
  margin: 8px 0 0;
  text-align: justify;
}

.timeline-item ul {
  padding-left: 18px;
}

.timeline-item ul li { margin-bottom: 4px; }

.cv-meta {
  color: var(--accent);
  font-size: 0.85rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 420px));
  gap: 24px;
  margin-top: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), opacity 0.5s var(--ease);
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(224, 52, 126, 0.3);
}

.skill-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}

.skill-card-icon svg { width: 20px; height: 20px; }

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.85rem;
  color: var(--text);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.tag-list li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.skill-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

.skill-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}

.skill-list li:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(6px);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
  gap: 24px;
  margin-top: 20px;
}

.project-card {
  position: relative;
  cursor: pointer;
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), opacity 0.5s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 24px 48px -20px rgba(224, 52, 126, 0.35);
}

.project-card .cv-meta {
  display: block;
  margin-top: -8px;
  margin-bottom: 4px;
}

.project-hint {
  display: block;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  transition: opacity 0.3s var(--ease);
}

.project-card:hover .project-hint,
.project-card.expanded .project-hint {
  opacity: 0;
}

.project-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.project-card:hover .project-details,
.project-card.expanded .project-details {
  grid-template-rows: 1fr;
}

.project-details > div { overflow: hidden; }

.project-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  text-align: justify;
}

.project-card ul li { margin-bottom: 4px; }

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
}

.project-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.project-report:hover { color: var(--accent-hover); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
  max-width: 520px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.5s var(--ease);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -18px rgba(224, 52, 126, 0.3);
  color: var(--text);
}

.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.contact-icon svg { width: 20px; height: 20px; }

.contact-card:hover .contact-icon {
  background: var(--accent);
  color: #ffffff;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.contact-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-word;
}

/* CV page */
.cv-page .kicker { font-weight: 700; }
.cv-page .lead { margin-bottom: 28px; }
.cv-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.cv-viewer { margin-bottom: 24px; }

.pdf-embed {
  width: 100%;
  height: 720px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.pdf-fallback {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Reveal-on-scroll animation for cards */
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

section.in-view .reveal-item { opacity: 1; transform: translateY(0); }

section.in-view .reveal-item:nth-child(1) { transition-delay: 0ms; }
section.in-view .reveal-item:nth-child(2) { transition-delay: 80ms; }
section.in-view .reveal-item:nth-child(3) { transition-delay: 160ms; }
section.in-view .reveal-item:nth-child(4) { transition-delay: 240ms; }
section.in-view .reveal-item:nth-child(5) { transition-delay: 320ms; }
section.in-view .reveal-item:nth-child(6) { transition-delay: 400ms; }

/* Footer */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 880px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 2;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-links.open { display: flex; }

  /* CV sayfası menüsü mobilde de statik/görünür kalsın (hamburger yok) */
  .nav-links.nav-links-static {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 0;
    border: none;
    background: none;
  }
  .nav-links.nav-links-static .lang-switch { margin-top: 0; }

  .lang-switch { margin-top: 6px; }
  .lang-menu { right: auto; left: 0; }

  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .pdf-embed { height: 480px; }
}
