/* ==========================================================================
   Custom Styles - Modern Academic Theme
   Inspired by fadhil.id - Clean, minimal, professional
   ========================================================================== */

/* --- Global Typography & Colors --- */

:root {
  --accent-blue: #0277BD;
  --accent-blue-light: #e3f2fd;
  --accent-orange: #F37626;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a9a;
  --bg-white: #ffffff;
  --bg-light: #f8f9fc;
  --bg-card: #ffffff;
  --border-light: #e8eaf0;
  --border-subtle: #f0f1f5;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --transition: all 0.25s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Masthead / Navigation --- */

.masthead {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.masthead__inner-wrap {
  font-family: 'Inter', sans-serif !important;
}

.greedy-nav a {
  font-family: 'Inter', sans-serif !important;
  font-weight: 500;
  color: var(--text-primary) !important;
  transition: var(--transition);
  letter-spacing: -0.01em;
}

.greedy-nav a:hover {
  color: var(--accent-blue) !important;
}

.greedy-nav .masthead__menu-item--lg a {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--text-primary) !important;
}

/* --- Main Content Area --- */

#main {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-top: 2em;
  padding: 2em;
}

@media (min-width: 925px) {
  #main {
    padding: 2.5em 3em;
  }
}

/* --- Author Sidebar --- */

.sidebar .author__avatar img {
  border-radius: 50%;
  border: 3px solid var(--border-light) !important;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.sidebar .author__avatar img:hover {
  border-color: var(--accent-blue) !important;
  box-shadow: var(--shadow-md);
}

.sidebar .author__name {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar .author__bio {
  font-family: 'Inter', sans-serif !important;
  color: var(--text-secondary);
  font-size: 0.88em;
  line-height: 1.5;
}

.author__urls a {
  font-family: 'Inter', sans-serif !important;
  color: var(--text-secondary) !important;
  font-size: 0.88em !important;
  transition: var(--transition);
}

.author__urls a:hover {
  color: var(--accent-blue) !important;
}

.author__urls li i {
  color: var(--text-muted);
}

/* --- Page Title --- */

.page__title {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  font-size: 1.8em;
  margin-bottom: 0.5em;
}

/* --- Page Content --- */

.page__content {
  font-family: 'Inter', sans-serif !important;
  line-height: 1.7;
  color: var(--text-secondary);
}

.page__content p {
  font-size: 0.95em;
  line-height: 1.75;
}

.page__content a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.page__content a:hover {
  border-bottom-color: var(--accent-blue);
}

/* --- Section Headings --- */

.page__content h1 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700;
  font-size: 1.4em;
  color: var(--text-primary);
  margin-top: 2em;
  margin-bottom: 0.8em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--accent-blue);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

.page__content h2 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600;
  font-size: 1.2em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.4em;
  margin-top: 1.5em;
  letter-spacing: -0.01em;
}

/* --- News Section --- */

.news-section {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1.2em 1.5em;
  margin-top: 0.5em;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
}

.news-section::-webkit-scrollbar {
  width: 4px;
}

.news-section::-webkit-scrollbar-track {
  background: transparent;
}

.news-section::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  padding: 0.7em 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: rgba(2, 119, 189, 0.03);
  border-radius: var(--radius-sm);
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.news-date {
  flex-shrink: 0;
  width: 90px;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  padding: 0.3em 0.6em;
  border-radius: var(--radius-sm);
  text-align: center;
  white-space: nowrap;
  margin-top: 0.1em;
}

.news-content {
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 1.5;
}

.news-content a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.news-content a:hover {
  border-bottom-color: var(--accent-blue);
}

/* --- Publications Section --- */

table.pub-table,
table.pub-table td,
table.pub-table tr {
  border: none !important;
}

.pub-card {
  display: flex;
  gap: 1em;
  padding: 1.2em 1.5em;
  margin-bottom: 0.8em;
  background: var(--bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-blue);
  transition: var(--transition);
}

.pub-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-orange);
  transform: translateY(-1px);
}

.pub-venue {
  flex-shrink: 0;
  min-width: 90px;
  text-align: right;
  padding-right: 1em;
  border-right: 2px solid var(--border-light);
}

.pub-venue-badge {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 700;
  color: var(--accent-blue);
  background: var(--accent-blue-light);
  padding: 0.35em 0.8em;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pub-details {
  flex: 1;
}

.pub-title {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--text-primary);
  margin-bottom: 0.3em;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-bottom: 0.3em;
  line-height: 1.5;
}

.pub-authors sub {
  font-size: 0.85em;
  color: var(--text-muted);
  font-style: italic;
}

.pub-status {
  font-size: 0.8em;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Teaching Section --- */

.teaching-list {
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0 0;
}

.teaching-item {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 0.9em 1.2em;
  margin-bottom: 0.5em;
  background: var(--bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.teaching-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--accent-blue);
}

.teaching-role {
  flex-shrink: 0;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--bg-white);
  background: var(--accent-blue);
  padding: 0.3em 0.7em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.teaching-details {
  flex: 1;
}

.teaching-course {
  font-weight: 500;
  font-size: 0.92em;
  color: var(--text-primary);
}

.teaching-course a {
  color: var(--accent-blue);
  text-decoration: none;
}

.teaching-course a:hover {
  border-bottom: 1px solid var(--accent-blue);
}

.teaching-meta {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-top: 0.15em;
}

/* --- Footer --- */

.page__footer {
  background: var(--text-primary);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif !important;
}

.page__footer footer {
  font-family: 'Inter', sans-serif !important;
}

/* --- Responsive Tweaks --- */

@media (max-width: 600px) {
  .pub-card {
    flex-direction: column;
    gap: 0.5em;
  }

  .pub-venue {
    text-align: left;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding-right: 0;
    padding-bottom: 0.5em;
    min-width: auto;
  }

  .news-date {
    width: 80px;
    font-size: 0.75em;
  }

  .teaching-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }

  #main {
    margin-top: 1em;
    padding: 1.2em;
    border-radius: 0;
  }
}

/* --- Smooth scrollbar for the whole page --- */

html {
  scroll-behavior: smooth;
}

/* --- Selection color --- */

::selection {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

/* --- Links global override --- */

a {
  transition: var(--transition);
}
