/* ============================================
   MERNA SAAD PORTFOLIO — Deep Navy + Antique Brass
   ============================================ */

/* ---------- Color Palette ---------- */
:root {
  --navy: #2c3e50;
  --navy-light: #3d5166;
  --brass: #b8945a;
  --brass-light: #d4b483;
  --brass-subtle: #f5efe6;
  --cream: #f5f2ed;
  --cream-light: #faf8f5;
  --charcoal: #2a2a2a;
  --text-primary: #2a2a2a;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
}

/* ---------- Global Base ---------- */
body {
  background-color: var(--cream) !important;
  color: var(--text-primary);
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- Typography (smaller, tighter) ---------- */
h1, .quarto-title .title {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  font-size: 1.6rem;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  font-size: 1.05rem;
}

h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  font-size: 0.95rem;
}

p, li, .about-contents {
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ---------- Fade-in Animation Keyframes ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes underlineGrow {
  from { width: 0; }
  to { width: 36px; }
}

/* ---------- Homepage Hero Animations ---------- */

/* Profile image: fade in from left */
.about-entity .about-image,
.quarto-about-trestles .about-image {
  animation: fadeInLeft 0.8s ease-out both;
}

/* Profile image styling */
.about-entity .about-image img,
.quarto-about-trestles .about-image img {
  border-radius: 50%;
  border: 2.5px solid var(--brass);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-entity .about-image img:hover,
.quarto-about-trestles .about-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(44, 62, 80, 0.2);
}

/* Body text area: fade in from right */
.about-entity .about-contents,
.quarto-about-trestles .about-contents {
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

/* Name: fade in up */
.quarto-title .title,
.about-entity h2,
#title-block-header .title {
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

/* Subtitle */
.quarto-title .subtitle,
#title-block-header .subtitle {
  animation: fadeInUp 0.7s ease-out 0.3s both;
  color: var(--brass) !important;
  font-size: 0.95rem;
}

/* About links: staggered fade-in */
.about-links .about-link {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out both;
  font-size: 0.9rem;
}
.about-links .about-link:nth-child(1) { animation-delay: 0.4s; }
.about-links .about-link:nth-child(2) { animation-delay: 0.5s; }
.about-links .about-link:nth-child(3) { animation-delay: 0.6s; }
.about-links .about-link:nth-child(4) { animation-delay: 0.7s; }
.about-links .about-link:nth-child(5) { animation-delay: 0.8s; }

/* ---------- Navbar Styling ---------- */
.navbar {
  background-color: var(--cream-light) !important;
  border-bottom: 1px solid rgba(44, 62, 80, 0.08);
  transition: box-shadow 0.3s ease;
}

.navbar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--navy) !important;
  transition: color 0.3s ease;
}

.navbar-brand:hover {
  color: var(--brass) !important;
}

.navbar .navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  position: relative;
  transition: color 0.3s ease;
  padding-bottom: 4px;
  font-size: 0.85rem;
}

.navbar .navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--brass);
  transition: width 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover {
  color: var(--navy) !important;
}

.navbar .navbar-nav .nav-link:hover::after {
  width: 100%;
}

.navbar .navbar-nav .nav-link.active {
  color: var(--navy) !important;
}

.navbar .navbar-nav .nav-link.active::after {
  width: 100%;
}

/* ---------- Links ---------- */
a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brass);
}

/* ---------- About Links / Buttons ---------- */
.about-link {
  border: 1.5px solid var(--navy) !important;
  border-radius: 20px !important;
  color: var(--navy) !important;
  background: transparent !important;
  transition: all 0.3s ease !important;
  padding: 8px 22px !important;
}

.about-link:hover {
  background: var(--navy) !important;
  color: var(--cream-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.18);
}

/* ---------- Section Headings ---------- */
.about-contents h2,
.about-contents h3 {
  color: var(--navy);
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
  font-style: normal;
}

/* Brass accent line under section headers */
.about-contents h2::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--brass);
  margin-top: 4px;
  animation: underlineGrow 0.6s ease-out both;
}

/* ---------- Bold text ---------- */
strong, b {
  color: var(--charcoal);
}

/* ---------- Project Cards ---------- */
.quarto-grid-item {
  border: 1px solid rgba(44, 62, 80, 0.1) !important;
  border-radius: 10px !important;
  background: var(--cream-light) !important;
  transition: all 0.3s ease !important;
  overflow: hidden;
}

.quarto-grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.1);
  border-color: var(--brass) !important;
}

.quarto-grid-item .card-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  font-size: 0.95rem;
}

.quarto-grid-item .card-text {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ---------- Listing Page Animations ---------- */
.quarto-grid-item {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out both;
}

.quarto-grid-item:nth-child(1) { animation-delay: 0.1s; }
.quarto-grid-item:nth-child(2) { animation-delay: 0.2s; }
.quarto-grid-item:nth-child(3) { animation-delay: 0.3s; }
.quarto-grid-item:nth-child(4) { animation-delay: 0.4s; }
.quarto-grid-item:nth-child(5) { animation-delay: 0.5s; }
.quarto-grid-item:nth-child(6) { animation-delay: 0.6s; }

/* ---------- Horizontal Rules ---------- */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--brass),
    transparent
  );
  margin: 1.2rem 0;
}

/* ---------- Code Blocks ---------- */
pre {
  background-color: #f0ede8 !important;
  border-radius: 8px;
  border-left: 3px solid var(--brass);
  font-size: 0.82rem;
}

pre code {
  color: #2a2a2a !important;
}

div.sourceCode {
  border-radius: 8px;
  border-left: 3px solid var(--brass);
}

/* ---------- Tables ---------- */
.table {
  border-color: rgba(44, 62, 80, 0.12);
  font-size: 0.85rem;
}

.table thead th {
  background-color: var(--navy);
  color: white;
  border: none;
  font-size: 0.83rem;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--brass-subtle);
}

/* ---------- Footer ---------- */
.nav-footer {
  background-color: var(--cream-light) !important;
  border-top: 1px solid rgba(44, 62, 80, 0.08);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Page Content Animations ---------- */
#quarto-content {
  animation: fadeInUp 0.5s ease-out both;
}

/* ---------- Section Animations ---------- */
.level2 {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out both;
}

.level2:nth-of-type(1) { animation-delay: 0.1s; }
.level2:nth-of-type(2) { animation-delay: 0.15s; }
.level2:nth-of-type(3) { animation-delay: 0.2s; }
.level2:nth-of-type(4) { animation-delay: 0.25s; }
.level2:nth-of-type(5) { animation-delay: 0.3s; }

/* ---------- Selection Color ---------- */
::selection {
  background: rgba(184, 148, 90, 0.2);
  color: var(--charcoal);
}

/* ---------- Smooth Scrolling ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- Search Button ---------- */
.aa-DetachedSearchButton {
  border-color: var(--navy) !important;
}

/* ---------- Open to Work Badge ---------- */
.open-badge {
  display: inline-block;
  font-size: 0.7rem;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 3px 12px 3px 22px;
  position: relative;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.open-badge::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateY(-50%) scale(0.8); }
}

/* ---------- Scroll Indicator ---------- */
.scroll-indicator {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
  animation: fadeInUp 0.5s ease-out 1.2s both;
}

.scroll-text {
  font-size: 0.7rem;
  color: #8a8a8a;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.scroll-arrow {
  width: 1px;
  height: 20px;
  background: #b8945a;
  margin: 0 auto;
  position: relative;
  animation: scroll-bounce 1.5s ease-in-out infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #b8945a;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.5; }
}

/* ---------- Footer Styling (override) ---------- */
.nav-footer {
  background-color: #faf8f5 !important;
  border-top: 1px solid rgba(44, 62, 80, 0.08);
  color: #8a8a8a;
  font-size: 0.75rem;
  padding: 0.8rem 0;
  text-align: center;
}

/* ---------- Typing Tagline ---------- */
.typing-tagline {
  font-size: 0.78rem;
  color: #b8945a;
  font-style: italic;
  letter-spacing: 0.3px;
  min-height: 1.2em;
  margin-top: 4px;
  margin-bottom: 10px;
  border-right: 2px solid #2c3e50;
  display: inline-block;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

/* ---------- Skill Pills ---------- */
.skills-section {
  margin-top: 1.2rem;
  text-align: left;
}

.skill-category {
  margin-bottom: 0.8rem;
}

.skill-label {
  font-size: 0.78rem;
  color: #b8945a;
  font-weight: 500;
  margin-bottom: 0.3rem;
  letter-spacing: 0.3px;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pill {
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 10px;
  display: inline-block;
  line-height: 1.4;
}

.pill-navy {
  background: #2c3e50;
  color: #f5f2ed;
}

.pill-brass {
  background: #b8945a;
  color: #faf8f5;
}

.pill-brass-outline {
  background: transparent;
  border: 1px solid #b8945a;
  color: #b8945a;
}

/* Skill pills staggered fade-in */
.skill-category {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out both;
}
.skill-category:nth-child(1) { animation-delay: 0.6s; }
.skill-category:nth-child(2) { animation-delay: 0.75s; }
.skill-category:nth-child(3) { animation-delay: 0.9s; }

/* Subtle hover on pills */
.pill {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .about-entity .about-image,
  .quarto-about-trestles .about-image {
    animation: fadeInUp 0.8s ease-out both;
  }

  .about-entity .about-contents,
  .quarto-about-trestles .about-contents {
    animation: fadeInUp 0.8s ease-out 0.2s both;
  }

  h1, .quarto-title .title {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.1rem;
  }
}
