/* General styles */
:root {
  --primary-color: #fefefe;
  --secondary-color: #393939;
  --accent-color: #0172ad;
  --border-color: #e2e8f0;
  --gradient-accent: linear-gradient(
    135deg,
    #3b82f6 0%,
    var(--accent-color) 100%
  );
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
  --shadow-xl:
    0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
}

html {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  padding: 0.5em 1em 4em;
  font-family:
    Inter, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--secondary-color);
  background: linear-gradient(
    135deg,
    rgb(255 255 255 / 90%) 0%,
    rgb(248 250 252 / 90%) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  line-height: 1.6;
  font-feature-settings:
    'kern' 1,
    'liga' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

header {
  position: fixed;
  z-index: 1;
  align-self: center;
  top: 90%;
}

main {
  margin-top: 1em;
  width: 100%;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: var(--gradient-accent);
  background-clip: text;
  text-wrap: balance;
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
}

p,
li {
  max-width: 75ch;
  line-height: 1.75;
  margin-block: 1lh;
  font-weight: 400;
  text-wrap: pretty;
}

strong,
b {
  color: var(--accent-color);
  font-weight: 600;
}

a {
  color: var(--accent-color);
  font-weight: 500;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

a:visited {
  color: rgb(from var(--accent-color) calc(r - 65) calc(g - 65) calc(b - 65));
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.875rem;
}

.nav-header {
  display: flex;
  gap: 2rem;
  justify-content: center;
  background: rgb(from var(--primary-color) r g b / 80%);
  backdrop-filter: blur(10px) saturate(200%);
  border-radius: 5rem;
  padding: 0.75rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgb(from var(--border-color) r g b / 80%);
}

.nav-header-link {
  text-decoration: none;
  color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  overflow: hidden;
}

.nav-header-link:visited {
  color: var(--secondary-color);
}

.nav-header-link-active {
  color: var(--accent-color);
}

.nav-header-link-active:visited {
  color: var(--accent-color);
}

/* Index styles */
.profile-img {
  width: 120px;
  height: 120px;
  border-radius: calc(infinity * 1px);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--primary-color);
}

.profile-desc {
  max-width: 70ch;
  font-size: 1.125rem;
  line-height: 1.7;
  margin: 2rem 0;
}

.profile-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-social-link {
  color: var(--accent-color);
  transition: all 0.2s ease-in-out;
  padding: 0.75rem;
  border-radius: 50%;
  background: var(--primary-color);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.blog-list {
  margin-top: 3rem;
}

/* Project styles */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-list-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--primary-color);
  box-shadow: var(--shadow-md);
  border-radius: 1rem;
  padding: 2rem;
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.project-list-card:visited {
  color: var(--secondary-color);
}

.project-list-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-list-card-title svg {
  color: var(--accent-color);
}

.project-list-card-title-accent {
  color: var(--accent-color);
  font-weight: 600;
}

.project-list-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.project-list-card p {
  margin: 0;
  line-height: 1.6;
}

/* About me styles */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background: var(--secondary-color);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  row-gap: 1.5em;
  padding-left: 1em;
}

.timeline-event {
  display: flex;
  align-items: baseline;
}

.timeline-event-marker {
  fill: var(--accent-color);
  position: relative;
  left: -6px;
  top: 6px;
  min-width: 12px;
}

.timeline-event-content {
  padding-left: 1em;
}

@media (width >= 568px) {
  /* General styles */
  body {
    padding: 0.75em 5em 0;
  }

  main {
    margin-top: 4.75em;
  }

  header {
    top: inherit;
  }

  .nav-header {
    gap: 3rem;
    padding: 1rem 2rem;
  }

  .nav-header-link {
    font-size: inherit;
  }

  .nav-header-link svg {
    display: none;
  }
}

@media (width >= 768px) {
  /* General styles */
  body {
    max-width: 1024px;
    padding-left: 8em;
    padding-right: 8em;
    margin-left: auto;
    margin-right: auto;
  }

  a {
    transition: all 0.2s ease-in-out;
    position: relative;
  }

  a:hover {
    text-decoration: none;
  }

  a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
    transition: width 0.3s ease-in-out;
  }

  a:hover::after {
    width: 100%;
  }

  a:visited::after {
    background: rgb(
      from var(--accent-color) calc(r - 65) calc(g - 65) calc(b - 65)
    );
  }

  .nav-header {
    transition: all 0.3s ease-in-out;
  }

  .nav-header:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
  }

  .nav-header-link {
    overflow: inherit;
  }

  .nav-header-link:hover {
    color: var(--accent-color);
  }

  .nav-header-link-active::after {
    width: 100%;
  }

  .nav-header-link:visited::after {
    background: var(--accent-color);
  }

  /* Index styles */
  .profile-img {
    transition: all 0.3s ease-in-out;
  }

  .profile-img:hover {
    transform: scale(1.05) translateY(-4px);
  }

  .profile-social-link:hover {
    color: var(--primary-color);
    background: var(--gradient-accent);
    border-color: transparent;
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px) scale(1.1);
  }

  /* Project styles */
  .project-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
  }

  .project-list-card {
    transition: all 0.3s ease-in-out;
  }

  .project-list-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px) scale(1.02);
  }

  .project-list-card-title svg {
    transition: all 0.2s ease-in-out;
  }

  .project-list-card:hover .project-list-card-title svg {
    transform: scale(1.1) rotate(5deg);
  }

  /* About me styles */
  .timeline::before {
    left: 50%;
  }

  .timeline {
    padding-left: 0;
  }

  .timeline-event:nth-child(even) {
    flex-direction: row-reverse;
  }

  .timeline-event-marker {
    order: 1;
  }

  .timeline-event-content {
    width: 50%;
    text-align: right;
    padding-left: 0;
    padding-right: 2em;
  }

  .timeline-event:nth-child(odd) .timeline-event-marker {
    left: -6px;
  }

  .timeline-event:nth-child(even) .timeline-event-content {
    text-align: left;
    padding-left: 2em;
    padding-right: 0;
  }

  .timeline-event:nth-child(even) .timeline-event-marker {
    left: 6px;
  }
}
