:root {
  --bg: #111111;
  --text-dark: #f9fafb;
  --text-grey: #9ca3af;
  --text-light-grey: #6b7280;
  --green-highlight: #064e3b;
  --grey-highlight: #1f2937;
  --border-color: #374151;
  --underline-color: #4b5563;
}

[data-theme="light"] {
  --bg: #ffffff;
  --text-dark: #111111;
  --text-grey: #737373;
  --text-light-grey: #9ca3af;
  --green-highlight: #bcf0da;
  --grey-highlight: #f0f0f0;
  --border-color: #e5e7eb;
  --underline-color: #d1d5db;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-grey);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--underline-color);
  padding: 0;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-dark);
  text-decoration-color: var(--text-dark);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-grey);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 650px;
  margin: 12vh auto;
  padding: 2rem;
}

@media (max-width: 768px) {
  .container {
    margin: 6vh auto;
    padding: 1.5rem;
  }
}

p {
  margin-block-start: 1.6em;
  margin-block-end: 1.6em;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.intro-text {
  font-size: 1.4rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 2.5em;
}

.highlight-green {
  background-color: var(--green-highlight);
  color: var(--text-dark);
  padding: 0.15em 0.3em;
  border-radius: 4px;
}

.highlight-grey {
  background-color: var(--grey-highlight);
  color: var(--text-dark);
  padding: 0.15em 0.3em;
  border-radius: 4px;
}

strong {
  font-weight: 600;
  color: var(--text-dark);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.project-item {
  color: var(--text-grey);
}

.project-link {
  color: var(--text-grey);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--underline-color);
  transition: all 0.2s ease;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.project-link:hover {
  color: var(--text-dark);
  text-decoration-color: var(--text-dark);
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-grey);
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.inline-link {
  color: var(--text-grey);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--underline-color);
  transition: all 0.2s ease;
}

.inline-link:hover {
  color: var(--text-dark);
  text-decoration-color: var(--text-dark);
}

.divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 3.5rem 0 2rem;
}

.social-links {
  color: var(--text-light-grey);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.social-links a {
  color: var(--text-grey);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--underline-color);
  transition: all 0.2s ease;
}

.social-links a:hover {
  color: var(--text-dark);
  text-decoration-color: var(--text-dark);
}

/* Loading Animation */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-text {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
  animation: textOpacity 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.loader-text::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: var(--green-highlight);
  animation: revealText 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes revealText {
  0% { transform: scaleX(0); transform-origin: left; }
  35% { transform: scaleX(1); transform-origin: left; }
  65% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes textOpacity {
  0%, 34% { color: transparent; }
  35%, 100% { color: var(--text-dark); }
}