/* Minahil Raza — personal site
   Minimal single-page layout, inspired by carlobosio.github.io */

:root {
  --accent: #74359e;
  --accent-dark: #4f2a68;
  --text: #24292e;
  --text-light: #57606a;
  --border: #e5e7eb;
  --bg: #ffffff;
  --max-width: 860px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1 {
  font-size: 2.2rem;
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
}

h2 {
  font-size: 1.4rem;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

section {
  padding: 2rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* header */

.header {
  padding: 2.5rem 0 1.5rem;
}

.header-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap-reverse;
}

.header-text {
  flex: 1 1 380px;
  min-width: 280px;
}

.header-text p {
  color: var(--text-light);
  margin: 0 0 0.9rem;
}

.header-photo img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.contact-links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.link-btn,
.contact-links a,
.pub-links a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(116, 53, 158, 0.08);
  border: 1px solid rgba(116, 53, 158, 0.25);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
}

.link-btn:hover,
.contact-links a:hover,
.pub-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* news */

.news-box {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.news-box ul {
  margin: 0;
  padding-left: 1.1rem;
}

.news-box li {
  margin-bottom: 0.7rem;
}

.news-box li:last-child {
  margin-bottom: 0;
}

.news-date {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.35rem;
}

/* simple lists: education / experience / awards */

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

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

.item-main strong {
  display: block;
  font-size: 1.02rem;
}

.item-main .role {
  color: var(--text-light);
  font-size: 0.92rem;
}

.item-date {
  color: var(--text-light);
  font-size: 0.88rem;
  white-space: nowrap;
  text-align: right;
}

.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.award-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.award-list li:last-child {
  border-bottom: none;
}

/* publications */

.pub-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.pub-thumb {
  width: 130px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.pub-body {
  flex: 1;
  min-width: 0;
}

.pub-item h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.pub-authors {
  margin: 0 0 0.25rem;
  font-size: 0.94rem;
}

.pub-venue {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

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

/* talks */

.talks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.talks-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 6px;
}

.demo-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

.demo-card:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.demo-card img {
  width: 140px;
  height: 93px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.demo-card span {
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .talks-grid {
    grid-template-columns: 1fr;
  }
  .pub-item {
    flex-direction: column;
  }
  .pub-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .demo-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .demo-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .item-list li {
    flex-direction: column;
    gap: 0.15rem;
  }
  .item-date {
    text-align: left;
  }
}

/* footer */

footer {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 2rem 0 3rem;
}
