/* =========================================
   Maryam Tanha — Portfolio CSS
   Design: Refined Academic / Editorial
   ========================================= */

/* --- CSS Variables --- */
:root {
  --navy:      #0e1e2e;
  --teal:      #1d8a8a;
  --teal-light:#2fb5b5;
  --sand:      #f5f0ea;
  --cream:     #fdfaf6;
  --text:      #1e1e1e;
  --text-muted:#5a6070;
  --border:    #e0dbd3;
  --white:     #ffffff;

  --nav-h:     64px;
  --section-pad: 100px;
  --wrap:      1000px;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.28s var(--ease-out);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--teal-light); text-decoration: underline; }

ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

/* --- Skip Link --- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-nav.scrolled {
  background: rgba(14,30,46,0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  opacity: 0.9;
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-logo:hover { opacity: 1; color: var(--white); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 0.4rem 0.85rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* --- Header --- */
.site-header {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 2rem) 2rem 4rem;
  background:
    linear-gradient(160deg, rgba(14,30,46,0.82) 0%, rgba(29,138,138,0.65) 100%),
    url('../images/sunset.jpg') center/cover no-repeat fixed;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.header-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 1rem;
  animation: fadeUp 0.8s var(--ease-out) both;
}
.site-header h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.8s 0.15s var(--ease-out) both;
}
.site-header h1 em {
  font-style: italic;
  color: var(--teal-light);
}
.header-tagline {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s 0.3s var(--ease-out) both;
}
.header-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.45s var(--ease-out) both;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
}
.btn-primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.45);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
}

.header-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.45;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--white), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

/* --- Sections --- */
.section {
  padding: var(--section-pad) 0;
}
.section:nth-child(even) {
  background: var(--sand);
}
.section:nth-child(odd) {
  background: var(--cream);
}

.content-wrap {
  width: 90%;
  max-width: var(--wrap);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
.section-label::after {
  content: '';
  display: block;
  height: 3px;
  width: 2.5rem;
  background: var(--teal);
  margin-top: 0.5rem;
  border-radius: 2px;
}
.section-label.light {
  color: var(--white);
}
.section-label.light::after {
  background: var(--teal-light);
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3.5rem;
  align-items: start;
}
.about-image-wrap {
  text-align: center;
}
.about-image {
  width: 100%;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}
.about-image:hover {
  transform: scale(1.03);
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}
.about-badges {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}
.badge {
  background: var(--teal);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.about-text p { margin-bottom: 1rem; }

.interests-heading {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
}
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}
.interest-tags li {
  background: rgba(29,138,138,0.08);
  border: 1px solid rgba(29,138,138,0.25);
  color: var(--teal);
  border-radius: 4px;
  padding: 0.3rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

/* --- News --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(0,0,0,0.1); }
.news-card:hover::before { transform: scaleX(1); }
.news-card--highlight {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.news-card--highlight .news-date { color: var(--teal-light); }
.news-card--highlight h3 { color: var(--white); }
.news-card--highlight p { color: rgba(255,255,255,0.8); }
.news-card--highlight a { color: var(--teal-light); }

.news-date {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.news-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.news-card p { font-size: 0.875rem; color: var(--text-muted); margin: 0; }

/* --- Education Timeline --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 2rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.timeline-item.revealed { opacity: 1; transform: none; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--teal);
  transform: translateX(-6px);
  box-shadow: 0 0 0 4px rgba(29,138,138,0.1);
  transition: background var(--transition);
}
.timeline-item:hover .timeline-marker { background: var(--teal); }

.timeline-date {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}
.timeline-institution {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.timeline-degree { color: var(--text-muted); font-size: 0.95rem; }

/* --- Experience Accordion --- */
.accordion { display: flex; flex-direction: column; gap: 0.75rem; }

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.accordion-item[open] { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.accordion-item[open] .acc-icon { transform: rotate(180deg); }

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-header:hover { background: var(--sand); }
.accordion-item[open] .accordion-header { background: var(--sand); }

.acc-org {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}
.acc-role {
  display: block;
  font-size: 0.85rem;
  color: var(--teal);
  margin-top: 0.15rem;
}
.acc-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}
.acc-icon {
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.accordion-body {
  padding: 0 1.4rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  animation: fadeUp 0.3s var(--ease-out) both;
}
.accordion-body ul { margin-top: 0.5rem; }

/* --- Publications --- */
.pub-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
}
.pub-tab {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.pub-tab:hover { border-color: var(--teal); color: var(--teal); }
.pub-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

.pub-list {
  padding-left: 0;
  list-style: none;
}
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  animation: fadeUp 0.4s var(--ease-out) both;
}
.pub-item:last-child { border-bottom: none; }

.pub-type-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(29,138,138,0.1);
  color: var(--teal);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  margin-top: 0.2rem;
  border: 1px solid rgba(29,138,138,0.2);
  white-space: nowrap;
}

.pub-link-out {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Awards --- */
.awards-list {
  list-style: none;
  padding: 0;
}
.awards-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  padding-left: 1.25rem;
  position: relative;
}
.awards-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-size: 0.75rem;
  top: 0.85rem;
}
.awards-list li:last-child { border-bottom: none; }

/* --- Volunteer --- */
.volunteer-list {
  list-style: none;
  padding: 0;
}
.volunteer-list li {
  padding: 0.6rem 0 0.6rem 1.25rem;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
  position: relative;
}
.volunteer-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.1;
}
.volunteer-list li:last-child { border-bottom: none; }

/* --- Contact --- */
.contact {
  background: var(--navy) !important;
  color: var(--white);
}
.contact-lead {
  font-size: 1.1rem;
  opacity: 0.75;
  margin-bottom: 1.75rem;
  max-width: 500px;
}
.contact-email {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.contact-email i { color: var(--teal-light); font-size: 1.2rem; }
.contact-email a { color: var(--white); font-weight: 500; }
.contact-email a:hover { color: var(--teal-light); text-decoration: underline; }

.contact-social {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.contact-social a {
  color: rgba(255,255,255,0.55);
  font-size: 1.6rem;
  transition: color var(--transition), transform var(--transition);
}
.contact-social a:hover {
  color: var(--teal-light);
  transform: translateY(-3px);
  text-decoration: none;
}

footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.45; }
  50%       { transform: scaleY(0.6); opacity: 0.2; }
}

/* --- Responsive --- */
@media (max-width: 800px) {
  :root { --section-pad: 70px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 200px;
    margin: 0 auto;
  }

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

  .accordion-header { flex-wrap: wrap; gap: 0.5rem; }
  .acc-date { order: -1; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(14,30,46,0.98);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.75rem; font-size: 0.95rem; }

  .site-header h1 { font-size: 3rem; }

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

  .pub-item { flex-direction: column; gap: 0.5rem; }

  .header-cta { flex-direction: column; align-items: center; }
}
