/* =========================
   Base layout & typography
   ========================= */

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.65;
  color: #111;

  background-image: url("/images/darwin.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 88px 34px;
}

/* Leggibilità senza box/overlay: ombra chiara molto leggera */
h1, h2, p, li, footer, a {
  text-shadow: 0 1px 2px rgba(255,255,255,0.65);
}

h1 {
  font-size: 2.35rem;
  margin: 0 0 10px;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 0 0 34px;
  font-size: 1.1rem;
  opacity: .92;
}

h2 {
  margin-top: 44px;
  margin-bottom: 14px;
  font-size: 1.25rem;
}

p { margin: 12px 0; font-size: 1.05rem; }
ul, ol { padding-left: 22px; }
li { margin: 8px 0; font-size: 1.03rem; }

hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid rgba(0,0,0,0.22);
}

a { color: inherit; }

/* =========================
   Footer
   ========================= */

footer {
  margin-top: 56px;
  font-size: 0.98rem;
  opacity: .85;
}

.contact {
  margin-top: 10px;
  font-size: 0.98rem;
}

.small {
  font-size: 0.95rem;
  opacity: .9;
}

.electra-quote {
  margin-top: 18px;
  margin-bottom: 50px;
  font-size: 0.8rem;
  font-style: italic;
  text-align: right;
  letter-spacing: 0.5px;
  color: rgba(0,0,0,0.9);
  text-shadow: 0 1px 2px rgba(255,255,255,0.85);
}

/* LinkedIn inline */
footer .sep {
  margin: 0 4px;
  opacity: .6;
  text-shadow: none;
}

footer .social-link {
  color: inherit;
  opacity: .75;
  text-decoration: none;
}

footer .social-link:hover {
  text-decoration: underline;
}

footer .social-link svg {
  display: inline-block;
  vertical-align: -3px;
  margin-left: 4px;
}

/* =========================
   Hamburger menu (EXTREME MINIMAL by default)
   ========================= */

.menu-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  z-index: 1000;

  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 10px;
}

.menu-btn span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: rgba(0,0,0,0.65);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* Menu quasi invisibile */
.mobile-menu {
position: fixed;
  top: 70px;
  right: 18px;
  z-index: 999;

  width: 220px;                    /* 👈 più largo */
  padding: 10px 14px;

  background: rgba(255,255,255,0.6);  /* 👈 meno trasparente */
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;

  transform: translateY(-4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.mobile-menu.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  opacity: .85;
}

.mobile-menu a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Turn hamburger into X when open */
.menu-btn.is-open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2){ opacity: 0; }
.menu-btn.is-open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* =========================
   Responsive (mobile)
   ========================= */

@media (max-width: 768px) {

  main { padding: 60px 20px; }

  h1 { font-size: 1.9rem; line-height: 1.25; }

  .subtitle { font-size: 1rem; }

  h2 { font-size: 1.15rem; }

  p, li { font-size: 1rem; }

  footer { font-size: 0.9rem; }

  footer .contact { line-height: 1.6; }

  body { background-attachment: scroll; }

  /* Mobile: compact, usable, still minimal */
  .menu-btn{
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.25);
  }

  .mobile-menu{
    top: 64px;
    right: 18px;
    width: 160px;
    max-width: 160px;
    padding: 6px 10px;

    background: rgba(255,255,255,1);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
  }

  .mobile-menu a{
    padding: 8px 4px;
    border-top: 1px solid rgba(0,0,0,0.05);
  }

  .mobile-menu a:first-child{
    border-top: 0;
  }
}