/* ==========================================================================
   Ilaria Musacchio — Portfolio
   Minimal, elegant styles. White / warm-cream base, terracotta accent.
   ========================================================================== */

:root {
  --bg: #faf8f5;
  --bg-alt: #f2ede6;
  --surface: #ffffff;
  --text: #211f1c;
  --text-muted: #6c655d;
  --accent: #bb5b3c;
  --accent-dark: #9a4830;
  --accent-soft: #f1ddd3;
  --border: #e6dfd4;
  --shadow: 0 20px 40px -24px rgba(33, 31, 28, 0.25);
  --radius: 14px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
}

:root[data-theme="dark"] {
  --bg: #16130f;
  --bg-alt: #1f1b15;
  --surface: #221e18;
  --text: #f2ece3;
  --text-muted: #b6ab9c;
  --accent: #e2794f;
  --accent-dark: #f0966f;
  --accent-soft: #3a281f;
  --border: #362a1f;
  --shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p {
  margin: 0 0 1em;
  color: var(--text);
}

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

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

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

/* ---------- Navigation ---------- */

.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  background: transparent;
  padding: 0 20px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-logo-circle {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.nav-logo-circle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 30px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  color: var(--accent-dark);
  font-weight: 600;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Nav controls: theme + language toggle ---------- */

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) rotate(-8deg);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.icon-sun, .icon-moon {
  display: none;
}

:root:not([data-theme="dark"]) .icon-moon {
  display: block;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 80px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.hero-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Modifier for containers holding a real photo (not a placeholder):
   let the box follow the image's own ratio instead of a fixed one,
   so there's no empty space above/below the subject. */
.hero-photo.is-image {
  aspect-ratio: auto;
  border: none;
  background: none;
  padding: 0;
  box-shadow: var(--shadow);
}

.hero-photo.is-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.hero-tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 22px;
}

.hero-tagline .dot {
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #3f9d5c;
  box-shadow: 0 0 0 4px rgba(63, 157, 92, 0.16);
}

/* ---------- Sections ---------- */

section {
  padding: 88px 0;
}

section.alt {
  background: var(--bg-alt);
}

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

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Cards / Grids ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

/* ---------- Oltre il desk ---------- */

.beyond-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.beyond-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px 60px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.beyond-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.beyond-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden;
}

/* Continuous layer (slow pan/zoom loop) and hover layer (zoom on card
   hover) are split across two nested elements so their `transform`
   values compose instead of fighting over the same property. */
.beyond-icon-inner {
  width: 100%;
  height: 100%;
  animation: beyondKenBurns 16s ease-in-out infinite;
}

.beyond-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease-out;
}

.beyond-card:hover .beyond-icon img {
  transform: scale(1.08);
}

@keyframes beyondKenBurns {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beyond-icon-inner {
    animation: none;
  }
}

.beyond-card h3 {
  margin-bottom: 8px;
}

.beyond-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.beyond-arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.beyond-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateX(3px);
}

/* ---------- Timeline (Formazione / Esperienza) ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.timeline-item:first-child {
  border-top: none;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-date {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
}

.timeline-body h3 {
  margin-bottom: 4px;
}

.timeline-org {
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ---------- Formazione: expandable cards with logo ---------- */

.edu-list {
  display: flex;
  flex-direction: column;
}

.edu-card {
  border-top: 1px solid var(--border);
}

.edu-card:first-child {
  border-top: none;
}

.edu-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.edu-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-align: center;
  padding: 2px;
}

.edu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sitly's logo file is already a perfect square matching this frame,
   so cover behaves identically to contain here — used defensively so
   the purple background is guaranteed to reach every edge. */
.edu-logo img.logo-fill {
  object-fit: cover;
}

.edu-main {
  flex: 1;
  min-width: 0;
}

.edu-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.edu-main h3 {
  margin-bottom: 2px;
}

.edu-org {
  color: var(--text-muted);
  font-weight: 500;
}

.edu-arrow {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text);
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.edu-toggle:hover .edu-arrow {
  border-color: var(--accent);
}

.edu-toggle[aria-expanded="true"] .edu-arrow {
  transform: rotate(90deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.edu-panel {
  max-height: 0;
  overflow: hidden;
  padding-left: 88px;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.edu-panel.open {
  max-height: 800px;
  padding-bottom: 32px;
}

.edu-panel p {
  color: var(--text-muted);
  max-width: 60ch;
}

.edu-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 20px 0 10px;
}

.edu-section-label:first-child {
  margin-top: 0;
}

.highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

.edu-thesis-title {
  font-weight: 600;
  font-style: italic;
  margin: 0 0 14px;
}

/* ---------- Sport ---------- */

.sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 24px;
}

.sport-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.sport-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sport-item:hover .sport-photo {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.sport-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease-out;
}

.sport-item:hover .sport-photo img {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .sport-photo img {
    transition: none;
  }
}

.sport-photo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.sport-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sport-name {
  font-weight: 600;
}

.sport-name {
  font-weight: 600;
}

/* ---------- Viaggi: interactive map ---------- */

.travel-counter {
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 24px;
}

.travel-map-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

#svgMap {
  width: 100%;
  height: 480px;
}

.microstate-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.microstate-chips-wrap:empty,
.microstate-chips-wrap:has(#microstate-chips:empty) {
  display: none;
}

.microstate-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

#microstate-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.microstate-chip {
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

button.microstate-chip:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.travel-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.travel-closing-note {
  text-align: center;
  font-style: italic;
  color: var(--accent-dark);
  font-size: 0.95rem;
  max-width: 60ch;
  margin: 0 auto 32px;
}

.travel-panel h3 {
  margin-bottom: 14px;
}

.travel-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.travel-panel li {
  list-style: none;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.skill-pill {
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
}

.languages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.language-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.language-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.language-name {
  font-weight: 600;
  margin-bottom: 6px;
}

.language-level {
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.bar {
  height: 5px;
  border-radius: 4px;
  background: var(--border);
  margin-top: 12px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}

/* ---------- Projects ---------- */

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}

.project-body {
  padding: 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-body p {
  color: var(--text-muted);
  flex: 1;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.contact-value {
  font-weight: 600;
  font-size: 1.02rem;
}

.contact-value:hover {
  color: var(--accent-dark);
}

form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

input, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -4px;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}

.form-status.success {
  color: #3f7a4f;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  padding: 64px 56px;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 52ch;
  margin: 0 auto 8px;
}

.cta-band .btn-row {
  justify-content: center;
}

.cta-band .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.cta-band .btn-outline:hover {
  border-color: #fff;
  color: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}

.footer-brand h3 {
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 34ch;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--text);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-dark);
}

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 16px;
}

/* ---------- Page header (inner pages) ---------- */

.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
}

.page-hero .eyebrow {
  margin-bottom: 10px;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 60ch;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    max-width: 340px;
    margin: 0 auto;
    order: -1;
  }

  #svgMap {
    height: 360px;
  }

  .grid-2,
  .grid-3,
  .skills-grid,
  .contact-grid,
  .footer-grid,
  .beyond-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    gap: 16px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .edu-toggle {
    gap: 16px;
  }

  .edu-logo {
    width: 52px;
    height: 52px;
  }


  .edu-panel {
    padding-left: 0;
  }
}

@media (max-width: 720px) {
  .nav-controls {
    gap: 8px;
  }

  .nav-links {
    position: fixed;
    top: 78px;
    left: 20px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  section {
    padding: 64px 0;
  }

  .cta-band {
    padding: 48px 28px;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 0 20px;
  }

  .nav {
    padding: 18px 20px;
  }
}
