/*
 * Tribute Website for Hamid Khalafallah
 * A respectful, academic design honoring his memory and work
 */

:root {
  /* Blue for Sudan - Muted color scheme inspired by Sudan's sky and Nile */
  --primary-dark: #1a4d6d;
  --primary-light: #4a7c9d;
  --accent-blue: #5b9abd;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-light: #95a5a6;
  --bg-light: #f4f7f9;
  --bg-white: #ffffff;
  --border-color: #d6e1e5;
  --shadow-sm: 0 2px 8px rgba(26, 77, 109, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 77, 109, 0.12);
  --shadow-lg: 0 8px 32px rgba(26, 77, 109, 0.16);
}

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--primary-dark);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Header & Navigation */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease-in-out;
}

header.header-hidden {
  transform: translateY(-100%);
}

@media (min-width: 769px) {
  header.header-hidden {
    transform: translateY(0);
  }
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary-dark);
  letter-spacing: 1px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 300;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary-dark);
  border-bottom-color: var(--accent-blue);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  color: var(--bg-white);
  text-align: center;
  padding: 5rem 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-image {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto 2rem;
  display: block;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--bg-white);
  font-weight: 300;
  letter-spacing: 2px;
}

.hero-dates {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  font-style: italic;
}

.hero-tagline {
  font-size: 1.3rem;
  font-style: italic;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.content-section {
  background-color: var(--bg-white);
  padding: 3rem;
  margin-bottom: 2rem;
  border-radius: 0;
  box-shadow: none;
  border-left: 4px solid var(--accent-blue);
  border-bottom: 1px solid var(--border-color);
}

.content-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-dark);
  font-weight: 400;
}

.content-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

blockquote {
  border-left: 4px solid var(--accent-blue);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background-color: var(--bg-light);
  font-style: italic;
  color: var(--text-secondary);
  border-radius: 0;
}

blockquote p {
  margin-bottom: 0.5rem;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: normal;
}

/* Biography Page */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.bio-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.bio-section {
  margin-bottom: 3rem;
}

.bio-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.timeline-item {
  padding-left: 2rem;
  border-left: 2px solid var(--accent-blue);
  margin-bottom: 2rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-blue);
}

.timeline-year {
  font-weight: bold;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

/* Publications Page */
.publication-item {
  padding: 2rem 0;
  margin-bottom: 2rem;
  background-color: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.publication-item:hover {
  padding-left: 1rem;
  border-left: 3px solid var(--accent-blue);
}

.publication-year-header {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin: 3rem 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-blue);
}

.publication-title {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.publication-meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.publication-venue {
  font-style: italic;
  color: var(--primary-light);
}

.publication-summary {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.publication-link {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background-color: var(--primary-dark);
  color: var(--bg-white);
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.publication-link:hover {
  background-color: var(--accent-blue);
  color: var(--bg-white);
}

/* Videos Page - Grid Layout */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.video-card {
  background-color: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.video-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.video-info {
  padding: 1.5rem;
}

.video-title {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.video-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background-color: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-info {
  padding: 1.5rem;
}

.video-title {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.video-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Memorial Form */
.memorial-form {
  max-width: 700px;
  margin: 3rem auto;
  background-color: var(--bg-white);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
  font-weight: 500;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(91, 154, 189, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-button {
  width: 100%;
  padding: 1rem 2rem;
  background-color: var(--primary-dark);
  color: var(--bg-white);
  border: none;
  border-radius: 4px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  letter-spacing: 0.5px;
}

.submit-button:hover {
  background-color: var(--accent-blue);
  color: var(--bg-white);
}

.submit-button:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
}

/* Tributes Display */
.tributes-container {
  margin-top: 4rem;
}

.tribute-card {
  background-color: transparent;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

.tribute-card:hover {
  padding-left: 1rem;
  border-left: 3px solid var(--accent-blue);
}

.tribute-text {
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.tribute-author {
  text-align: right;
  color: var(--text-secondary);
  font-weight: 500;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.tribute-date {
  text-align: right;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--bg-white);
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.footer-dedication {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-style: italic;
  line-height: 1.8;
  opacity: 0.9;
}

.footer-credit {
  font-size: 0.9rem;
  opacity: 0.7;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

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

  .hero-tagline {
    font-size: 1.1rem;
  }

  .bio-grid {
    grid-template-columns: 1fr;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 2rem 1.5rem;
  }

  main {
    padding: 2rem 1rem;
  }
}

/* Print Styles */
@media print {
  header {
    position: static;
  }

  .hero {
    background: white;
    color: black;
  }

  .publication-link,
  .submit-button {
    display: none;
  }
}
