/* ===========================================================
   Fanina Sousani — Research Portfolio
   =========================================================== */

:root {
  --bg: #f9f8fb;
  --surface: #ffffff;
  --surface-2: #f2f0f6;
  --text: #1c1a22;
  --muted: #6a6472;
  --border: #e5e1ec;
  --accent: #7c3aed;
  --accent-2: #c4b5fd;
  --accent-text: #ffffff;
  --shadow: 0 10px 30px -12px rgba(30, 15, 40, 0.15);
  --radius: 14px;
  --maxw: 1100px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #120f16;
  --surface: #19151f;
  --surface-2: #1e1926;
  --text: #f2eef4;
  --muted: #a69cae;
  --border: #2c2536;
  --accent: #a78bfa;
  --accent-2: #4c1d95;
  --accent-text: #180f23;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f16;
    --surface: #19151f;
    --surface-2: #1e1926;
    --text: #f2eef4;
    --muted: #a69cae;
    --border: #2c2536;
    --accent: #a78bfa;
    --accent-2: #4c1d95;
    --accent-text: #180f23;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head {
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-family: "Source Serif 4", Georgia, serif;
}

.section-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0;
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle,
.theme-toggle,
.nav-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.lang-toggle {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
}
.theme-toggle svg,
.nav-toggle svg {
  width: 18px;
  height: 18px;
}
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

.nav-toggle {
  display: none;
}

/* ---------- hero ---------- */
.hero {
  padding-top: 100px;
  padding-bottom: 100px;
  background:
    radial-gradient(700px 320px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
}
.hero-inner {
  max-width: 760px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.hero .lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 0 34px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo {
  position: sticky;
  top: 100px;
}
.avatar-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 4px solid var(--surface);
}
.about-text p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0 8px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-item .label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.info-item .value {
  font-weight: 600;
  font-size: 15px;
}
.info-item .value a:hover {
  color: var(--accent);
}

/* ---------- research blocks ---------- */
.research-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.research-block:last-child {
  border-bottom: none;
}
.research-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.research-head h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}
.research-head .when {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.research-block .org {
  color: var(--muted);
  font-size: 14.5px;
  margin: 6px 0 14px;
}
.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bullet-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  position: relative;
  padding: 20px 0 20px 28px;
  border-left: 2px solid var(--border);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}
.timeline-item .when {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline-item h4 {
  margin: 0 0 4px;
  font-size: 18px;
}
.timeline-item .org {
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- publications ---------- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.pub-card h4 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.pub-journal {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}
.pub-year {
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 2px 9px;
  border-radius: 999px;
}
.pub-doi {
  font-size: 13px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pub-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}
.pub-card:hover .pub-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------- skills ---------- */
.skills-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.skills-cat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.skills-cat h4 {
  margin: 0 0 16px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-row span {
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 7px 13px;
  border-radius: 999px;
}

/* ---------- contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}
.contact-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-card .icon {
  color: var(--accent);
  margin-bottom: 6px;
}
.contact-card .icon svg {
  width: 20px;
  height: 20px;
}
.contact-card .label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.contact-card .value {
  font-weight: 600;
  font-size: 15px;
}
.contact-card .value a:hover {
  color: var(--accent);
}
.social-row {
  display: flex;
  gap: 10px;
}
.social-row a {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.social-row a svg {
  width: 18px;
  height: 18px;
}
.social-row a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.form-row input,
.form-row textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn {
  align-self: flex-start;
}

/* ---------- footer ---------- */
footer {
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner a:hover {
  color: var(--accent);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  section {
    padding: 80px 0;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-photo {
    position: static;
    display: flex;
    justify-content: center;
  }
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .skills-cats {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 10px 0;
  }
  .nav-toggle {
    display: flex;
  }
  .research-head {
    flex-direction: column;
    gap: 4px;
  }
  .pub-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
