/* ==========================================================
   Yonca Keşkek Türk — Academic website
   Two-column layout, burgundy & gold theme
   ========================================================== */

:root {
  /* Burgundy & gold */
  --bg: #faf6f0;
  --heading: #2a1418;
  --text: #5a4347;
  --muted: #998287;
  --accent: #8c1c2c;           /* text accent */
  --rgb: 140, 28, 44;          /* accent as r, g, b */
  --gradient: linear-gradient(135deg, #b4233a 0%, #8c1c2c 55%, #c8963e 100%);
  --blob1: #f2c9cf;
  --blob2: #f3dfb8;
  --blob3: #ead7d9;
  --blob-opacity: 0.55;
  --surface: rgba(255, 255, 255, 0.7);
  --chip-bg: rgba(var(--rgb), 0.1);
  --hover-bg: var(--surface);
  --border: rgba(var(--rgb), 0.16);
}

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

html { scroll-behavior: auto; } /* in-page smooth scroll is handled in main.js */

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: rgba(var(--rgb), 0.28); color: var(--heading); }

a { color: var(--heading); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Language switching ----------
   Every translatable text is written twice:
   <span lang="en">…</span><span lang="tr">…</span> */
html[data-lang="en"] [lang="tr"]:not(html),
html[data-lang="tr"] [lang="en"]:not(html) {
  display: none !important;
}

/* ---------- Animated background ---------- */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.bg-blobs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: var(--blob-opacity);
  animation: drift 22s ease-in-out infinite alternate;
}
.bg-blobs span:nth-child(1) { width: 520px; height: 520px; background: var(--blob1); top: -160px; left: -120px; }
.bg-blobs span:nth-child(2) { width: 460px; height: 460px; background: var(--blob2); bottom: -180px; right: -100px; animation-delay: -7s; }
.bg-blobs span:nth-child(3) { width: 340px; height: 340px; background: var(--blob3); top: 40%; left: 45%; opacity: calc(var(--blob-opacity) * 0.5); animation-delay: -14s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-blobs span { animation: none; }
}

.spotlight {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(600px at 50% 30%, rgba(var(--rgb), 0.12), transparent 80%);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout ---------- */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 64px;
}

/* Left column — sticky */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 56px 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.lang-switch button {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.2s;
}
.lang-switch button:hover { color: var(--heading); }
.lang-switch button.active { background: var(--gradient); color: #fff; }

.portrait {
  height: min(280px, 26vh);
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  padding: 3px;
  background: var(--gradient);
  margin-bottom: 24px;
  box-shadow: 0 18px 40px -20px rgba(var(--rgb), 0.6);
}
.portrait img {
  width: 100%;
  height: 100%;
  border-radius: 17px;
  object-fit: cover;
  object-position: 50% 20%;
}

.sidebar h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--heading);
}
.sidebar .title {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 600;
}
.sidebar .tagline {
  margin-top: 14px;
  max-width: 340px;
}

/* Scroll-spy nav */
.nav { margin-top: 36px; list-style: none; }
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav a::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--muted);
  transition: all 0.25s ease;
}
.nav a:hover,
.nav a.active { color: var(--heading); }
.nav a:hover::before,
.nav a.active::before {
  width: 64px;
  height: 2px;
  background: var(--gradient);
}

/* Social icons */
.socials { display: flex; gap: 18px; list-style: none; align-items: center; }
.socials a {
  color: var(--muted);
  display: inline-flex;
  transition: color 0.2s, transform 0.2s;
}
.socials a:hover { color: var(--accent); transform: translateY(-3px); }
.socials svg { width: 22px; height: 22px; fill: currentColor; }

/* Right column — content */
.content { padding: 96px 0; }

section { margin-bottom: 120px; scroll-margin-top: 96px; }

/* Section headings (desktop) */
@media (min-width: 1001px) {
  .content .section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
    text-transform: none;
    color: var(--accent);
    margin-bottom: 24px;
  }
  .content .section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
    opacity: 0.25;
  }
}

.section-title {
  display: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: 28px;
}

.content p { margin-bottom: 16px; }
.content strong, .hl { color: var(--heading); font-weight: 600; }

.placeholder {
  border-bottom: 1px dashed rgba(var(--rgb), 0.5);
  font-style: italic;
}

.subhead {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 36px 0 14px;
}

/* ---------- Cards (experience / projects / publications) ---------- */
.cards { list-style: none; display: grid; gap: 12px; }
.cards:hover .entry { opacity: 0.55; }
.cards .entry:hover { opacity: 1; }

.entry {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.entry:hover {
  background: var(--hover-bg);
  border-color: var(--border);
  box-shadow: 0 12px 30px -16px rgba(var(--rgb), 0.45);
}
.entry .when {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}
.entry h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.4;
}
.entry h3 .arrow { display: inline-block; transition: transform 0.2s; }
.entry:hover h3 { color: var(--accent); }
.entry:hover h3 .arrow { transform: translate(3px, -3px); }
.entry .sub { color: var(--muted); font-size: 15px; }
.entry p { font-size: 14px; margin: 8px 0 0; }

/* Institution logos and links */
.org-logo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  padding: 3px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.org-logo img { width: 100%; height: 100%; object-fit: contain; }
.org-logo:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(var(--rgb), 0.6); }
.org-logo.small { display: inline-grid; width: 22px; height: 22px; padding: 2px; border-radius: 6px; margin: 0 6px 0 0; vertical-align: -6px; }
.org-link {
  position: relative;
  z-index: 1;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(var(--rgb), 0.3);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.org-link:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Whole card clickable when it has a main link */
.entry a.stretched::after { content: ''; position: absolute; inset: 0; }

.thumb {
  width: 120px;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--gradient);
  opacity: 0.6;
  object-fit: cover;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; list-style: none; }
.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--chip-bg);
  color: var(--accent);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-weight: 600;
  color: var(--heading);
}
.more-link span.arrow { transition: transform 0.2s; }
.more-link:hover { color: var(--accent); }
.more-link:hover span.arrow { transform: translateX(4px); }

/* ---------- Contact ---------- */
.contact-lines { list-style: none; display: grid; gap: 6px; margin-bottom: 28px; }
.contact-lines a { color: var(--accent); }

.contact-form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--heading); }
.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--heading);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--rgb), 0.18);
}

.btn {
  justify-self: start;
  border: none;
  border-radius: 9999px;
  padding: 12px 30px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  background-size: 200% 200%;
  cursor: pointer;
  transition: background-position 0.4s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -10px rgba(var(--rgb), 0.55);
}

/* ---------- Publication filters (full list page) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filters button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 9999px;
  cursor: pointer;
}
.filters button.active { background: var(--gradient); color: #fff; border-color: transparent; }

.back-link { display: inline-block; margin-bottom: 24px; font-weight: 600; color: var(--accent); }

.page-single { max-width: 860px; margin: 0 auto; padding: 80px 24px; }
.page-single h1 { font-size: 40px; font-weight: 800; color: var(--heading); letter-spacing: -1px; margin-bottom: 8px; }
.year { font-size: 18px; font-weight: 700; margin: 32px 0 8px; }

footer.note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
footer.note .divider {
  width: 1px;
  height: 14px;
  margin: 0 10px;
  background: var(--border);
}
footer.note .credit {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(var(--rgb), 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
footer.note .credit:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding: 0 24px; }
  .sidebar { position: static; height: auto; padding: 64px 0 24px; }
  .nav { display: none; }
  .socials { margin-top: 28px; }
  .content { padding: 24px 0 64px; }
  section { margin-bottom: 80px; scroll-margin-top: 24px; }
  .content .section-title {
    display: block;
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -24px 20px;
    padding: 16px 24px;
    background: var(--bg);
    opacity: 0.95;
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 600px) {
  .sidebar h1 { font-size: 34px; }
  .portrait { height: 260px; }
  .entry { grid-template-columns: 1fr; gap: 6px; padding: 16px; }
  .entry .thumb { order: 2; }
  .form-row { grid-template-columns: 1fr; }
}
