:root {
  --bg: #000000;
  --header: oklch(92% 0.004 286.3);
  --text: oklch(70.5% 0.015 286.067);
  --hover-bg: oklch(0.872 0.0106 261.79 / 10.2%);
  --muted: oklch(60% 0.015 286.067);
  --card: oklch(0.1448 0 0 / 50.2%);
  --border: oklch(1 0 0 / 20%);
  --focus: #6ea8ff;
  --sb-size: 5px;
}

[data-theme="light"] {
  --bg: #fafafa;
  --header: oklch(15% 0.015 286.32);
  --text: oklch(20% 0.015 286.32);
  --hover-bg: oklch(0.15 0.0106 261.79 / 10.2%);
  --muted: oklch(50% 0.015 286.32);
  --card: oklch(0.95 0.005 286.32);
  --border: oklch(0.8 0.005 286.32);
  --focus: #005fcc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

::selection {
  background-color: var(--header);
  color: var(--bg);
}

body {
  margin: 0;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
  transition: all 0.3s ease-in-out;
}

a:hover {
  opacity: 0.8;
  background-color: var(--hover-bg);
  border-radius: 5px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 5px;
}

main {
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 3rem;
  justify-items: center;
}

h1,
h3 {
  color: var(--header);
  margin: 0;
}

h1 {
  font-size: 1.5rem;
  font-weight: 400;
}

h3 {
  font-size: 0.8rem;
  font-weight: 600;
}

.intro {
  max-width: 34ch;
  font-weight: 500;
  font-size: 1.125rem;
}

.intro em {
  display: block;
}

.split {
  display: grid;
  gap: 3rem;
}

#projects-section {
  max-width: 100%;
}

#projects-section::-webkit-scrollbar {
  width: var(--sb-size);
}

#projects-section::-webkit-scrollbar-track {
  background-color: var(--hover-bg);
}

#projects-section::-webkit-scrollbar-thumb {
  background-color: var(--hover-bg);
  border-radius: 0;
}

.projects {
  display: grid;
  gap: 1rem;
}

.project-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease-in-out;
}

.project-card:hover {
  box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-card p {
  margin: 1.3rem 0 0.2rem;
  font-size: 0.9rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.5rem 0.5rem 0 0;
}

.project-link img {
  border-radius: 100%;
  user-select: none;
}

[data-theme="light"] .project-link img {
  background-color: var(--text);
}

.project-card a svg {
  width: 1rem;
  height: 1rem;
}

.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.link-with-icon svg {
  width: 1rem;
  height: 1rem;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

nav li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  box-shadow: 0 0 3px 1px rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 0.5rem;
  line-height: 0;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  overflow: hidden;
}

nav li:hover {
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  background: var(--card);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.skip-link:focus {
  top: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

footer {
  position: static;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem 0.2rem;
  display: flex;
  justify-content: space-between;
}

footer a:hover {
  text-decoration: underline;
}

#theme-toggle {
  background-color: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0rem;
}

#theme-toggle:hover {
  opacity: 0.8;
  color: var(--focus);
}

#theme-toggle svg {
  width: 2rem;
  height: 2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  #projects-section {
    max-width: 100%;
  }

  .projects {
    padding: 0.5rem;
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    max-width: 300px;
  }

  footer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 0;
    padding: 0.5rem;
  }
}
