:root {
  --background-main: #eceedf;
  --background-secondary: #393e46;
  --text-main: #222831;
  --text-secc: #31363f;
  --text-third: #eeeeee;
}

[theme='dark'] {
  --background-main: #222831;
  --background-secondary: #e1eacd;
  --text-main: #eeeeee;
  --text-secc: #d8d8d8;
  --text-third: #222831;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
* {
  transition: background-color 0.5s ease, color 0.5s ease,
    border-color 0.5s ease;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: var(--background-main);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}
main {
  display: grid;
  margin: 1rem 0;
  gap: 1rem;
  border-radius: 1.5rem;
  background: var(--background-secondary);
}
footer {
  text-align: center;
  padding-top: 1.5rem;
  color: #eeeeee25 !important;
}
a,
p,
i {
  color: var(--text-main);
}
.container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero */
.hero {
  text-align: center;
  margin: 16px 0;
  padding: 28px;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-main);
}
.hero .position {
  font-size: 1.25rem;
  color: var(--text-secc);
  margin: 0.75rem 0;
}
.hero img {
  width: 95%;
  height: 95%;
  border-radius: 50%;
  object-fit: cover;
}

/* Profile */
.profile {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12rem;
  height: 12rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  box-shadow: var(--shadow);
  border: 0.2rem solid var(--background-secondary);
  overflow: visible;
}
.profile img {
  width: 97%;
  height: 97%;
  object-fit: cover;
  display: block;
}

/* Theme Toggle */
.theme-toogle {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translate(-25%, -25%);
  width: 37px;
  height: 37px;
  border-radius: 50%;
  border: 0px solid var(--background-secondary);
  background: #fffff0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.theme-toogle i {
  position: absolute;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.15s;
}
html[theme='dark'] .theme-toogle .fa-moon {
  opacity: 1;
  color: #213448;
}
html:not([theme='dark']) .theme-toogle .fa-sun {
  opacity: 1;
  color: #ff9b00;
}

/* Social */
.social {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.social i {
  font-size: 2rem;
  color: var(--text-secc);
}
.social a:hover {
  transform: translateY(-0.2rem);
  transition: transform 0.2s;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  background: var(--background-secondary);
  border-radius: 1.5rem 1.5rem 0 0;
  transition: background-color 0.25s ease, box-shadow 0.25s ease,
    border-radius 0.25s ease, transform 0.2s ease;
}
.navbar nav {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}
.navbar ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
}
.navbar a {
  display: inline-block;
  text-decoration: none;
  color: var(--text-third);
  font-size: large;
  font-weight: 700;
  padding: 1.5rem 0.5rem 0 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.navbar a:hover {
  background: transparent;
  border-bottom-color: var(--text-third);
  transform: translateY(-0.2rem);
  transition: transform 0.2s;
}
.navbar a.active {
  border-bottom-color: var(--text-third);
}

/* Card */
.card {
  background: var(--background-main);
  border-radius: 0.75rem;
  padding: 1.7rem;
  margin: 0 1.5rem;
}
.card a,
h3 {
  text-decoration: none;
  font-size: larger;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}
.card:hover {
  transform: translateY(-0.2rem);
  transition: transform 0.2s;
}

/* Education */
#education .card {
  position: relative;
  background: var(--background-main);
  border-radius: 14px;
  padding: 20px 16px 8px;
}
#education .timeline {
  position: relative;
  margin: 6px 0 4px;
  padding-left: 2.5rem;
}
#education .timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--background-secondary);
  border-radius: 2px;
}
#education .timeline-item {
  position: relative;
  padding: 10px 0 16px;
}
#education .timeline-item::before {
  content: '';
  position: absolute;
  left: -1.8rem;
  top: 1rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--background-secondary);
  border: 1px solid var(--background-secondary);
}
[theme='dark'] #education .timeline-item::before {
  background: var(--background-secondary);
  border-color: var(--background-secondary);
}

.title {
  text-align: center;
  color: var(--text-third);
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.position {
  color: var(--text-secc);
  margin-top: -0.8rem;
  margin-bottom: 0.7rem;
}
.column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#skills .card span {
  padding: 0.25rem 0.5rem;
  color: var(--text-third);
  background-color: var(--background-secondary);
  border-radius: 1rem;
}

section#skills {
  margin-bottom: 2rem;
}
