/* COMMON */
:root {
  --primary-color: #fbd46d;
  --primary-color-dark: #64552c;
  --primary-color-shadow: #a38a47;
  --primary-color-hover: #e6bd52;
  --primary-color-shadow-hover: #8f7a3e;
  --primary-color-button-hover: #e6c95a;
  --white-color: #e0e0e0;
  --background-color: #121212;

  --text-color: #e0e0e0;
  --text-secondary: #a0a0a0;
  --card-bg: #1e1e1e;
  --border-color: #2d2d2d;
  --code-bg: #2a2a2a;
  --font-heading: "IBM Plex Mono", sans-serif;
  --font-body: "IBM Plex Mono", sans-serif;
  --font-code: "IBM Plex Mono", monospace;
  --font-blog: "IBM Plex Sans", sans-serif;
}

::-moz-selection {
  color: var(--background-color);
  background: var(--primary-color-hover);
}

::selection {
  color: var(--background-color);
  background: var(--primary-color-hover);
}

body {
  position: relative;
  background-color: var(--background-color);
  font-family: var(--font-body);
  color: var(--text-color);
}

code,
pre {
  font-family: var(--font-code);
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#content {
  flex-grow: 1;
}

.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.footer {
  color: var(--text-secondary);
  width: 100%;
  display: flex;
  justify-content: center;
}

.divider {
  color: var(--border-color);
}

/* NAV */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background-color);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  user-select: none;
  font-weight: 500;
  font-family: var(--font-heading);
  padding-top: 10px;
}

.nav-tab {
  position: relative;
  color: var(--white-color);
  font-size: 1.1rem;
  text-decoration: none;
  padding: 8px 0;
  display: inline-block;
  line-height: 1.2;
}

.nav-tab:hover {
  color: var(--primary-color);
}

.nav-tab-selected {
  position: relative;
  color: var(--primary-color);
  font-size: 1.1rem;
  text-decoration: none;
  padding: 8px 0;
  display: inline-block;
  line-height: 1.2;
}

.nav-tab-selected::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .logo {
    display: none;
  }

  .profile-header {
    flex-direction: column;
  }
}

.logo {
  position: absolute;
  left: 2rem;
  z-index: 9999;
  flex-shrink: 0;
  font-size: 1.5rem;
  font-family: var(--font-heading);
  user-select: none;
}

.tabs-wrapper {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-grow: 1;
}

.logo-tld {
  margin-right: auto;
  color: var(--primary-color);
}

.logo-cursor {
  margin-right: auto;
  animation: blinkFade 1.3s infinite;
  animation-timing-function: ease-in-out;
}

.url-white {
  color: var(--text-color);
}

.url-white:hover {
  color: var(--primary-color-hover);
}

.url-white-icon {
  color: var(--text-color);
}

.underline {
  text-decoration: underline;
}

@keyframes blinkFade {
  0%,
  25% {
    opacity: 1;
  }

  50%,
  75% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* HOME */
.home-content {
  justify-content: center;
  align-items: center;
}

.home-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.home-content h4 {
  color: var(--white-color);
  font-weight: 600;
}

.home-content p {
  font-family: var(--font-body);
  line-height: 1.6;
}

.option-buttons {
  display: flex;
  align-items: center;
}

.option-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 150px;
  height: 40px;
  border-radius: 10px;
  background-color: var(--primary-color);
  margin-right: 24px;

  border-right: 4px solid var(--primary-color-shadow);
  border-bottom: 4px solid var(--primary-color-shadow);

  text-decoration: none;
  transition: background-color 0.2s ease;
}

.option-button:hover {
  background-color: var(--primary-color-button-hover);
  border-right-color: var(--primary-color-shadow-hover);
  border-bottom-color: var(--primary-color-shadow-hover);
}

.option-button:active {
  border-right: none;
  border-bottom: none;
  border-left: 4px solid var(--background-color);
  border-top: 4px solid var(--background-color);
  border-top-left-radius: 12px;
}

.option-button ::selection {
  color: var(--primary-color);
  background: var(--background-color);
}

.option-button p {
  color: var(--primary-color-dark);
  font-size: 0.9rem;
}

.cta-contacts {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.cta-icons {
  display: flex;
  gap: 8px;
}

.cta-text {
  margin-top: 64px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0px;
}

/* ABOUT */

.about-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 32px;
}

.about-content p {
  margin: 0;
}

.contact-url-indicator {
  font-size: 0.75em;
  opacity: 0.8;
}

.profile-header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-info {
  display: flex;
  justify-content: center;
  align-items: start;
  flex-direction: column;
  gap: 4px;
}

.profile-picture {
  width: 170px;
  height: 170px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 30%;

  background-color: var(--primary-color);
  padding: 6px;

  border-right: 4px solid var(--primary-color-shadow);
  border-bottom: 4px solid var(--primary-color-shadow);
}

.profile-picture:active {
  border-right: none;
  border-bottom: none;
  border-left: 4px solid var(--background-color);
  border-top: 4px solid var(--background-color);
}

.profile-figure {
  position: relative;
  display: inline-block;
  padding-top: 20px;
}

.profile-picture-label {
  display: inline-block;
  cursor: pointer;
}

.speech-bubble {
  position: absolute;
  top: 50%;
  left: 70%;
  transform: translateY(-50%);
  max-width: 120px;
  padding: 8px 12px;
  background-color: #ffffff;
  color: #333333;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  font-size: 0.9rem;
  line-height: 1.2;
  z-index: 10;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    visibility 0.15s;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #ffffff;
}

.toggle-speech-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-speech-checkbox:checked ~ .speech-bubble {
  visibility: visible;
  opacity: 1;
}

.contact {
  color: var(--text-color);
}

.contact:hover {
  color: var(--primary-color-hover);
}

.contact-url {
  text-decoration: none;
  color: inherit;
}

.profile-details {
  margin-top: 36px;
}

.about-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  padding-bottom: 0.25rem;
}

.about-content p,
.about-content a {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  text-decoration: none;
}

.about-content a:hover {
  color: var(--primary-color-hover);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.project-item {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 0.5rem;
}

/* BLOG */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.blog-list-item {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.blog-list-item:hover {
  border-color: var(--primary-color);
  background-color: #1c1c1c;
}

.blog-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.blog-title {
  font-size: 1.2rem;
  color: var(--text-color);
  font-weight: 600;
  font-family: var(--font-heading);
}

/* BLOG POST */

.blog-post {
  font-family: var(--font-blog);
}

.blog-post h1,
.blog-post h2,
.blog-post h3,
.blog-post code,
.blog-post pre {
  font-family: var(--font-code);
}

.blog-post-title {
  margin-top: 0px;
}

.blog-post h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post h1 {
  font-size: 2rem;
}

.blog-post h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.blog-post p {
  font-size: 1.15rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  color: var(--text-color);
  letter-spacing: 0.012em;
}

.blog-post .blog-post-date {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.blog-post ul {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.blog-post li {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-color);
}

.blog-post em {
  color: var(--text-secondary);
  font-style: italic;
}

.blog-post strong {
  color: var(--white-color);
  font-weight: bold;
}

.blog-post code:not(pre code) {
  background-color: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  color: var(--primary-color);
  font-size: 0.86em;
}

.blog-post pre {
  display: block;
  padding: 1.1em;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.blog-post hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* ERROR PAGE */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  text-align: center;
}

.error-page h1 {
  margin: 0px;
  padding: 0px;
}

.error-container {
  max-width: 400px;
  padding: 2rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.error-code {
  font-size: 3rem;
  font-family: var(--font-heading);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.error-message {
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.error-button {
  color: var(--font-color);
}

.error-button:hover {
  color: var(--primary-color-hover);
}
