/* =========================================================
   Alessandra Gni – Academic Website  |  style.css
   ========================================================= */

/* ----- CSS Custom Properties ----- */
:root {
  --clr-primary:    #2c5f8a;   /* deep blue */
  --clr-primary-lt: #3a78ad;
  --clr-accent:     #2c5f8a;   /* same */
  --clr-bg:         #ffffff;
  --clr-bg-alt:     #f6f8fb;
  --clr-text:       #2d2d2d;
  --clr-text-muted: #5e6b77;
  --clr-border:     #dde3ea;
  --clr-link:       var(--clr-primary);

  --font-sans:  'Source Sans 3', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;

  --radius:     8px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);

  --nav-h:      60px;
  --container:  960px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
}

img { max-width: 100%; display: block; }
a  { color: var(--clr-link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
address { font-style: normal; }

/* ----- Utility ----- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: 4rem; }
.alt-section { background: var(--clr-bg-alt); }

.section-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--clr-primary);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}
.section-title.centered { text-align: center; }

.section-subtitle {
  text-align: center;
  color: var(--clr-text-muted);
  margin-bottom: 2rem;
  font-size: 0.97rem;
}

/* ----- NAVIGATION ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-primary);
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: .3px;
}
.nav-brand:hover { text-decoration: none; color: #fff; }

.nav-links {
  display: flex;
  gap: 1.8rem;
}
.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  font-weight: 600;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; text-decoration: none; }
.nav-links a.active { border-bottom: 2px solid rgba(255,255,255,.7); }

/* hamburger – hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px; height: 18px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

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

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--clr-primary);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li a {
    display: block;
    padding: .75rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
  }
}

/* ----- HERO / PROFILE SECTION ----- */
.hero-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }

.hero-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 720px) {
  .hero-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Profile card */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .8rem;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.profile-photo-wrapper { position: relative; }

.profile-photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--clr-primary);
}

.profile-photo-placeholder {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: var(--clr-bg-alt);
  border: 3px solid var(--clr-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--clr-primary);
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--clr-primary);
  margin-top: .25rem;
}

.profile-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.profile-affiliation {
  font-size: .88rem;
  color: var(--clr-text-muted);
  line-height: 1.5;
}
.profile-affiliation i { margin-right: .3em; color: var(--clr-primary); }

/* Social links in profile */
.social-links {
  width: 100%;
  margin-top: .5rem;
}
.social-links li + li { margin-top: .35rem; }
.social-links a {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  color: var(--clr-text);
  padding: .3rem .5rem;
  border-radius: 5px;
  transition: background .2s, color .2s;
}
.social-links a:hover {
  background: var(--clr-primary);
  color: #fff;
  text-decoration: none;
}
.social-links i { width: 1.1em; text-align: center; color: var(--clr-primary); }
.social-links a:hover i { color: #fff; }

/* Bio content */
.bio-content p { margin-bottom: 1rem; font-size: 1.02rem; }
.bio-content p:last-child { margin-bottom: 0; }

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1.1rem;
  border-radius: 5px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-outline {
  border: 2px solid var(--clr-primary);
  color: var(--clr-primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--clr-primary);
  color: #fff;
  text-decoration: none;
}

/* ----- RESEARCH INTERESTS ----- */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.interest-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.interest-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.interest-icon {
  font-size: 1.8rem;
  color: var(--clr-primary);
  margin-bottom: .6rem;
}

.interest-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--clr-primary);
}

.interest-card p {
  font-size: .9rem;
  color: var(--clr-text-muted);
  line-height: 1.55;
}

/* ----- NEWS ----- */
.news-list { margin-top: 1.5rem; max-width: 750px; margin-inline: auto; }

.news-item {
  display: flex;
  gap: 1.2rem;
  padding-block: .85rem;
  border-bottom: 1px solid var(--clr-border);
  font-size: .97rem;
  align-items: baseline;
}
.news-item:first-child { border-top: 1px solid var(--clr-border); }

.news-date {
  flex-shrink: 0;
  width: 110px;
  font-weight: 700;
  color: var(--clr-primary);
  font-size: .88rem;
}

.news-text { color: var(--clr-text); }
.news-text a { font-weight: 600; }

/* ----- PUBLICATIONS ----- */
.pub-category {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--clr-primary);
}

.pub-list {
  padding-left: 1.3rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.pub-item {
  font-size: .97rem;
}
.pub-title {
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: .15rem;
}
.pub-authors { color: var(--clr-text-muted); margin-bottom: .1rem; }
.pub-venue   { color: var(--clr-text-muted); font-size: .92rem; margin-bottom: .35rem; }

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

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 600;
  background: var(--clr-bg);
  border: 1px solid var(--clr-primary);
  color: var(--clr-primary);
  padding: .2rem .65rem;
  border-radius: 4px;
  transition: background .2s, color .2s;
}
.pub-link:hover {
  background: var(--clr-primary);
  color: #fff;
  text-decoration: none;
}

/* ----- CONTACT ----- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 640px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-info p {
  display: flex;
  gap: .75rem;
  margin-bottom: .85rem;
  font-size: .97rem;
  line-height: 1.6;
}
.contact-info i {
  color: var(--clr-primary);
  width: 1.1em;
  flex-shrink: 0;
  margin-top: .2rem;
}

.contact-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  padding: 1rem .8rem;
  background: var(--clr-bg-alt);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  color: var(--clr-text);
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.contact-card i {
  font-size: 1.6rem;
  color: var(--clr-primary);
}
.contact-card:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.contact-card:hover i { color: #fff; }

/* ----- FOOTER ----- */
.site-footer {
  background: var(--clr-primary);
  color: rgba(255,255,255,.75);
  padding-block: 1.3rem;
  text-align: center;
  font-size: .88rem;
}
.site-footer a { color: rgba(255,255,255,.9); }

/* ----- Scrollbar polish (optional) ----- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--clr-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 4px; }
