:root {
  --bg-body: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --text-main: #212529;
  --text-muted: #6c757d;
  --border: #dee2e6;
  --accent: #0d9488; 
  --accent-hover: #0f766e;
  --accent-light: rgba(13, 148, 136, 0.1);
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --radius: 8px;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --header-h: 70px;
  --status-ongoing-bg: #dcfce7; --status-ongoing-text: #166534;
  --status-done-bg: #f1f5f9; --status-done-text: #475569;
}

[data-theme="dark"] {
  --bg-body: #121212; --bg-card: #1e1e1e; --bg-hover: #2d2d2d;
  --text-main: #e0e0e0; --text-muted: #a0a0a0; --border: #333333;
  --accent: #2dd4bf; --accent-hover: #5eead4; --accent-light: rgba(45, 212, 191, 0.15);
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --status-ongoing-bg: #064e3b; --status-ongoing-text: #6ee7b7;
  --status-done-bg: #334155; --status-done-text: #94a3b8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-main);
  background-color: var(--bg-body); color: var(--text-main);
  line-height: 1.6; padding-top: var(--header-h);
  transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; color: var(--accent); font-weight: 500; transition: 0.2s; }
a:hover { color: var(--accent-hover); }

.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  z-index: 1000; display: flex; align-items: center; padding: 0 5%;
  box-shadow: var(--shadow);
}
.header-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: flex-end; 
}
.actions { display: flex; align-items: center; gap: 12px; }

.search-box { position: relative; width: 250px; }
.search-box input {
  width: 100%; padding: 8px 12px 8px 35px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-body);
  color: var(--text-main); outline: none; transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--accent); }
.search-box i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px;
}
.btn-icon {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-body); color: var(--text-main); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--accent); }

.container {
  max-width: 1200px; margin: 30px auto; padding: 0 20px;
  display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start;
}

.profile-card { position: sticky; top: 100px; text-align: center; }
.avatar {
  width: 140px; height: 140px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--bg-hover); border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 40px; font-weight: 600; color: var(--accent);
  overflow: hidden; 
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.name { margin: 0 0 5px; font-size: 24px; font-weight: 700; }
.title { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; }

.social-links { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; width: 100%; margin: 0 0 30px 0; }
.social-btn {
  width: 100%; aspect-ratio: 1; border-radius: 8px; 
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: 0.2s; font-size: 20px;
}
.social-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }

.nav-menu { text-align: left; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; width: 100%; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  color: var(--text-muted); font-size: 14px; border-bottom: 1px solid var(--border);
  transition: 0.2s; cursor: pointer;
}
.nav-item:last-child { border-bottom: none; }
.nav-item:hover, .nav-item.active { background: var(--bg-hover); color: var(--accent); font-weight: 500; }
.nav-item i { width: 20px; text-align: center; }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; margin-bottom: 30px; scroll-margin-top: 100px;
}
.section-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.section-header h2 { margin: 0; font-size: 18px; font-weight: 600; }
.section-header i { color: var(--accent); font-size: 18px; }

#txt-about { text-align: justify; text-justify: inter-word; }

.timeline-item, .project-item { 
  position: relative; 
  padding-left: 20px; 
  margin-bottom: 20px; 
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border); 
  border-left: none; 
}
.timeline-item:last-child, .project-item:last-child { 
  margin-bottom: 0; padding-bottom: 0; border-bottom: none;
}
.timeline-item::before, .project-item::before { 
  content: ''; position: absolute; left: 0; top: 8px; 
  width: 10px; height: 10px; border-radius: 50%; 
  background: var(--accent); display: block;
}

.project-content, .timeline-content { width: 100%; }
.project-header { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 12px; margin-bottom: 5px; }
.project-title, .tl-title { font-size: 16px; font-weight: 600; margin: 0; color: var(--text-main); min-width: 0; overflow-wrap: break-word; }

.badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
  display: inline-block; text-transform: uppercase; letter-spacing: 0.5px;
  justify-self: end; white-space: nowrap; 
  min-width: 85px; text-align: center;
}
.badge-ongoing { background: var(--status-ongoing-bg); color: var(--status-ongoing-text); }
.badge-completed { background: var(--status-done-bg); color: var(--status-done-text); }

.project-meta, .tl-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 15px; flex-wrap: wrap; }
.project-meta span { display: flex; align-items: center; gap: 5px; }
.project-desc, .tl-desc { font-size: 14px; color: var(--text-main); margin: 0; }

.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-select { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; outline: none; cursor: pointer; height: 32px; }
.btn-reset { height: 32px; padding: 0 12px; border: 1px solid var(--border); background: var(--bg-hover); color: var(--text-muted); border-radius: 6px; cursor: pointer; display: flex; align-items: center; }
.btn-reset:hover { color: var(--accent); border-color: var(--accent); }


.pub-item { 
  padding: 24px; 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  margin-bottom: 15px; 
  background: var(--bg-card); 
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
  position: relative;
  border-left: 4px solid transparent; 
  display: flex;
  flex-direction: column; 
}

.pub-item:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.1); 
  border-color: var(--border); 
  border-left-color: var(--accent); 
}

[data-theme="dark"] .pub-item:hover {
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
}

.pub-title { margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.pub-meta { font-size: 14px; color: var(--text-muted); margin-bottom: 15px; line-height: 1.6; flex-grow: 1; }

.pub-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
  gap: 15px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px dashed var(--border); 
}


.pub-tags { 
  display: flex; 
  gap: 6px; 
  flex-wrap: wrap; 
}

.pub-tag { 
  font-size: 10px; 
  font-weight: 700; 
  padding: 4px 8px; 
  border-radius: 4px; 
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-sci, .tag-sci-e, .tag-sci-expanded { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
[data-theme="dark"] .tag-sci, [data-theme="dark"] .tag-sci-e, [data-theme="dark"] .tag-sci-expanded { background: #0c4a6e; color: #7dd3fc; border-color: #075985; }

.tag-q1, .tag-q2 { background: #f3e8ff; color: #9333ea; border-color: #e9d5ff; }
[data-theme="dark"] .tag-q1, [data-theme="dark"] .tag-q2 { background: #581c87; color: #d8b4fe; border-color: #6b21a8; }

.tag-international, .tag-uluslararası { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
[data-theme="dark"] .tag-international, [data-theme="dark"] .tag-uluslararası { background: #14532d; color: #86efac; border-color: #166534; }

.tag-ulusal, .tag-national, .tag-tr-dizin { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
[data-theme="dark"] .tag-ulusal, [data-theme="dark"] .tag-national, [data-theme="dark"] .tag-tr-dizin { background: #7c2d12; color: #fdba74; border-color: #9a3412; }


.pub-actions { 
  display: flex; 
  gap: 8px; 
  align-items: center; 
}

.btn-sm { padding: 6px 14px; font-size: 12px; font-weight: 600; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-body); color: var(--text-main); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; transition: 0.2s; }
.btn-sm:hover { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 12px var(--accent-light); }


.contact-details { margin-bottom: 20px; font-size: 14px; line-height: 1.8; }
.contact-details .contact-row { display: grid; grid-template-columns: 24px 90px 1fr; column-gap: 10px; align-items: start; margin-top: 6px; }
.contact-details .contact-row:first-child { margin-top: 0; }
.contact-details i { width: 24px; color: var(--accent); text-align: center; margin-right: 0; }
.contact-details strong { color: var(--text-main); display: block; width: auto; white-space: nowrap; }
.contact-details .contact-value { white-space: normal; overflow-wrap: break-word; word-break: normal; }

#map { height: 300px; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); z-index: 1; }
.footer { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 50px; padding-bottom: 30px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(3px); }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--bg-card); width: 700px; max-width: 90%; border-radius: 10px; border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.modal-header { padding: 15px 20px; background: var(--bg-hover); display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--bg-card); }
.tab-btn { flex: 1; padding: 12px; border: none; background: none; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-light); }
.citation-text { padding: 15px; margin: 0; white-space: pre-wrap; background: var(--bg-body); font-family: monospace; font-size: 12px; height: 200px; overflow-y: auto; }
.modal-footer { padding: 15px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

mark { background-color: transparent; color: inherit; padding: 0; font-weight: normal; }

@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; gap: 20px; }
  .profile-card { position: static; width: 100%; margin-bottom: 20px; top: auto; }
  .search-box { display: none; }
  .card { padding: 20px; }
}
