/* ==========================================================================
   Manoel Renan Júnior — Portfolio Styles
   100% Static, Pure Vanilla CSS (No Tailwind, No Build Step)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties / Theme Variables
   -------------------------------------------------------------------------- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Colors */
  --background: #0d1117;
  --foreground: #f0f4f8;
  --card: #151c24;
  --card-hover: #1c2530;
  --card-foreground: #f0f4f8;
  --muted: #1c2430;
  --muted-foreground: #94a3b8;
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.15);
  --primary-foreground: #0d1117;
  --border: rgba(255, 255, 255, 0.1);
  --border-muted: rgba(255, 255, 255, 0.06);
  --ring: #f59e0b;

  --max-width: 72rem; /* 6xl */
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: #242f3d #0d1117;
}

/* Custom Scrollbar (WebKit / Blink) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0d1117;
}

::-webkit-scrollbar-thumb {
  background: #242f3d;
  border-radius: 9999px;
  border: 2px solid #0d1117;
  transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}


body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(245, 158, 11, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(59, 130, 246, 0.12), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--foreground);
}

/* Links & Interactive */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

ul, ol {
  list-style: none;
}

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

/* --------------------------------------------------------------------------
   3. Utility & Helper Classes
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }
.italic { font-style: italic; }

/* Grain background texture */
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(13, 17, 23, 0.75);
  border-bottom: 1px solid var(--border-muted);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.brand-logo:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.nav-menu a:hover {
  color: var(--foreground);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: transparent;
}

.btn-sm:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.5rem;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  padding-top: 6rem;
  padding-bottom: 8rem;
}

@media (min-width: 768px) {
  .hero-section {
    padding-top: 8rem;
    padding-bottom: 10rem;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-content {
  max-width: 100%;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-avatar-wrapper {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  padding: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(255, 255, 255, 0.08), rgba(59, 130, 246, 0.25));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 35px var(--primary-glow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-avatar-wrapper:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.6), 0 0 45px rgba(245, 158, 11, 0.35);
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: var(--card);
}

.hero-avatar-badge {
  position: absolute;
  bottom: -16px;
  right: -12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.1rem;
  background-color: rgba(21, 28, 36, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.hero-avatar-badge .badge-icon {
  font-size: 1.25rem;
}

.hero-avatar-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-avatar-badge .badge-text strong {
  font-size: 0.85rem;
  color: var(--foreground);
  font-weight: 600;
}

.hero-avatar-badge .badge-text span {
  font-size: 0.725rem;
  color: var(--muted-foreground);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: rgba(21, 28, 36, 0.4);
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
}

.pulse-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  margin-top: 2rem;
  font-size: 3rem;
  line-height: 0.95;
}

@media (min-width: 768px) {
  .hero-title { font-size: 4.5rem; }
}

@media (min-width: 1024px) {
  .hero-title { font-size: 5.5rem; }
}

.hero-subtitle {
  margin-top: 2rem;
  max-width: 42rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .hero-subtitle { font-size: 1.25rem; }
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
}

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

.stats-grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 42rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
}

@media (min-width: 768px) {
  .stat-number { font-size: 2.5rem; }
}

.stat-label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   6. Sections Common Setup
   -------------------------------------------------------------------------- */
.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
  border-top: 1px solid var(--border-muted);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.section-heading {
  margin-top: 1rem;
  font-size: 2.5rem;
}

@media (min-width: 768px) {
  .section-heading { font-size: 3rem; }
}

/* --------------------------------------------------------------------------
   7. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
  }
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.about-photo-card {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.about-photo-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.about-photo-img {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.about-photo-info {
  display: flex;
  flex-direction: column;
}

.about-photo-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground);
}

.about-photo-role {
  font-size: 0.775rem;
  color: var(--primary);
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   8. Stack Section
   -------------------------------------------------------------------------- */
.stack-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.stack-desc {
  max-width: 28rem;
  color: var(--muted-foreground);
}

.stack-cards-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .stack-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stack-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: rgba(21, 28, 36, 0.4);
  padding: 1.5rem;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.stack-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background-color: rgba(28, 37, 48, 0.7);
}

.stack-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: var(--primary-glow);
  color: var(--primary);
}

.stack-card-title {
  font-size: 1.25rem;
}

.tag-list {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.stack-card:hover .tag-pill {
  color: var(--foreground);
}

/* --------------------------------------------------------------------------
   9. Experience Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  border-left: 1px solid var(--border);
  margin-left: 0.75rem;
}

@media (min-width: 768px) {
  .timeline {
    margin-left: 0;
  }
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 3.5rem;
}

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

@media (min-width: 768px) {
  .timeline-item {
    padding-left: 0;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
  }
}

.timeline-dot {
  position: absolute;
  left: -7px;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 0 4px var(--background);
}

@media (min-width: 768px) {
  .timeline-dot {
    left: 173px;
  }
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .timeline-date {
    text-align: right;
    padding-right: 2.5rem;
  }
}

.timeline-content {
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .timeline-content {
    margin-top: 0;
    border-left: 1px solid var(--border);
    padding-left: 2.5rem;
  }
}

.timeline-company {
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .timeline-company { font-size: 1.75rem; }
}

.timeline-role {
  margin-top: 0.25rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.timeline-summary {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.stack-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tag {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   10. Education Section
   -------------------------------------------------------------------------- */
.education-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .education-grid {
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
  }
}

.education-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.education-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: rgba(21, 28, 36, 0.4);
  padding: 1.5rem;
}

.education-card-title {
  margin-top: 0.5rem;
  font-size: 1.5rem;
}

.education-place {
  margin-top: 0.25rem;
  color: var(--primary);
  font-size: 0.875rem;
}

.education-detail {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
}

.extras-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   11. Contact Section
   -------------------------------------------------------------------------- */
.contact-box {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background-color: rgba(21, 28, 36, 0.4);
  padding: 2.5rem 1.5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .contact-box {
    padding: 4rem;
  }
}

.contact-title {
  margin-top: 1rem;
  font-size: 2.25rem;
  max-width: 40rem;
}

@media (min-width: 768px) {
  .contact-title { font-size: 3.5rem; }
}

.contact-subtitle {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.contact-cards-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

@media (min-width: 640px) {
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: rgba(13, 17, 23, 0.4);
  padding: 1rem;
}

.contact-card:hover {
  border-color: var(--primary);
}

.contact-card-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-card-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.contact-card-val {
  font-weight: 500;
  font-size: 0.875rem;
}

.contact-card-arrow {
  margin-left: auto;
  width: 1rem;
  height: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.contact-card:hover .contact-card-arrow {
  opacity: 1;
}

.location-tag {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-muted);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* --------------------------------------------------------------------------
   13. Responsive Navigation Menu (Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .nav-menu.is-open {
    display: flex;
  }
}
