/* ============================================
   ISSLAM ALHASAN — Personal Academic Website
   style.css — Shared Styles
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --color-primary:    #0f172a;
  --color-accent:     #1e40af;
  --color-accent-light: #dbeafe;
  --color-bg:         #ffffff;
  --color-bg-alt:     #f8fafc;
  --color-text:       #334155;
  --color-muted:      #64748b;
  --color-border:     #e2e8f0;
  --max-width:        860px;
  --font-serif:       'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:        'Inter', system-ui, -apple-system, sans-serif;
  --radius:           6px;
  --shadow:           0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { color: var(--color-accent); }
a:hover { text-decoration: underline; }

/* ---------- Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-brand:hover { text-decoration: none; color: var(--color-accent); }

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  transition: all 0.3s;
}

/* ---------- Main Layout ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

/* ---------- Section Heading ---------- */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--color-primary);
  line-height: 1.25;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* ---------- Divider ---------- */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3.5rem 0;
}

/* ---------- Hero (Home Page) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3.5rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--color-border);
}

.hero-text h1 {
  font-size: 2.6rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: 1rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-bio {
  font-size: 1.02rem;
  max-width: 580px;
  color: var(--color-text);
  margin-bottom: 1.75rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: #1d3a8a;
  text-decoration: none;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-outline:hover {
  background: var(--color-accent-light);
  text-decoration: none;
}

/* Avatar placeholder */
.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  background: var(--color-bg-alt);
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--color-muted);
  text-align: center;
  padding: 1rem;
}

/* ---------- Interest Tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  letter-spacing: 0.01em;
}

/* ---------- Info Grid (Home highlights) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.info-card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-alt);
}

.info-card h3 {
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card ul li {
  font-size: 0.92rem;
  color: var(--color-text);
  padding: 0.2rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.info-card ul li::before {
  content: '→';
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ---------- Publications ---------- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pub-card:hover {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.pub-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.pub-badge.dissertation { background: #fef3c7; color: #92400e; }
.pub-badge.journal       { background: #dbeafe; color: #1e40af; }
.pub-badge.conference    { background: #dcfce7; color: #166534; }
.pub-badge.book-chapter  { background: #f3e8ff; color: #6b21a8; }
.pub-badge.report        { background: #ffedd5; color: #9a3412; }

.pub-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
}

.pub-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.pub-desc {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.pub-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pub-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pub-link:hover { text-decoration: underline; }

/* ---------- CV Page ---------- */
.cv-section {
  margin-bottom: 3rem;
}

.cv-section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent-light);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.cv-entry:last-child { border-bottom: none; }

.cv-entry-main h3 {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.1rem;
}

.cv-entry-sub {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin-bottom: 0.4rem;
}

.cv-entry-date {
  font-size: 0.82rem;
  color: var(--color-muted);
  white-space: nowrap;
  text-align: right;
  margin-top: 0.15rem;
}

.cv-bullets {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.cv-bullets li {
  font-size: 0.88rem;
  padding: 0.15rem 0;
  padding-left: 1rem;
  position: relative;
  color: var(--color-text);
}

.cv-bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 2rem;
}

.skill-item {
  font-size: 0.88rem;
  color: var(--color-text);
  padding: 0.15rem 0;
  padding-left: 1rem;
  position: relative;
}
.skill-item::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Blog ---------- */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-card {
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  text-decoration: none;
  display: block;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.blog-card:hover {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
  text-decoration: none;
}

.blog-card-date {
  font-size: 0.78rem;
  color: var(--color-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.blog-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0;
}

.blog-card-tags {
  margin-top: 0.75rem;
}

/* Blog post content */
.post-header {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.post-date {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.post-body {
  max-width: 680px;
}

.post-body p {
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.post-body h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-body li {
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 0.25rem;
}

.post-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--color-muted);
  font-style: italic;
}

/* ---------- Contact / Social Links ---------- */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text);
}

.contact-item svg {
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-item a {
  color: var(--color-text);
}
.contact-item a:hover { color: var(--color-accent); }

/* ---------- Footer ---------- */
footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-muted);
}

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

/* ---------- Utility ---------- */
.text-muted { color: var(--color-muted); }
.text-sm    { font-size: 0.875rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--color-accent); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 2rem;
    gap: 0.75rem;
  }
  .nav-links.open { display: flex; }
  .menu-toggle { display: flex; }
  nav { position: relative; }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero > *:last-child { order: -1; }
  .avatar-placeholder, .avatar {
    width: 110px;
    height: 110px;
  }

  .hero-text h1 { font-size: 2rem; }

  .info-grid      { grid-template-columns: 1fr; }
  .skills-grid    { grid-template-columns: 1fr; }

  .cv-entry {
    grid-template-columns: 1fr;
  }
  .cv-entry-date { text-align: left; }

  main { padding: 2.5rem 1.25rem 4rem; }

  h2 { font-size: 1.5rem; }
  .post-title { font-size: 1.75rem; }
}
