@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
@import 'variables.css';
@import 'components.css';
@import 'responsive.css';

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-main);
  background: var(--bg-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  transition: background-color var(--transition), color var(--transition);
}

/* Responsive images - prevent overflow */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Prevent long text/URLs from overflowing */
p, .hero-desc, .about-lead, .meta, .pub-card strong {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1, h2, h3, h4, h5, h6 { color: var(--text-main); }
p, li, .meta, .subtitle { color: var(--text-soft); }
.small, .caption { color: var(--text-muted); }

/* No overlay on body - gradients removed to prevent any wash-out effect on main content */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-on);
  z-index: 200;
  font-size: var(--text-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ========== LAYOUT: Sidebar + Main ========== */
.app-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  min-width: 0;
}

/* ========== LEFT SIDEBAR (Fixed) ========== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 40;
}
.sidebar-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 2rem auto 1rem;
  border: 3px solid rgba(45, 212, 191, 0.6);
  flex-shrink: 0;
}
.sidebar-photo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-header { display: contents; }
.sidebar-name {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  color: var(--text-main);
  padding: 0 1rem;
  line-height: 1.3;
}
.sidebar-title {
  font-size: var(--text-sm);
  color: var(--accent);
  text-align: center;
  margin-top: 0.25rem;
  padding: 0 1rem;
}
.sidebar-domains {
  font-size: var(--text-xs);
  color: var(--text-soft);
  text-align: center;
  margin-top: 0.5rem;
  padding: 0 1rem;
  line-height: 1.5;
}
.sidebar-metrics {
  margin: 1.5rem 1.25rem;
  padding: 1rem;
  background: var(--panel-strong);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.sidebar-metrics-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-metrics-row:last-child { border-bottom: none; }
.sidebar-metrics .label { color: var(--text-soft); font-weight: 600; }
.sidebar-metrics .value { color: var(--text-main); font-weight: 700; }
.sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.25rem 1rem;
}
.sidebar-buttons .btn { width: 100%; justify-content: center; }
.sidebar-institution {
  padding: 1rem 1.25rem;
  font-size: var(--text-xs);
  color: var(--text-soft);
  border-top: 1px solid var(--border-soft);
}
.sidebar-institution strong { color: var(--text-main); display: block; margin-bottom: 0.25rem; }
.sidebar-nav {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-soft);
}
.sidebar-nav a {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--text-sm);
  color: var(--text-soft);
  text-decoration: none;
  transition: color var(--transition);
  border-left: 3px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}
.sidebar-nav a:hover { color: var(--accent); }
.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* ========== MAIN CONTENT ========== */
/* Solid dark background - NO opacity, NO white overlay on content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
  width: 100%;
  background: var(--panel);
  position: relative;
  z-index: 1;
}

/* ========== TOP NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  background: var(--panel);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.navbar-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.navbar-links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
}
.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.navbar-links a:hover,
.navbar-links a.active { color: var(--accent); }
.navbar-links a:hover::after,
.navbar-links a.active::after { width: 100%; }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.navbar-actions > a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 1.2rem;
}
.navbar-actions > a:hover { color: var(--accent); }
.navbar-actions .btn-sm { padding: 0.4rem 0.9rem; font-size: var(--text-xs); }
.lang-toggle, .theme-toggle {
  padding: 0.45rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-main);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-toggle:hover, .theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-subtle); }
.lang-toggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ========== SECTIONS ========== */
.section {
  padding: var(--section-spacing) clamp(1rem, 4vw, 2rem);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

/* ========== HERO (Right content) ========== */
.hero-section {
  padding: 4rem clamp(1rem, 4vw, 2rem) 5rem;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.hero-eyebrow {
  font-size: var(--text-sm);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: var(--hero-title);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
}
.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-main);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 1.5rem;
}
.hero-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  font-size: var(--text-base);
  color: var(--text-main);
  font-weight: 600;
}
.hero-metrics-row span { display: flex; align-items: center; gap: 0.5rem; }
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ========== ABOUT ========== */
.about-lead {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--text-soft);
  margin-bottom: 1rem;
}
.about-focus { font-weight: 600; color: var(--text-main); margin-bottom: 0.5rem; }
.about-bullets { list-style: none; }
.about-bullets li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-soft);
}
.about-bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2em;
}

/* ========== RESEARCH AREAS (Cards) ========== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.research-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
  color: var(--text-soft);
}
.research-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.research-card .icon { font-size: 1.5rem; margin-bottom: 0.5rem; opacity: 1; }

/* ========== PUBLICATIONS (Cards) ========== */
.pub-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}
.pub-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.pub-card strong { font-size: var(--text-base); display: block; margin-bottom: 0.5rem; color: var(--text-main); }
.pub-card .meta { font-size: var(--text-sm); color: var(--text-soft); }
.pub-card .meta .cite { color: var(--accent); font-weight: 700; }
.pub-card .tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 6px;
  margin-top: 0.5rem;
}

/* ========== IMPACT TABLE ========== */
.impact-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.impact-table { width: 100%; }
.impact-table td {
  padding: 0.75rem 0;
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border-soft);
}
.impact-table tr:last-child td { border-bottom: none; }
.impact-table td:first-child { color: var(--text-soft); }
.impact-table td:last-child { text-align: right; font-weight: 700; color: var(--text-main); }

/* ========== TIMELINE ========== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-soft);
  align-items: start;
  min-width: 0;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-year {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--accent);
}
.timeline-content {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.timeline-content strong { display: block; margin-bottom: 0.25rem; color: var(--text-main); }
.timeline-content p { font-size: var(--text-sm); color: var(--text-soft); }

/* ========== EDITORIAL / CONTACT ========== */
.editorial-card, .contact-card {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--text-soft);
}
.contact-card a { color: var(--accent); text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

/* ========== FOOTER ========== */
.footer {
  padding: 3rem clamp(1rem, 4vw, 2rem);
  width: 100%;
  max-width: 100%;
  background: var(--panel);
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.footer-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
  box-sizing: border-box;
}
.footer-brand strong { display: block; font-size: var(--text-base); color: var(--text-main); }
.footer-brand p { font-size: var(--text-sm); color: var(--text-soft); margin-top: 0.25rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-soft); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
.footer-links a:hover { color: var(--accent); }
.footer-contact strong { color: var(--text-main); }
.footer-contact a,
.footer-contact p { color: var(--text-soft); }
.footer-copy { text-align: center; font-size: var(--text-sm); color: var(--text-soft); }

/* ========== UTILITIES ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 3px;
  background: var(--border-soft);
  z-index: 60;
}
.scroll-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.05s ease;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 45;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); color: var(--accent-on); transform: translateY(-4px); }

/* ========== PAGES LAYOUT (arastirma, yayinlar, etc.) ========== */
.main-wrap { min-height: 100vh; background: var(--bg-main); display: flex; flex-direction: column; }
.main-wrap .scroll-progress { left: 0; }
.header { flex-shrink: 0; background: var(--panel); border-bottom: 1px solid var(--border-soft); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
  color: var(--text-main);
}
.nav-logo { font-family: var(--font-serif); font-weight: 700; font-size: var(--text-lg); text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.nav-links a { text-decoration: none; font-size: var(--text-sm); font-weight: 500; transition: color var(--transition); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-icon { color: var(--text-soft); font-size: 1.2rem; text-decoration: none; transition: color var(--transition); }
.nav-icon:hover { color: var(--accent); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border-radius: var(--radius);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: none;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 0.5rem 0.75rem; border-radius: 8px; }
.nav-dropdown-menu a:hover { background: var(--accent-subtle); color: var(--accent); }
.main-wrap main { flex: 1; padding: 3rem 2rem; }
.main-wrap .section { padding: 0; max-width: var(--content-max); margin: 0 auto; }
.main-wrap .container { max-width: 100%; }
.card { background: var(--panel-strong); border: 1px solid var(--border); color: var(--text-soft); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; transition: all var(--transition); }
.card:hover { border-color: var(--border); }
.container { color: var(--text-main); }

/* ========== PUBLICATIONS PAGE ========== */
.pub-search-wrap { margin-bottom: 1rem; }
.search-box {
  width: 100%;
  max-width: 420px;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 1rem center;
}
.search-box::placeholder { color: var(--text-muted); }
.search-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.pub-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn.active { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.pub-result-count { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 1.5rem; }
.publication-item { display: block; }
.publication-item strong { font-size: var(--text-base); color: var(--text-main); display: block; margin-bottom: 0.5rem; line-height: 1.4; }
.publication-item .meta { font-size: var(--text-sm); color: var(--text-soft); margin: 0.25rem 0 0.5rem; }
.publication-item .cite { font-size: var(--text-sm); color: var(--accent); font-weight: 600; display: inline-block; margin-top: 0.25rem; }
.publication-item .topics { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }
.topic-tag { font-size: 0.7rem; padding: 0.2rem 0.5rem; background: var(--accent-subtle); color: var(--accent); border-radius: 6px; }
.publication-item .pub-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.pub-empty { text-align: center; padding: 4rem 2rem; color: var(--text-muted); font-size: var(--text-lg); }
