:root {
  --bg: #FAFAF8;
  --text: #1a1a1a;
  --text-muted: #666666;
  --accent: #2A3C24; /* Muted dark green */
  --border: #e2e2e2;
  --selection: #e6eee8;
}

::selection {
  background: var(--selection);
}

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

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.bio-short {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.navigation a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.navigation a:hover {
  color: var(--text);
  opacity: 1;
}

.navigation a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 1.5rem 0;
  color: var(--text);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1.2rem 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(42, 60, 36, 0.25);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

/* About */
.about-title {
  display: flex;
  flex-direction: column;
}

.about-title h1 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 0.1rem 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.about-title .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.about-title .location {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.about-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.social-links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}

.social-links a {
  color: var(--text-muted);
}

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

/* Experience */
.job {
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.job:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.job-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.job-details h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

.job-details p {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

.job-details ul {
  margin: 0.8rem 0 0 0;
  padding-left: 1.2rem;
  font-size: 1rem;
  color: var(--text);
}

.job-details li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.job-details li:last-child {
  margin-bottom: 0;
}

.job-details li strong {
  font-weight: 500;
}

/* Technologies */
.tech-group {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.tech-group strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  padding: 0.1rem 0.6rem;
  border-radius: 4px;
  margin: 0.2rem 0.2rem 0.2rem 0;
  color: var(--text-muted);
  background: transparent;
}

.tech-icon {
  width: 14px;
  height: 14px;
}

/* Projects */
.project {
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}

.project a {
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.project a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

.project span {
  color: var(--text-muted);
}

/* Principles */
.principles ol {
  padding-left: 0;
  list-style: none;
  counter-reset: principle;
  margin: 0;
}

.principles li {
  counter-increment: principle;
  font-size: 1rem;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2.5rem;
}

.principles li:last-child {
  margin-bottom: 0;
}

.principles li::before {
  content: counter(principle, decimal-leading-zero) ".";
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 1rem;
  top: 0.05rem;
}

.principles strong {
  display: block;
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: var(--text);
}

@media (max-width: 600px) {
  .container {
    padding: 3rem 1.5rem;
  }

  .about-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .navigation {
    gap: 0.75rem;
    font-size: 0.9rem;
  }

  .project {
    flex-direction: column;
    gap: 0.1rem;
  }
}

/* Link Previews */
.link-preview-container {
  position: absolute;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  transform: translateY(10px) translateX(-50%);
  pointer-events: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
  background: white;
  width: 320px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.link-preview-container::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: -1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.link-preview-container.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) translateX(-50%);
}

.link-preview-iframe {
  width: 1280px;
  height: 800px;
  border: none;
  transform: scale(0.25);
  transform-origin: 0 0;
  background: transparent;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-preview-iframe.loaded {
  opacity: 1;
}