* {
  margin: 0;
  padding: 0;
  transition: color 0.1s, background-color 0.5s;
  color: inherit;
  text-decoration: inherit;
  box-sizing: border-box;
}

body {
  --primary-color: #ffb500; /* Amarelo/laranja do screenshot */
  --accent-01: white; /* Texto branco */
  --accent-02: rgba(255, 255, 255, 0.7); /* Texto com opacidade */
  --accent-03: #161616; /* Segundo background */
  --accent-04: rgb(15, 15, 15); /* Background principal */

  font-family: Calibri, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--accent-04);
  color: var(--accent-01);
}

body.light {
  --primary-color: #ff8c00; /* Laranja mais forte */
  --accent-01: #333333; /* Texto escuro */
  --accent-02: rgba(51, 51, 51, 0.7); /* Texto com opacidade */
  --accent-03: #ffffff; /* Segundo background */
  --accent-04: #f5f5f5;
}

/*======== Container ========*/

.container {
  display: grid;
  gap: 5px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px;
}

.box {
  background-color: var(--accent-03);
  border-radius: 25px;
}

/*======== Navbar again ========*/

.navbar {
  display: grid;
  gap: 5px;
  text-align: center;
  grid-template-columns: 1fr;
  grid-auto-columns: max-content;
  grid-auto-rows: max-content;
  position: sticky;
  top: 50px;
  z-index: 5;
  cursor: pointer;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--accent-02);
}

.navbar > .box {
  padding: 25px 10px;
}

.navbar > div {
  padding: 25px 10px;
}

.navbar ion-icon {
  font-size: 32px;
  margin: auto;
}

.navbar .active,
.navbar .item:hover {
  color: var(--primary-color);
  opacity: 1;
}

.navbar .item p {
  font-size: 12px;
  margin-top: 5px;
}

/*======== Profile Section ========*/

.profile {
  text-align: center;
  font-size: 20px;
  position: relative;
}

.profile .header {
  max-height: 40vh;
  width: 100%;
  border-radius: 25px 25px 0 0;
  clip-path: polygon(100% 0, 100% 80%, 80% 100%, 20% 100%, 0 80%, 0 0);
  object-fit: cover;
}

.profile .img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  position: relative;
  margin: -60px auto 0;
  border: var(--accent-04) 8px solid;
  border-radius: 35px;
}

.profile h2 {
  margin-top: 20px;
  font-size: 28px;
}

.profile p {
  margin-top: 10px;
  height: auto;
  min-height: 20px;
}

.profile ul {
  list-style: none;
  margin: 30px 0 80px 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.profile ul li {
  display: inline-block;
}

.profile .footer {
  position: sticky;
  top: calc(100dvh - 100px);
  width: 100%;
}

.profile table {
  width: 100%;
  padding-bottom: 15px;
  border-collapse: collapse;
}

.profile table td {
  width: 50%;
  text-align: center;
}

.profile table a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
}

.profile ion-icon {
  color: var(--accent-02);
  transition: color 0.5s, border-color 0.5s, background-color 0.5s;
  vertical-align: middle;
}

.profile ul ion-icon {
  padding: 10px;
  border-radius: 10px;
  background-color: var(--accent-04);
  font-size: 24px;
}

.profile ul ion-icon:hover {
  border-color: var(--accent-04);
  background-color: var(--primary-color);
}

.profile ion-icon:hover {
  color: var(--accent-04);
}

.profile table ion-icon {
  padding: 5px;
  border-radius: 10px;
  transition: color 0.5s, border-color 0.5s, background-color 0.5s;
}

.profile td:hover ion-icon {
  background-color: var(--primary-color);
  color: var(--accent-04);
}

.divider {
  height: 2px;
  width: 60%;
  margin: 15px auto;
}

.ltr {
  background: radial-gradient(
    ellipse at left,
    var(--accent-02) -70%,
    transparent 80%
  );
}

.rtl {
  background: radial-gradient(
    ellipse at right,
    var(--accent-02) -70%,
    transparent 80%
  );
}

/* Fix card inner overflow issue */

.card-inner {
  position: relative;
  margin: 15px 0;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  opacity: 1;
  visibility: visible;
  border-radius: 4px;
  display: block;
  line-height: 1.7;
}

.card-inner .card-wrap {
  overflow: visible;
  height: auto;
  padding: 30px 30px 0;
  position: relative;
}

/*======== Content Section ========*/
.content {
  padding: 20px 15px 20px 20px;
}

.content h2 {
  font-size: 2em;
  margin-bottom: 15px;
}

.content .wrapper {
  overflow: auto;
  max-height: 700px;
  padding-right: 10px;
  scroll-behavior: smooth;
}

.content ::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.content ::-webkit-scrollbar-track {
  background-color: var(--accent-04);
}

.content ::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 5px;
}

.content p {
  line-height: 1.5;
  font-size: 18px;
  margin-top: 15px;
}

.colored {
  color: var(--primary-color);
}

/* Achievements */
section {
  margin: 30px auto;
}

.achivements {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background-color: var(--accent-04);
  padding: 20px 30px;
  gap: 10px;
  border-radius: 10px;
}

.achivements h3 {
  font-size: 2.3em;
}

.achivements ion-icon {
  margin-bottom: -5px;
  color: var(--primary-color);
  font-size: 0.9em;
}

.achivements p {
  color: var(--accent-02);
  line-height: 1.2;
  font: 15px;
}

/* Skills Section */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
  color: var(--accent-02);
}

.skills div {
  align-items: center;
  padding: 15px;
  background-color: var(--accent-04);
  border-radius: 10px;
  cursor: pointer;
}

.skills div:hover {
  border: 2px solid var(--primary-color);
}

.skills ion-icon {
  font-size: 24px;
}

.skills p {
  margin-bottom: 0;
}

.skills ion-icon {
  color: var(--primary-color);
  font-size: 32px;
}

.experience {
  margin-top: 15px 0;
}

.experience p {
  padding-left: 20px;
  border-left: 2px solid var(--primary-color);
  margin-left: 17px;
  color: var(--accent-02);
}

.experience h4 {
  margin: 10px;
  padding-left: 25px;
  position: relative;
  color: var(--primary-color);
}

.experience h4::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 20px;
  background-color: var(--primary-color);
  position: absolute;
  left: 0;
  top: 5px;
}

.experience .date {
  padding: 5px 10px;
  background-color: var(--accent-04);
  border-radius: 4px;
  color: var(--accent-02);
  margin-top: 20px;
  font-size: 14px;
  font-weight: 400;
}

/*-- Contributions section --*/
.contribution {
  display: grid;
  grid-template-columns: 1fr;
  border: var(--accent-04) solid 3px;
  width: 100%;
}

.contribution activity-graph {
  padding: 10px 20px;
  color: var(--accent-02);
  --activity-graph-text-color: var(--accent-02);
  --activity-graph-rounded: 2px;
  --activity-graph-level-0-bg: var(--accent-04);
  --activity-graph-level-1-bg: #c6e48b;
  --activity-graph-level-2-bg: #7bc96f;
  --activity-graph-level-3-bg: #239a3b;
  --activity-graph-level-4-bg: var(--primary-color);
}

body.light .contribution activity-graph {
  --activity-graph-level-0-bg: #ebedf0;
  --activity-graph-level-1-bg: #9be9a8;
  --activity-graph-level-2-bg: #7bc96f;
  --activity-graph-level-3-bg: #239a3b;
  --activity-graph-level-4-bg: var(--primary-color);
}

.contribution > div {
  overflow: auto;
}

.contribution figure {
  overflow: hidden;
}

.contribution table {
  border-spacing: 2px;
}

/*---Projects Section---*/
.projects {
  display: grid;
  grid-template-columns: repeat(1, 1fr 1fr);
  gap: 10px;
}
.project-1 {
  grid-area: p1;
}
.project-2 {
  grid-area: p2;
}
.project-3 {
  grid-area: p3;
}

.projects div img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  transition: 0.5s;
}

.projects div {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.projects div:hover img {
  filter: brightness(0.5);
}

.projects div {
  position: relative;
}

.projects h3 {
  position: absolute;
  inset: 0;
  width: fit-content;
  height: fit-content;
  margin: auto;
  opacity: 0;
  transition: opacity 0.5s;
}

.projects div:hover h3 {
  opacity: 1;
}

body.light .projects h3 {
  color: var(--accent-01);
}

/* --- Blog Section --- */
.blogs {
  display: grid;
  grid-template-columns: repeat(1, 1fr 1fr);
  gap: 10px;
}

.blog-box img {
  width: 100%;
  border-radius: 7px;
  object-fit: cover;
}

.blog-box {
  cursor: pointer;
  border: var(--accent-04) 3px solid;
  padding: 10px;
  border-radius: 10px;
  background-color: var(--accent-04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.blog-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 181, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.blog-box:hover::before {
    transform: translateX(100%);
}

.blog-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 181, 0, 0.15);
}

.blog-box img {
    transition: transform 0.5s ease;
}

.blog-box:hover img {
    transform: scale(1.05);
}

.blog-box .link {
    color: var(--primary-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-box:hover .link {
    gap: 10px;
    color: var(--accent-01);
}

.blog-box:hover .link ion-icon {
    transform: translateX(5px);
}

.blog-box div {
  padding-top: 10px;
  border-radius: 10px;
  transform: background-color 0.5s;
}

.blog-box p {
  color: var(--accent-02);
}

.blog-box p,
blog-box h3 {
  margin: 0;
  transition: color 0.5s;
}

.blog-box:hover {
  border-color: var(--primary-color);
}

.blog-box:hover h3 {
  color: var(--primary-color);
}

.blog-box a,
.blog-box ion-icon {
  color: var(--primary-color);
  transition: color 0.5s, padding-left 0.5s;
}

.blog-box .link:hover ion-icon {
  padding-left: 5px;
}

.blog-box .link {
  display: flex;
  align-items: center;
  padding-top: 10px;
}

/* ======== BLOG MODAL (STYLE LIKE SCREENSHOT) ======== */
.blog-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(22, 22, 22, 0.95);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: var(--accent-03);
  margin: 30px auto;
  max-width: 900px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  position: relative;
  padding: 20px 40px 0 40px;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 36px;
  color: var(--accent-02);
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 40px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

/* Artigo no estilo do screenshot */
.blog-article {
  max-width: 800px;
  margin: 0 auto;
  font-family: "Georgia", serif;
  line-height: 1.8;
  color: var(--accent-01);
}

.blog-article h1 {
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
  color: var(--accent-01);
  letter-spacing: -0.5px;
}

.blog-article .subtitle {
  font-size: 1.2em;
  color: var(--accent-02);
  margin-bottom: 40px;
  font-style: italic;
  font-weight: 300;
}

.blog-article .article-meta {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent-04);
}

.blog-article .author-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.blog-article .meta-info {
  flex: 1;
}

.blog-article .meta-info h3 {
  font-size: 1.1em;
  margin: 0 0 5px 0;
  color: var(--accent-01);
  font-weight: 600;
}

.blog-article .meta-info p {
  margin: 0;
  color: var(--accent-02);
  font-size: 0.9em;
}

.blog-article .meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.blog-article .tag {
  background-color: var(--accent-04);
  color: var(--accent-02);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-article .tag.primary {
  background-color: var(--primary-color);
  color: var(--accent-04);
}

.blog-article .article-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 4px;
  margin: 40px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.blog-article .article-content {
  font-size: 1.15em;
  margin-top: 40px;
}

.blog-article .article-content p {
  margin-bottom: 25px;
  font-size: 1.1em;
}

.blog-article .article-content p:first-of-type {
  font-size: 1.2em;
  line-height: 1.9;
  color: var(--accent-01);
  margin-bottom: 35px;
}

.blog-article .article-content p strong {
  color: var(--accent-01);
  font-weight: 700;
}

.blog-article .article-content h2 {
  font-size: 1.8em;
  margin: 50px 0 20px 0;
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 1px solid var(--accent-04);
  padding-bottom: 10px;
}

.blog-article blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 25px;
  margin: 40px 0;
  font-style: italic;
  color: var(--accent-02);
  font-size: 1.2em;
  line-height: 1.7;
}

.blog-article ul,
.blog-article ol {
  margin: 25px 0;
  padding-left: 30px;
}

.blog-article li {
  margin-bottom: 12px;
  position: relative;
}

.blog-article ul li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.blog-article .code-block {
  background-color: var(--accent-04);
  padding: 25px;
  border-radius: 8px;
  margin: 30px 0;
  overflow-x: auto;
  border-left: 4px solid var(--primary-color);
}

.blog-article code {
  font-family: "Courier New", monospace;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
}

.blog-article .article-footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 2px solid var(--accent-04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-article .share-buttons {
  display: flex;
  gap: 15px;
}

.blog-article .share-btn {
  background-color: var(--accent-04);
  color: var(--accent-02);
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.blog-article .share-btn:hover {
  background-color: var(--primary-color);
  color: var(--accent-04);
}

/* Tema light */
body.light .blog-modal {
  background-color: rgba(245, 245, 245, 0.95);
}

body.light .blog-article {
  color: #333;
}

body.light .blog-article .subtitle {
  color: #666;
}

body.light .blog-article .article-content p:first-of-type {
  color: #333;
}

/*--- Contact Section ---*/

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.contact .input {
  width: 100%;
  background-color: var(--accent-04);
  border: var(--accent-04) 1px solid;
  color: var(--accent-02);
  border-radius: 5px;
  line-height: 3;
  outline: none;
  transition: border-color 0.5s;
}

.contact .input:hover,
.contact .input:focus {
  border: var(--primary-color) 1px solid;
}

.contact .submit {
  background-color: var(--primary-color);
  color: var(--accent-04);
  border: none;
  padding: 10px 50px;
  border-radius: 5px;
  transition: background-color 0.5s, filter 0.5s;
}

.contact .input::placeholder,
.contact .textarea::placeholder {
  color: var(--accent-03);
  filter: brightness(2);
  padding-left: 10px;
}

body.light .contact .input::placeholder,
body.light .contact .textarea::placeholder {
  color: var(--accent-01);
}

.contact .submit:hover {
  filter: brightness(0.8);
  cursor: pointer;
}

/* Responsiveness */

/* Desktop */
@media screen and (min-width: 1024px) {
  .container {
    grid-template-columns: 85px 430px 1fr;
    grid-template-rows: auto;
  }
  .skills div:nth-child(7) {
    grid-column: 3 / span 2;
  }

  .pojects {
    grid-template-areas:
      "p1 p1"
      "p2 p3";
    grid-auto-rows: 200px;
  }

  .navbar {
    grid-column: 1;
    grid-row: 1;
  }

  .profile {
    grid-column: 2;
    grid-row: 1;
  }

  .content {
    grid-column: 3;
    grid-row: 1;
  }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .container {
    grid-template-columns: 85px 1fr;
    max-width: 650px;
  }

  .navbar {
    grid-column: 1;
    grid-row: 1;
  }

  .profile {
    grid-column: 2;
    grid-row: 1;
  }

  .content {
    grid-column-start: 2;
    grid-column-end: 4;
  }

  .achivements {
    grid-template-columns: 1fr 1fr;
  }
  .skills div:nth-child(7) {
    grid-column: 1 / span 2;
  }

  .projects {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "p1 p1"
      "p2 p3";
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  .container {
    grid-template-columns: 1fr;
    max-width: 500px;
    padding: 20px;
    padding-top: 50px;
  }

  .nav {
    display: inline-grid;
    grid-template-columns: 85px 1fr;
  }

  .nav .divider,
  nav p {
    display: none;
  }

  .navbar > div {
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
      rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  }

  .navbar {
    display: inline-grid;
    grid-template-columns: 85px 1fr;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
      rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  }
  .box.nav {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }

  .box.nav .divider,
  .box.nav p {
    display: none;
  }

  .achivements {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .skills {
    grid-template-columns: 1fr 1fr;
  }

  .box.nav .item a {
    padding: 10px 5px;
  }

  .profile {
    order: 1;
  }

  .content {
    order: 2;
  }

  .navbar .theme ion-icon {
    display: flex;
  }

  .projects {
    grid-template-columns: repeat(1, 1fr);
    grid-template-areas:
      "p1"
      "p2"
      "p3";
  }

  .blogs {
    grid-template-columns: repeat(1, 1fr);
  }
  .contact {
    grid-template-columns: 1fr;
  }
  .modal-content {
    margin: 10px auto;
    border-radius: 0;
    max-height: 100vh;
  }

  .modal-body {
    padding: 20px;
    max-height: 90vh;
  }

  .modal-header {
    padding: 15px 20px 0 20px;
  }

  .close-modal {
    top: 15px;
    right: 15px;
    font-size: 28px;
  }

  .blog-article h1 {
    font-size: 1.8em;
  }

  .blog-article .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .blog-article .article-footer {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .blog-article .article-content p {
    font-size: 1em;
  }
}
