/* ============================================================
   YUSUF MAGIYA — Academic Website
   Inspired by: serkantadiguzel.com (Minimal Mistakes / AcademicPages)
   Layout: Top masthead nav + left sidebar + main content
   Fonts: Source Serif 4 + Source Sans 3
   ============================================================ */

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

:root {
  --white:       #ffffff;
  --page-bg:     #ffffff;
  --sidebar-bg:  #f2f3f3;
  --ink:         #222222;
  --ink-2:       #494e52;
  --ink-3:       #6f777d;
  --ink-4:       #adb5bd;
  --accent:      #1a5276;
  --accent-hover:#154360;
  --link:        #1a5276;
  --border:      #dee2e6;
  --sidebar-w:   260px;
  --content-max: 800px;
  --serif:       'Source Serif 4', 'Georgia', serif;
  --sans:        'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink-2);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }

/* ============================================================
   MASTHEAD (top nav bar)
   ============================================================ */
.masthead {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.masthead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead-title {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.masthead-title:hover { text-decoration: none; color: var(--ink); }

.masthead-nav {
  display: flex;
  gap: 0;
}

.masthead-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.masthead-nav a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.masthead-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================================
   PAGE LAYOUT: sidebar + content
   ============================================================ */
.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 3rem;
  align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 76px;
}

.sidebar-profile {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
}

/* Photo */
.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  border: 3px solid var(--border);
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-initials {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink-3);
}

.sidebar-name {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.sidebar-role {
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.5;
  margin-bottom: 0.1rem;
}

/* Contact list */
.sidebar-contact {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.sidebar-contact li svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--ink-4);
}

.sidebar-contact li a {
  color: var(--ink-3);
  font-size: 0.8rem;
}
.sidebar-contact li a:hover { color: var(--accent); }

/* Social follow links */
.sidebar-follow {
  margin-top: 1.2rem;
}

.sidebar-follow-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  margin-bottom: 0.5rem;
}

.sidebar-follow-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-follow-links a {
  font-size: 0.8rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-follow-links a:hover { color: var(--accent); text-decoration: none; }
.sidebar-follow-links a svg { width: 14px; height: 14px; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  min-width: 0;
  max-width: var(--content-max);
}

.main-content h1 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.main-content h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.main-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.2rem;
}

.main-content p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink-2);
  margin-bottom: 1rem;
}

.main-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.main-content ul li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 0.25rem;
}

/* ============================================================
   RESEARCH PAGE — publication entries
   ============================================================ */
.pub-list {
  list-style: none;
  padding: 0;
}

.pub-entry {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-entry:first-child { border-top: 1px solid var(--border); }

.pub-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.88rem;
  color: var(--ink-3);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-venue span {
  font-style: normal;
  color: var(--ink-3);
}

.pub-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.4rem;
}

.pub-status.rr   { background: #fef9e7; color: #9a7d0a; border: 1px solid #f9e79f; }
.pub-status.ur   { background: #eaf4fb; color: #1a6fa8; border: 1px solid #aed6f1; }
.pub-status.pub  { background: #eafaf1; color: #1e8449; border: 1px solid #a9dfbf; }

.pub-abstract {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--ink-3);
  margin: 0.5rem 0 0.6rem;
  display: none;
}

.pub-abstract.open { display: block; }

.pub-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.pub-actions a, .pub-actions button {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}

.pub-actions a:hover, .pub-actions button:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   TEACHING PAGE
   ============================================================ */
.teaching-block {
  margin-bottom: 2rem;
}

.teaching-block h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.course-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
}

.course-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.course-name {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.course-meta {
  font-size: 0.82rem;
  color: var(--ink-3);
  margin-bottom: 0.3rem;
}

.course-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.course-links a {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--ink-2);
  background: var(--white);
  transition: background 0.12s, color 0.12s;
}
.course-links a:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   CV PAGE
   ============================================================ */
.cv-download-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.cv-download-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.cv-download-btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: var(--white);
}

.cv-section {
  margin-bottom: 2.5rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.7;
}
.cv-entry:first-of-type { border-top: 1px solid var(--border); }

.cv-year {
  font-size: 0.8rem;
  color: var(--ink-4);
  padding-top: 0.15rem;
  white-space: nowrap;
}

.cv-detail strong { color: var(--ink); font-weight: 700; }
.cv-detail em { font-style: italic; }
.cv-detail { color: var(--ink-2); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-top: 2rem;
}


footer a { color: var(--ink-4); }
footer a:hover { color: var(--accent); }


.no-lines .course-item {
  border-bottom: none;
  padding: 0.3rem 0;
}
.no-lines .course-list {
  border-top: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem 3rem;
  }

  .sidebar {
    position: static;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
  }

  .sidebar-profile { text-align: left; display: flex; gap: 1.2rem; align-items: flex-start; }
  .profile-photo { width: 72px; height: 72px; flex-shrink: 0; margin: 0; }
  .profile-photo-initials { font-size: 1.2rem; }

  .masthead-nav a { padding: 0 0.6rem; font-size: 0.75rem; }

  .cv-entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .cv-year { color: var(--ink-3); }
}
