/* ============================================
   Guilherme Iobbi — Portfolio
   Modern redesign 2025
   ============================================ */

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

:root {
  --bg:           #0c0c0c;
  --bg-surface:   #141414;
  --bg-elevated:  #1e1e1e;
  --border:       #252525;
  --border-hover: #3a3a3a;
  --text-primary: #f0f0f0;
  --text-secondary: #888;
  --text-muted:   #444;
  --accent:       #00ADD8;
  --accent-dim:   rgba(0, 173, 216, 0.08);
  --accent-glow:  rgba(0, 173, 216, 0.04);
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --radius:       10px;
  --radius-sm:    6px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 100px 0;
}

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

.section-header {
  margin-bottom: 56px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.section-header h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
}

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

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 0;
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  letter-spacing: 0.5px;
}

.lang-toggle .active {
  color: var(--accent);
}

.lang-toggle .sep {
  color: var(--text-muted);
}

.lang-toggle a {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.lang-toggle a:hover {
  color: var(--text-primary) !important;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 28px 80px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
}

/* Subtle background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Accent glow in hero */
.hero-glow {
  position: absolute;
  top: 10%;
  left: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(60px, 11vw, 130px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -4px;
  margin-bottom: 36px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 500px;
  margin-bottom: 52px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  color: var(--text-muted);
  font-size: 18px;
  animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(10px); opacity: 0.8; }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #22c6f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 173, 216, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================
   ABOUT
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.85;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.25s, transform 0.25s;
}

.about-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.about-card-icon {
  font-size: 20px;
  line-height: 1;
}

.about-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.about-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   STACK
   ============================================ */

.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
}

.stack-category {
  /* individual category block */
}

.category-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}

.tag:hover {
  border-color: var(--border-hover);
}

.tag.tag-primary {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.tag.tag-primary::before {
  content: '★';
  font-size: 10px;
}

/* ============================================
   EXPERIENCE
   ============================================ */

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

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.exp-item:first-child {
  border-top: 1px solid var(--border);
}

.exp-meta {
  padding-top: 4px;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.exp-company {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
}

.exp-content {}

.exp-role {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.exp-company-primary {
  font-size: 14px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 16px;
  display: block;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-bullets li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}

.exp-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  top: 2px;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-intro p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 400px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.contact-item:first-child {
  border-top: 1px solid var(--border);
}

.contact-item:hover {
  color: var(--text-primary);
}

.contact-item:hover .contact-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.contact-icon-wrap {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.contact-item:hover .contact-icon-wrap {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.contact-text {
  flex: 1;
}

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: block;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-arrow {
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-accent {
  color: var(--accent);
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .exp-meta {
    display: flex;
    gap: 12px;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .stack-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .nav-links {
    gap: 20px;
  }

  .hero-title {
    letter-spacing: -2px;
  }

  .hero-scroll {
    display: none;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .nav-links > a:not(.lang-toggle *) {
    display: none;
  }
}
