/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F5F0E8;
  --bg2:       #EDE6D6;
  --bg3:       #E2D9C5;
  --text:      #2C1810;
  --text2:     #7A5C50;
  --accent:    #6B3A2A;
  --accent2:   #8B5A42;
  --border:    rgba(107, 58, 42, 0.2);
  --tag-bg:    #D9C9B5;
  --tag-text:  #3D1F14;
  --btn-bg:    #3D1F14;
  --btn-text:  #F5EDE0;
  --steam-color: #8B5A42;
  --logo-color: #3D1F14;
}

body.dark {
  --bg:        #0A0A0A;
  --bg2:       #141414;
  --bg3:       #1C1C1C;
  --text:      #EFEFEF;
  --text2:     #666666;
  --accent:    #DEDEDE;
  --accent2:   #AAAAAA;
  --border:    rgba(255, 255, 255, 0.1);
  --tag-bg:    #252525;
  --tag-text:  #CCCCCC;
  --btn-bg:    #EFEFEF;
  --btn-text:  #0A0A0A;
  --steam-color: #888888;
  --logo-color: #B08C71;
}

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  line-height: 1.7;
}

.wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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


/* ============================================================
   NAV
   ============================================================ */
nav {
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 15px;
  color: var(--logo-color);
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 0;
}

.logo-accent {
  color: var(--accent2);
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 13px;
  color: var(--text2);
  font-family: 'Courier New', monospace;
  transition: color 0.15s;
}

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

.nav-controls { 
  display: flex; 
  gap: 10px; 
  align-items: center;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text2);
  padding: 4px;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.ctrl-btn:hover {
  background: transparent;
  color: var(--text);
  opacity: 1;
}

#langBtn {
  font-size: 14px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 0.5px solid var(--border);
}

.hero-tag {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: var(--text2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 0.5px;
  background: var(--accent2);
}

/* Xícara + fumacinha */
.cup-wrap {
  position: relative;
  width: 60px;
  height: 80px;
  margin-bottom: 2.5rem;
}

.cup-main-svg {
  width: 52px;
  height: 52px;
  position: absolute;
  bottom: 0;
  left: 0;
  color: var(--text);
  z-index: 2; /* Fica na frente */
}

.steam-svg {
  position: absolute;
  top: 10px; /* Desce para brotar de dentro */
  left: 14px;
  color: var(--steam-color);
  opacity: 0.7;
  z-index: 1; /* Fica atrás */
}

.steam-path {
  stroke: currentColor;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  stroke-linecap: round;
  fill: none;
}

.steam-1 {
  animation: drawSteam 2.8s ease-in-out infinite;
}

.steam-2 {
  animation: drawSteam 2.8s ease-in-out infinite 1.4s; /* Atraso de 1.4s para intercalar */
  opacity: 0.5;
}

@keyframes drawSteam {
  0%   { stroke-dashoffset: 40; opacity: 0; transform: translateY(0); }
  20%  { opacity: 0.6; }
  70%  { stroke-dashoffset: 0;   opacity: 0.3; }
  100% { stroke-dashoffset: -40; opacity: 0; transform: translateY(-10px); }
}

.hero h1 {
  font-size: 58px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent2);
}

.hero-sub {
  font-size: 16px;
  color: var(--text2);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
  font-family: 'Courier New', monospace;
}

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


/* ============================================================
   BOTÕES
   ============================================================ */
.btn-primary {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  padding: 10px 24px;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-family: 'Courier New', monospace;
  border-radius: 3px;
  transition: opacity 0.15s;
}

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

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--accent2);
  padding: 10px 24px;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-family: 'Courier New', monospace;
  border-radius: 3px;
  transition: background 0.15s;
}

.btn-secondary:hover { background: var(--bg2); }


/* ============================================================
   SEÇÕES — BASE
   ============================================================ */
section {
  padding: 4.5rem 0;
  border-bottom: 0.5px solid var(--border);
}

.section-label {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: var(--text2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--border);
}


/* ============================================================
   SOBRE
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
}

.about-text .sub {
  font-size: 13px;
  color: var(--text2);
  font-family: 'Courier New', monospace;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 2px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.04em;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.stat-item {
  border-left: 2px solid var(--accent2);
  padding-left: 1rem;
}

.stat-num {
  font-size: 30px;
  font-weight: normal;
  color: var(--text);
}

.stat-label {
  font-size: 12px;
  color: var(--text2);
  font-family: 'Courier New', monospace;
}


/* ============================================================
   PROJETOS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.project-card {
  border: 0.5px solid var(--border);
  padding: 1.5rem;
  border-radius: 4px;
  background: var(--bg2);
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
  display: block;
}

.project-card:hover { border-color: var(--accent2); }

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.project-icon {
  font-size: 18px;
  opacity: 0.5;
}

.project-lang {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  color: var(--tag-text);
  background: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 2px;
}

.project-title {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  font-family: 'Courier New', monospace;
}

.project-footer {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 11px;
  color: var(--text2);
  font-family: 'Courier New', monospace;
  align-items: center;
}

.project-card-empty {
  border: 0.5px dashed var(--border);
  padding: 1.5rem;
  border-radius: 4px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.github-link {
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: var(--accent2);
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}

.github-link:hover { opacity: 0.7; }


/* ============================================================
   BLOG
   ============================================================ */
.blog-card {
  border: 0.5px solid var(--border);
  padding: 2.5rem;
  border-radius: 4px;
  background: var(--bg2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  transition: border-color 0.15s;
}

.blog-card:hover { border-color: var(--accent2); }

.blog-card h3 {
  font-size: 20px;
  font-weight: normal;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 13px;
  color: var(--text2);
  font-family: 'Courier New', monospace;
  max-width: 440px;
  line-height: 1.6;
}

.blog-arrow {
  font-size: 28px;
  color: var(--accent2);
  opacity: 0.5;
  flex-shrink: 0;
}


/* ============================================================
   CONTATO
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: var(--text2);
  letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
  background: var(--bg3);
  border: 0.5px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 2px;
  font-family: 'Courier New', monospace;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent2); }

.form-group textarea { height: 100px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-link-icon {
  width: 38px;
  height: 38px;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text2);
  background: var(--bg2);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
}

.link-label {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 2px;
}

.link-value {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text);
  transition: color 0.15s;
}

.link-value:hover { color: var(--accent2); }


/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 2rem 0;
}

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

.footer-text {
  font-size: 12px;
  color: var(--text2);
  font-family: 'Courier New', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-cup {
  width: 18px;
  height: 18px;
  color: var(--text2);
  opacity: 0.8;
}


/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 640px) {
  .nav-links { display: none; }

  .hero h1 { font-size: 36px; }

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

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

  .blog-card { flex-direction: column; gap: 1rem; }
  .blog-arrow { display: none; }

  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
