/* Ahmet Kaan Rahma — CV site
   Dark, minimal, technical. No frameworks, no external deps. */

:root {
  --bg: #0b0f14;
  --surface: #11161d;
  --surface-2: #151c25;
  --text: #e6e9ee;
  --muted: #8b94a3;
  --accent: #2dd4bf;
  --accent-ink: #06251f;
  --border: #1e2733;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(640px 320px at 72% -8%, rgba(45, 212, 191, 0.09), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Site geneli arka plan video (2026-09-08, Kaan'ın loop'u) ---- */
#siteBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  background: var(--bg);
}

.site-veil {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 16, 0.72) 0%, rgba(7, 10, 16, 0.55) 45%, rgba(7, 10, 16, 0.8) 100%);
  pointer-events: none;
  z-index: -2;
}

@media (prefers-reduced-motion: reduce) {
  #siteBg { display: none; }
  .site-veil { background: var(--bg); }
}

/* Mobil veri dostu (Kaan onayı, 2026-09-08): küçük ekranda video yükleme yok,
   düz koyu zemin + poster yeterli */
@media (max-width: 768px) {
  #siteBg { display: none; }
  .site-veil { background: var(--bg); }
}

main, nav, header.hero, footer { position: relative; z-index: 1; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---- Nav ---- */
nav {
  position: sticky;
  top: 0;
  /* Kaydırınca hero/section içeriklerinin menünün üstüne boyanmasını engelle
     (hepsi z-index:1 olduğu için DOM sırası nav'ı altta bırakıyordu) */
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-inline-start: auto;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

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

.lang-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  margin-inline-start: 0.5rem;
}

.lang-btn.active {
  border-color: var(--accent);
  background: rgba(45, 212, 191, 0.12);
}

.lang-btn:hover { border-color: var(--accent); }
.lang-btn:active { transform: scale(0.96); }

/* ---- Hero (sinematik) ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  /* Site geneli video arka plan devrede — eski hero gradyanı kapatıldı (geri almak için display:none'ı sil) */
  display: none;
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Fotoğraflar gelince: images/hero-bg.jpg (yatay, ≥1920px). Dosya yokken gradyan placeholder görünür. */
  background-image:
    linear-gradient(165deg, rgba(11, 15, 20, 0.45) 0%, rgba(11, 15, 20, 0.78) 55%, var(--bg) 100%),
    url("../images/hero-bg.jpg");
  background-size: cover, cover;
  background-position: center 30%;
  background-attachment: fixed, fixed;
  background-color: var(--bg);
}

.hero-content {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(5rem, 12vh, 8rem) clamp(1.25rem, 4vw, 2rem) 6rem;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55);
}

.hero-role {
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  margin-bottom: 1.1rem;
}

.hero-tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  color: var(--muted);
  margin-bottom: 0.9rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  color: var(--muted);
  font-size: 1.3rem;
  animation: drift 2.2s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll { animation: none; }
  .hero-bg { background-attachment: scroll, scroll; }
}

@media (max-width: 900px) {
  .hero-bg { background-attachment: scroll, scroll; }
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(45, 212, 191, 0.25);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
}

.btn.ghost:hover { background: rgba(45, 212, 191, 0.08); }

/* ---- Sections ---- */
section {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem clamp(1.25rem, 4vw, 2rem);
}

/* Anchor atlamalarında başlık sticky menünün altına girmesin */
section[id] { scroll-margin-top: 84px; }

h2 {
  font-size: 1.05rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

h2::before { content: "// "; color: var(--muted); }

h2.sub { margin-top: 2.75rem; font-size: 0.95rem; }

section p { color: var(--muted); margin-bottom: 1rem; }

/* ---- Timeline ---- */
.timeline { list-style: none; }

.job {
  position: relative;
  border-left: 2px solid var(--border);
  padding: 0 0 2.25rem 1.5rem;
}

.job:last-child { padding-bottom: 0.5rem; }

.job::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.job h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.job .role { color: var(--text); }
.job .company { color: var(--accent); }

.job-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

/* İş alt grupları (2026-09-11, Kaan onayı) */
.job-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 1.4rem 0 0.6rem;
}

.job-sub:first-of-type { margin-top: 0.2rem; }

.job ul { list-style: none; }

.job li {
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.45rem;
  font-size: 0.97rem;
}

.job li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 2px;
}

/* ---- Skills ---- */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.skill-card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; }

.chips li {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.85rem;
  color: var(--text);
}

/* ---- Education ---- */
.edu-item { margin-bottom: 1.25rem; }

.edu-item h3 { font-size: 1.08rem; margin-bottom: 0.15rem; }

.edu-note { font-size: 0.85rem; margin-top: 0.5rem; }

.lang-list { list-style: none; }
.lang-list li {
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.35rem;
}
.lang-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
  top: 2px;
}

/* ---- Contact ---- */
.contact-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1.25rem;
}

#contact .mono { font-size: 0.85rem; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.75rem clamp(1.25rem, 4vw, 2rem);
  text-align: center;
}

footer p { color: var(--muted); font-size: 0.85rem; }

/* ---- Small screens ---- */
@media (max-width: 640px) {
  /* Menü: hamburger yerine yatay kaydırılabilir şerit (Kaan onayı, 2026-09-08) */
  nav { flex-wrap: wrap; padding-bottom: 0.55rem; }
  .lang-switch { margin-inline-start: auto; }
  .nav-links {
    display: flex;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 1.1rem;
    padding-bottom: 0.35rem;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { display: inline-block; white-space: nowrap; }
}
