/* ══════════════════════════════════════════════
   GLADSON SIMPLÍCIO — Resume 2.0
   Monochrome · Yellow Accent · Three.js
   ══════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --color-primary: #0F172A;
  --color-accent: #38BDF8;
  --color-accent-dark: #0284C7;
  --color-bg: #0B1120;
  --color-bg-alt: #1E293B;
  --color-text: #F8FAFC;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-border: #334155;
  --color-border-light: #1E293B;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-cursive: 'Caveat', cursive;

  --letter-spacing-wide: 0.15em;
  --letter-spacing-wider: 0.3em;
}

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

/* ─── Three.js Canvas ─── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Page Container ─── */
.resume-page {
  position: relative;
  z-index: 10;
  max-width: 960px;
  margin: 40px auto;
  background: var(--color-bg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */

.header {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid var(--color-border);
  min-height: 420px;
}

/* Left: About Me */
.header-left {
  flex: 1;
  padding: 40px 35px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.about-box {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 30px 25px;
  position: relative;
  z-index: 2;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.about-circle {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 30px;
  height: 30px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
}

.about-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  margin-bottom: 15px;
}

.about-text {
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* Yellow role circle */
.role-circle {
  position: absolute;
  top: 30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.3);
}

.role-circle-text {
  font-family: var(--font-cursive);
  font-size: 1.5rem;
  color: var(--color-primary);
  text-align: center;
  line-height: 1.2;
}

/* Decorative arcs */
.arc {
  position: absolute;
  border: 1.5px solid var(--color-border-light);
  border-radius: 50%;
  z-index: 1;
}

.arc-1 {
  width: 200px;
  height: 200px;
  bottom: 30px;
  left: -40px;
}

.arc-2 {
  width: 140px;
  height: 140px;
  bottom: 60px;
  left: 10px;
}

/* Right: Name + Photo */
.header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 420px;
  z-index: 0;
}

.header-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.header-photo-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

.header-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 35px 30px;
  background: linear-gradient(to top, rgba(11, 17, 32, 1) 0%, rgba(11, 17, 32, 0.7) 50%, transparent 100%);
  z-index: 2;
}

.header-name h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  line-height: 1.15;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header-name .subtitle {
  font-family: var(--font-cursive);
  font-size: 1.6rem;
  color: var(--color-accent);
  margin-top: 5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* ══════════════════════════════════════════════
   CONTACT BAR
   ══════════════════════════════════════════════ */

.contact-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 35px;
  border-bottom: 2px solid var(--color-border);
  gap: 24px;
  flex-wrap: wrap;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

.contact-bar.hidden {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: none;
  pointer-events: none;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.contact-item span {
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   MAIN CONTENT — Two Columns
   ══════════════════════════════════════════════ */

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

/* Left Column */
.content-left {
  padding: 40px 35px;
  border-right: 1px solid var(--color-border-light);
}

/* Right Column */
.content-right {
  padding: 40px 35px;
}

/* ─── Section Headers ─── */
.section-header {
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header-icon {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   EXPERIENCE TIMELINE
   ══════════════════════════════════════════════ */

.timeline {
  position: relative;
  padding-left: 60px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 10px;
  bottom: 10px;
  width: 1.5px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

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

.timeline-year {
  position: absolute;
  left: -60px;
  top: 0;
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.6rem;
  line-height: 1.2;
  color: var(--color-primary);
  z-index: 1;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 3px;
}

.timeline-company {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ══════════════════════════════════════════════
   EDUCATION
   ══════════════════════════════════════════════ */

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.edu-item {
  position: relative;
  padding-left: 55px;
}

.edu-year {
  position: absolute;
  left: 0;
  top: 0;
  width: 45px;
  height: 45px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.55rem;
  line-height: 1.2;
  color: var(--color-primary);
}

.edu-degree {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.edu-school {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   SKILLS — Progress Bars
   ══════════════════════════════════════════════ */

.skills-section {
  margin-bottom: 35px;
}

.skills-section:last-child {
  margin-bottom: 0;
}

.education-section {
  margin-top: 35px;
}

.skill-item {
  margin-bottom: 18px;
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.skill-name {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}

.skill-percent {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.skill-bar {
  width: 100%;
  height: 10px;
  border: 1.5px solid var(--color-border);
  background: transparent;
  position: relative;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--color-accent);
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.skill-fill.animated {
  /* width is set via inline style */
}

/* ══════════════════════════════════════════════
   EXTRA KNOWLEDGE — Projetos Pessoais
   ══════════════════════════════════════════════ */

.extra-section {
  border-top: 2px solid var(--color-border);
}

.extra-header {
  margin-bottom: 20px;
  padding: 0 35px;
}

.extra-body {
  padding: 0 35px 40px;
}

/* Project line */
.extra-project {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.extra-project:last-of-type {
  margin-bottom: 0;
}

.extra-project-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
}

.extra-project strong {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text);
}

.extra-project-meta {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

/* Badges row */
.extra-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding-left: 18px;
}

.extra-project + .extra-badges + .extra-project {
  margin-top: 4px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-light);
}

.extra-badge {
  display: inline-block;
  padding: 4px 12px;
  border: 1.5px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.4;
}

/* ══════════════════════════════════════════════
   COVER LETTER VIEW
   ══════════════════════════════════════════════ */

.cover-letter-view {
  display: none;
}

.cover-letter-view.active {
  display: block;
}

.resume-view {
  display: block;
}

.resume-view.hidden {
  display: none;
}

.cover-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.cover-left {
  padding: 40px 35px;
  border-right: 1px solid var(--color-border-light);
}

.cover-right {
  padding: 40px 35px;
}

.cover-letter-text {
  font-size: 0.87rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.cover-letter-text p {
  margin-bottom: 15px;
}

.cover-letter-text .date {
  text-align: right;
  margin-bottom: 30px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.cover-letter-text .greeting {
  margin-bottom: 15px;
  font-weight: 600;
}

.cover-letter-text .signature {
  font-family: var(--font-cursive);
  font-size: 2rem;
  color: var(--color-text);
  margin-top: 30px;
}

.cover-letter-text .regards {
  margin-top: 40px;
  font-size: 0.82rem;
}

.send-to-block {
  margin-bottom: 30px;
}

.send-to-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--color-border);
}

.send-to-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.send-to-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.send-to-item-link:hover {
  color: var(--color-accent-dark);
}

.send-to-item-link.location-item:hover {
  color: var(--color-text-secondary);
}

.send-to-item-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.send-to-item-link span {
  word-break: break-all;
}

/* ══════════════════════════════════════════════
   VIEW TOGGLE BUTTON
   ══════════════════════════════════════════════ */

.view-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  background: var(--color-accent);
  color: var(--color-primary);
  border: 2px solid var(--color-accent);
  border-radius: 30px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-toggle:hover {
  background: var(--color-primary);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.view-toggle svg {
  width: 16px;
  height: 16px;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */

.resume-footer {
  border-top: 2px solid var(--color-border);
  padding: 18px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-social svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Timeline pop-in */
.timeline-item {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  .header {
    flex-direction: column;
  }

  .header-right {
    order: -1;
    min-height: 280px;
  }

  .header-name h1 {
    font-size: 1.6rem;
  }

  .role-circle {
    width: 100px;
    height: 100px;
    top: 15px;
    right: 15px;
  }

  .role-circle-text {
    font-size: 1.1rem;
  }

  .contact-bar {
    flex-direction: column;
    gap: 10px;
    padding: 15px 20px;
  }

  .contact-divider {
    width: 40px;
    height: 1px;
  }

  .main-content,
  .cover-content {
    grid-template-columns: 1fr;
  }

  .content-left,
  .cover-left {
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .extra-groups {
    grid-template-columns: 1fr;
  }

  .extra-header {
    padding: 0 20px;
  }

  .extra-body {
    padding: 0 20px 30px;
  }

  .view-toggle {
    bottom: 15px;
    right: 15px;
    padding: 10px 18px;
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .header-left {
    padding: 25px 20px;
  }

  .about-box {
    padding: 20px 15px;
  }

  .content-left,
  .content-right,
  .cover-left,
  .cover-right {
    padding: 25px 20px;
  }

  .timeline {
    padding-left: 50px;
  }

  .timeline-year {
    width: 40px;
    height: 40px;
    left: -50px;
    font-size: 0.55rem;
  }
}

/* Print */
@media print {
  :root {
    --color-primary: #1A1A1A;
    --color-accent: #2563EB;
    --color-accent-dark: #1D4ED8;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8F8F8;
    --color-text: #1A1A1A;
    --color-text-secondary: #475569;
    --color-text-muted: #64748B;
    --color-border: #CBD5E1;
    --color-border-light: #E2E8F0;
  }

  body {
    background: #FFFFFF;
  }

  #bg-canvas,
  .view-toggle {
    display: none !important;
  }

  .resume-page {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .about-box {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border: 1px solid var(--color-border);
  }

  .header-name {
    background: transparent;
  }

  .header-name h1, .header-name .subtitle {
    text-shadow: none;
    color: var(--color-text);
  }

  .timeline-item,
  .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
  }

  .skill-fill {
    transition: none !important;
  }
}
