/* ========================================
   Filipe Andrade – Business CV
   Inspired by Wix Business CV Template
   Blue accent, beige/white, clean layout
   ======================================== */

:root {
  --blue: #3b5ffc;
  --blue-hover: #2a4be0;
  --beige: #d5c8b8;
  --beige-light: #e8ddd1;
  --white: #ffffff;
  --off-white: #fafafa;
  --charcoal: #1a1a1a;
  --dark: #2c2c2c;
  --gray: #555555;
  --gray-light: #888888;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--blue);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.navbar.scrolled {
  background: var(--white);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.06);
  padding: 0.75rem 3rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.nav-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--charcoal);
}

.nav-sep {
  color: var(--gray-light);
  font-weight: 300;
}

.nav-title {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--gray-light);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--blue);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.hero-left {
  background: var(--beige-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 3rem 3rem;
}

.hero-card {
  text-align: center;
  max-width: 420px;
}

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 2rem;
  background: var(--beige);
}

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

.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c4b8a8;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 3.5rem;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.hero-divider {
  width: 40px;
  height: 2px;
  background: var(--blue);
  margin: 0 auto 1rem;
}

.hero-role {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--gray);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--charcoal);
  transition: all 0.3s;
}

.hero-social a:hover {
  color: var(--blue);
}

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 4rem 3rem;
  background: var(--white);
}

.hero-hello {
  font-family: var(--font-body);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--blue);
}

.btn-primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border: 2px solid var(--charcoal);
}

.btn-outline:hover {
  background: var(--charcoal);
  color: var(--white);
}

.hero-intro {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.hero-intro strong {
  color: var(--charcoal);
}

/* ---- Sections ---- */
.section {
  padding: 6rem 0;
}

.section-beige {
  background: var(--beige-light);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 3rem;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.accent-square {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--blue);
  flex-shrink: 0;
}

.section-intro {
  font-size: 0.95rem;
  color: var(--gray);
  max-width: 700px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* ---- Projects ---- */
.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 2rem;
  background: var(--white);
  overflow: hidden;
}

.project-text {
  padding: 2.5rem;
}

.project-title-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-accent-bar {
  width: 4px;
  background: var(--blue);
  border-radius: 2px;
  flex-shrink: 0;
}

.project-title-row h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--blue);
  margin-bottom: 0.15rem;
}

.project-role {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--charcoal);
}

.project-text > p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.project-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 0.25rem;
}

.project-outcome {
  font-size: 0.85rem;
  color: var(--dark);
  line-height: 1.7;
}

.project-outcome strong {
  color: var(--charcoal);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.62rem;
  border: 1px solid #d9dfea;
  background: #f3f7ff;
  color: #2f466d;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1;
  border-radius: 999px;
  white-space: nowrap;
}

.project-image {
  background: linear-gradient(135deg, var(--beige) 0%, #b8a898 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  overflow: hidden;
  position: relative;
}

.project-image-placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.project-image-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

.project-image-icon svg {
  display: block;
}

.project-card.project-reg .project-accent-bar {
  background: #3b5ffc;
}

.project-card.project-reg .project-title-row h3 {
  color: #3b5ffc;
}

.project-card.project-reg .project-image {
  background: linear-gradient(135deg, #5f7dff 0%, #3b5ffc 100%);
}

.project-card.project-sep .project-accent-bar {
  background: #0f766e;
}

.project-card.project-sep .project-title-row h3 {
  color: #0f766e;
}

.project-card.project-sep .project-image {
  background: linear-gradient(135deg, #2e9d93 0%, #0f766e 100%);
}

.project-card.project-ma .project-accent-bar {
  background: #1f4f8b;
}

.project-card.project-ma .project-title-row h3 {
  color: #1f4f8b;
}

.project-card.project-ma .project-image {
  background: linear-gradient(135deg, #4b6f9d 0%, #1f4f8b 100%);
}

.project-card.project-performance .project-accent-bar {
  background: #b45309;
}

.project-card.project-performance .project-title-row h3 {
  color: #b45309;
}

.project-card.project-performance .project-image {
  background: linear-gradient(135deg, #d07a2f 0%, #b45309 100%);
}

.project-card.project-newbiz .project-accent-bar {
  background: #9f1239;
}

.project-card.project-newbiz .project-title-row h3 {
  color: #9f1239;
}

.project-card.project-newbiz .project-image {
  background: linear-gradient(135deg, #be355f 0%, #9f1239 100%);
}

/* -- NEW: Governance (slate) -- */
.project-card.project-gov .project-accent-bar {
  background: #475569;
}

.project-card.project-gov .project-title-row h3 {
  color: #475569;
}

.project-card.project-gov .project-image {
  background: linear-gradient(135deg, #6b7a8d 0%, #475569 100%);
}

/* -- NEW: Carve-Out (dark blue) -- */
.project-card.project-carveout .project-accent-bar {
  background: #1e3a5f;
}

.project-card.project-carveout .project-title-row h3 {
  color: #1e3a5f;
}

.project-card.project-carveout .project-image {
  background: linear-gradient(135deg, #3a5a7c 0%, #1e3a5f 100%);
}

/* -- NEW: Trust (indigo) -- */
.project-card.project-trust .project-accent-bar {
  background: #4338ca;
}

.project-card.project-trust .project-title-row h3 {
  color: #4338ca;
}

.project-card.project-trust .project-image {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
}

/* -- NEW: Client Experience (purple) -- */
.project-card.project-cx .project-accent-bar {
  background: #7c3aed;
}

.project-card.project-cx .project-title-row h3 {
  color: #7c3aed;
}

.project-card.project-cx .project-image {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

/* ---- Project Sub-sections ---- */
.project-group {
  margin-bottom: 3rem;
}

.project-group:last-child {
  margin-bottom: 0;
}

.subsection-heading {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 1.5rem;
}

/* ---- Edit Mode ---- */
.edit-mode [contenteditable]:hover {
  outline: 1px dashed var(--blue);
  cursor: text;
}

.edit-mode [contenteditable]:focus {
  outline: 2px solid var(--blue);
  background: rgba(59, 95, 252, 0.03);
}

.edit-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: var(--charcoal);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.edit-toolbar button {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-toolbar .btn-save {
  background: var(--blue);
  color: var(--white);
}

.edit-toolbar .btn-save:hover {
  background: var(--blue-hover);
}

.edit-toolbar .btn-discard {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.edit-toolbar .btn-discard:hover {
  color: var(--white);
  border-color: var(--white);
}

.edit-toolbar .btn-exit {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
}

.edit-toolbar .btn-exit:hover {
  color: var(--white);
}

.add-card-btn {
  display: block;
  width: 100%;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 2px dashed #d0d0d0;
  background: transparent;
  color: var(--gray-light);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
}

.add-card-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.edit-toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2001;
  padding: 0.75rem 1.5rem;
  background: #166534;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}

.edit-toast.visible {
  opacity: 1;
}

/* ---- Experience ---- */
.resume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.experience-card {
  background: var(--white);
  padding: 3rem;
  margin-bottom: 1.5rem;
}

.experience-date {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.experience-position {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}

.experience-company {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 0.15rem;
}

.experience-location {
  font-size: 0.85rem;
  color: var(--gray-light);
  margin-bottom: 1rem;
}

.experience-desc {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.8;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.contact-item {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--off-white);
  border-radius: 2px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.contact-icon {
  color: var(--blue);
  margin-bottom: 1rem;
}

.contact-item h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.contact-item a,
.contact-item p {
  font-size: 0.85rem;
  color: var(--gray);
}

.contact-item a:hover {
  color: var(--blue);
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 2rem;
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

@media (max-width: 1220px) {
  .nav-title {
    display: none;
  }

  .nav-sep {
    display: none;
  }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  .navbar.scrolled {
    padding: 0.75rem 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-title {
    display: none;
  }

  .nav-sep {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-left {
    padding: 8rem 2rem 3rem;
  }

  .hero-right {
    padding: 3rem 2rem;
  }

  .hero-hello {
    font-size: 3rem;
  }

  .container {
    padding: 0 1.5rem;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-image {
    min-height: 180px;
  }

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

  .experience-card {
    padding: 2rem;
  }

  .section {
    padding: 4rem 0;
  }
}
