/* =========================================================
   Emircan Gündoğdu — Personal Website
   Layout inspired by https://mattiasegu.github.io
   Typography (font, sizes, weights, colors) follows Frano Rajič:
   https://m43.github.io
   ========================================================= */
@import url('https://fonts.googleapis.com/css?family=Roboto:300,300italic,400,400italic,500,500italic,700,700italic');

:root {
  --text:        #1f1f1f;
  --text-soft:   #444;
  --muted:       #777;
  --link:        #1772d0;
  --link-hover:  #f09228;
  --accent-red:  #e74c3c;
  --border:      #e6e6e6;
  --bg:          #ffffff;
  --max-width:   1100px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
}

p { margin: 0 0 14px; }
strong { font-weight: 400; }
em { font-style: italic; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color .15s ease-in-out;
}
a:hover, a:focus {
  color: var(--link-hover);
}

/* =========================================================
   Top navigation
   ========================================================= */
.topnav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topnav .brand {
  font-weight: 500;
  font-size: 17px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.topnav nav a {
  margin-left: 28px;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
}
.topnav nav a:hover { color: var(--link-hover); }
.topnav nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--link);
  padding-bottom: 2px;
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 32px 80px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 56px;
  align-items: start;
}

/* =========================================================
   Sidebar
   ========================================================= */
.sidebar {
  position: sticky;
  top: 88px;
  font-size: 14px;
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 22px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
  border: 1px solid var(--border);
}

.sidebar h1 {
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.2;
}

.sidebar .tagline {
  color: var(--text-soft);
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 300;
}

.sidebar ul.links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul.links li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
}

.sidebar ul.links li .ico {
  width: 18px;
  display: inline-flex;
  justify-content: center;
  color: var(--text-soft);
  flex-shrink: 0;
}

.sidebar ul.links a {
  color: var(--text);
  font-weight: 400;
}
.sidebar ul.links a:hover { color: var(--link-hover); }

/* =========================================================
   Main content
   ========================================================= */
.content section {
  margin-bottom: 44px;
}

.content h2 {
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.content p {
  margin: 0 0 14px;
  text-align: justify;
  color: var(--text);
}

/* Logo strip */
.logo-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 12px;
  margin-bottom: 22px;
}
.logo-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  filter: grayscale(20%);
  opacity: 0.92;
  transition: filter .15s ease, opacity .15s ease, transform .15s ease;
}
.logo-strip a:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-1px);
}
.org-logo {
  display: block;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}
.org-logo.small {
  max-height: 78%;
  max-width: 78%;
}

/* Below ~620px the strip starts to feel cramped — wrap to two rows */
@media (max-width: 620px) {
  .logo-strip { flex-wrap: wrap; gap: 12px 16px; }
  .logo-strip a { flex: 0 0 auto; width: 110px; }
}

/* News list */
.news-list {
  list-style: disc;
  padding-left: 22px;
  margin: 0;
}
.news-list li {
  margin-bottom: 8px;
  color: var(--text);
}
.news-list .date {
  font-weight: 400;
  color: var(--text);
}

/* Publications */
.pub {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px dashed var(--border);
}
.pub:last-child { border-bottom: none; }

.pub .pub-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  object-fit: cover;
  background: #f4f4f6;
  border: 1px solid var(--border);
  display: block;
}

.pub .pub-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  background: linear-gradient(135deg, #eef3fb 0%, #f7f1ff 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6786;
  font-weight: 400;
  font-size: 13px;
  text-align: center;
  padding: 8px;
  letter-spacing: 0.3px;
}

.pub .pub-title {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  margin: 0 0 4px;
}
.pub .authors {
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  margin: 0 0 4px;
}
.pub .authors .me {
  font-weight: 400;
}
.pub .venue {
  font-size: 15px;
  font-weight: 300;
  color: var(--text);
  margin: 0 0 8px;
}
.pub .badge {
  display: inline;
  margin-left: 6px;
  font-weight: 700;
  color: var(--accent-red);
}
.pub .badge::before { content: "("; color: var(--text); }
.pub .badge::after  { content: ")"; color: var(--text); }
.pub .abs {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-soft);
  text-align: justify;
  margin: 0 0 10px;
  line-height: 1.55;
}
.pub .pub-links {
  font-size: 14px;
  color: var(--muted);
}
.pub .pub-links a {
  margin-right: 4px;
}

/* Experience / Teaching / Projects / Education */
.exp-item, .proj-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.exp-item:last-child, .proj-item:last-child { border-bottom: none; }

.exp-item .role, .proj-item .role {
  font-weight: 500;
  color: var(--text);
}
.exp-item .org, .proj-item .org {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 300;
}
.exp-item .desc, .proj-item .desc {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 300;
  margin-top: 4px;
  line-height: 1.5;
}
.exp-item .meta, .proj-item .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  white-space: nowrap;
}
.exp-item .location, .proj-item .location {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}
.exp-item .date, .proj-item .date {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
  font-style: italic;
}
.exp-item .entry-link, .proj-item .entry-link {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.exp-item .entry-link a, .proj-item .entry-link a {
  margin-right: 4px;
}

/* Travel map */
.travel-map {
  width: 100%;
  height: 420px;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-top: 8px;
  margin-bottom: 14px;
  background: #ffffff;
  overflow: hidden;
}
.travel-map .leaflet-container {
  background: #ffffff;
  cursor: default;
  font-family: 'Roboto', sans-serif;
}
.travel-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 13px;
}
.travel-list li {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: #fafbfd;
}
/* Make Leaflet popup typography match the site */
.leaflet-popup-content {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  margin: 8px 12px;
}
.leaflet-popup-content strong { font-weight: 500; }

/* Photo grid */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.photo {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}
.photo figcaption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}
.photos-empty {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}
.photos-empty code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-style: normal;
  font-size: 13px;
  background: #f3f4f7;
  padding: 1px 6px;
  border-radius: 3px;
}

/* Awards */
.awards-list {
  list-style: disc;
  padding-left: 22px;
  margin: 0;
}
.awards-list li {
  margin-bottom: 8px;
  color: var(--text);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px) {
  .container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 20px 60px;
  }
  .sidebar {
    position: static;
    text-align: center;
  }
  .sidebar ul.links li {
    justify-content: center;
  }
  .pub {
    grid-template-columns: 1fr;
  }
  .pub .pub-thumb, .pub .pub-thumb-placeholder {
    max-width: 320px;
    margin: 0 auto;
  }
  .topnav-inner {
    flex-direction: column;
    gap: 6px;
    padding: 14px 20px;
  }
  .topnav nav a:first-child { margin-left: 0; }
  .exp-item, .proj-item {
    grid-template-columns: 1fr;
  }
  .exp-item .date {
    margin-top: 2px;
  }
}
