/* =======================================
   BASE RESET & GLOBAL STYLES
   ======================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #111111;
  line-height: 1.6;
  overflow-x: hidden;
}

/* espaço global entre nav e footer */
main {
  padding-top: 120px;   /* evita sobrepor nav */
  padding-bottom: 100px; /* evita colar no footer */
}

h1, h2, h3 {
  font-family: 'IBM Plex Sans JP', sans-serif;
  font-weight: 400;
}

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

.container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

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

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #eaeaea;
  z-index: 1000;
  padding: 1.5rem 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 3rem;
}

nav a {
  text-decoration: none;
  color: #666666;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
  cursor: pointer;
}

nav a:hover {
  color: #111111;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #111111;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a[aria-current="page"] {
  color: #111111;
}

nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* =======================================
   HOME SECTION
   ======================================= */

#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#home h1 {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

#home p {
  max-width: 600px;
  font-size: 1.1rem;
  color: #666666;
  line-height: 1.8;
}

/* =======================================
   PAGE TITLES (BLOG / PROJECTS)
   ======================================= */

.page-title {
  text-align: center;
  text-transform: lowercase;
  font-family: 'IBM Plex Sans JP', sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.5px;
  margin-bottom: 3rem;
  color: #111111;
}

/* =======================================
   BLOG LIST
   ======================================= */

.blog-list {
  max-width: 700px;
  margin: 0 auto;
}

.blog-item {
  padding: 2rem 0;
  border-bottom: 1px solid #eaeaea;
  cursor: pointer;
  transition: opacity 0.3s ease;
  display: block;
}

.blog-item:hover {
  opacity: 0.7;
}

.blog-item:last-child {
  border-bottom: none;
}

.blog-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.blog-date {
  color: #666666;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: block;
}

.blog-briefing {
  color: #666666;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* =======================================
   PROJECTS (WORKS)
   ======================================= */

.projects-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  max-width: 900px;
  margin: 2rem auto 5rem; /* espaçamento extra */
}

.project-item {
  width: 220px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-card {
  display: block;
  width: 100%;
  aspect-ratio: 3/4; /* formato vertical */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eaeaea;
  background: #f8f8f8;
  transition: transform 0.25s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: scale(1.02);
  border-color: #111111;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-info {
  margin-top: 0.75rem;
  text-transform: lowercase;
}

.project-info h3 {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
  text-transform: lowercase;
}

.project-summary {
  color: #666666;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.25rem;
  text-transform: lowercase;

  .project-page .md-body > h1:first-child {
  display: none;
}
}

/* =======================================
   USES
   ======================================= */

.uses-container {
  max-width: 600px;
  margin: 0 auto;
}

.uses-category {
  margin-bottom: 3rem;
}

.uses-category:last-child {
  margin-bottom: 0;
}

.uses-category h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eaeaea;
}

.uses-category ul {
  list-style: none;
}

.uses-category li {
  padding: 0.75rem 0;
  color: #666666;
  font-size: 0.9rem;
  line-height: 1.6;
  border-bottom: 1px solid #f5f5f5;
}

.uses-category li:last-child {
  border-bottom: none;
}

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

#about {
  display: flex;
  justify-content: center;
  align-items: center;
}

#about .container {
  max-width: 500px;
  text-align: center;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #f5f5f5;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  font-size: 0.85rem;
  overflow: hidden;
}

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

#about p {
  margin-bottom: 2.5rem;
  color: #666666;
  line-height: 1.8;
  font-size: 1rem;
}

.social-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.social-links a {
  color: #666666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.social-links a:hover {
  color: #111111;
  border-bottom: 1px solid #111111;
}

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

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 1rem;
  color: #666666;
  font-size: 0.85rem;
  background: #ffffff;
  border-top: 1px solid #eaeaea;
  z-index: 999;
}

/* =======================================
   MARKDOWN / PROSE STYLING
   ======================================= */

.prose {
  max-width: 700px;
  margin: 0 auto;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: 'IBM Plex Sans JP', sans-serif;
  font-weight: 400;
  color: #111111;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h1 { font-size: 2rem; margin-top: 0; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.2rem; }

.prose p {
  color: #444444;
  font-size: 1rem;
  line-height: 1.8;
  margin: 1rem 0;
}

.prose a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover { opacity: .8; }

.prose ul, .prose ol {
  margin: 1rem 0 1rem 1.25rem;
  padding-left: 1rem;
}

.prose li { margin: .35rem 0; }

.prose blockquote {
  margin: 1.25rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid #eaeaea;
  color: #555555;
  background: #fafafa;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .95rem;
  background: #fafafa;
  padding: 0 .3rem;
  border: 1px solid #eee;
  border-radius: 4px;
}

.prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .95rem;
  line-height: 1.6;
  background: #0f1115;
  color: #e6e6e6;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  overflow: auto;
  margin: 1.25rem 0;
}

.prose img, .prose video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.prose hr {
  border: none;
  border-top: 1px solid #eaeaea;
  margin: 2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .95rem;
}

.prose th, .prose td {
  border: 1px solid #eee;
  padding: .6rem .75rem;
  text-align: left;
}

.prose thead th {
  background: #fafafa;
  font-weight: 600;
}

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

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
  }

  nav ul {
    gap: 1.5rem;
  }

  nav a {
    font-size: 0.85rem;
  }

  section {
    padding: 5rem 1.5rem 4rem;
  }

  #home h1 {
    font-size: 2.5rem;
  }

  #home p {
    font-size: 1rem;
  }

  .projects-gallery {
    gap: 1.5rem;
  }

  .project-item {
    width: 45%;
  }

  .work-card img {
    aspect-ratio: 3/4;
  }

  .blog-item {
    padding: 1.5rem 0;
  }

  .social-links {
    flex-direction: row;
    gap: 1.5rem;
  }
}

/* =======================================
   HOME CENTRALIZATION
   ======================================= */

#home {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 220px); /* respeita o nav e o footer */
  padding: 0 1rem;
}

.home-container {
  max-width: 650px;
}

#home h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-transform: lowercase;
}

.home-text {
  font-size: 1.05rem;
  color: #555555;
  line-height: 1.9;
  margin-bottom: 2rem;
}

.home-signature {
  font-size: 0.95rem;
  color: #777777;
  margin-top: 1rem;
}

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

#about {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px); /* centralizado respeitando nav/footer */
  text-align: center;
  padding: 0 1rem;
}

.about-container {
  max-width: 600px;
}

#about p {
  color: #555555;
  line-height: 1.8;
  font-size: 1rem;
  margin: 2rem 0;
}

.profile-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #f5f5f5;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  font-size: 0.85rem;
  overflow: hidden;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-links a {
  color: #666666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: #111111;
  border-bottom: 1px solid #111111;
}

#uses {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 220px);
  text-align: left;
  padding: 0 1rem;
}

.uses-container {
  width: 100%;
  max-width: 600px;
}

.uses-category h3 {
  text-transform: lowercase;
  font-weight: 400;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.uses-category li {
  text-transform: lowercase;
}
