:root {
  --bg-color: #F5F5F3;
  --text-color: #1A1A1A;
  --border-color: rgba(0, 0, 0, 0.1);
  --selection-bg: black;
  --selection-text: white;
  --img-bg: #e5e7eb;
  --pulse-color: #2563eb;
  --connect-bg: #EAEAEA;
  --dot-color: black;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0A0A0A;
    --text-color: #F5F5F3;
    --border-color: rgba(255, 255, 255, 0.1);
    --selection-bg: white;
    --selection-text: black;
    --img-bg: #1f2937;
    --connect-bg: #1A1A1A;
    --dot-color: white;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  transition: background-color 0.5s, color 0.5s;
  line-height: 1.5;
  height: 100vh;
  width: 100%;
  overflow-y: auto;
}

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

.container {
  max-width: 42rem; /* max-w-2xl */
  margin: 0 auto;
  padding: 3rem 1.5rem; /* py-12 px-6 */
  position: relative;
}

@media (min-width: 768px) {
  .container {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

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

.top-divider {
  margin-top: 0.5rem;
}

.profile-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .profile-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.image-wrapper {
  width: 12rem;
  height: 14rem;
  background-color: var(--img-bg);
  overflow: hidden;
  position: relative;
  filter: grayscale(100%);
  transition: filter 0.7s;
}

.image-wrapper:hover {
  filter: grayscale(0%);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 0.7s;
}

.image-wrapper:hover .profile-image {
  transform: scale(1);
}

.name {
  font-size: 3rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .name {
    font-size: 3.75rem;
  }
}

.pronouns {
  font-size: 1.125rem;
  font-weight: 400;
  opacity: 0.4;
  letter-spacing: normal;
}

@media (min-width: 768px) {
  .pronouns {
    font-size: 1.25rem;
  }
}

.titles {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .titles {
    font-size: 0.75rem;
  }
}

.stats-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .stats-area {
    align-items: flex-end;
    margin-top: 0;
  }
}

.stat-number {
  font-size: 4.5rem;
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 8rem;
  }
}

.location-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: var(--pulse-color);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.location-text {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.email-link {
  font-size: 0.875rem;
  opacity: 0.8;
  text-decoration: none;
  color: inherit;
}

.email-link:hover {
  text-decoration: underline;
}

.about-section {
  margin-bottom: 4rem;
  max-width: 32rem;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.625;
  opacity: 0.9;
  font-weight: 500;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .about-text {
    font-size: 1.25rem;
  }
}

.stack-section {
  margin-bottom: 4rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
}

.projects-section {
  margin-bottom: 4rem;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-content {
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s, color 0.3s;
}

.project-content:hover {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

.project-name {
  font-weight: 500;
  font-size: 1.125rem;
}

.project-desc {
  font-size: 0.875rem;
  opacity: 0.6;
  margin-top: 0.25rem;
}

.arrow-icon, .arrow-icon-diagonal {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s;
}

.project-card:hover .arrow-icon {
  transform: translateX(0.25rem);
}

.project-card:hover .arrow-icon-diagonal {
  transform: translate(0.25rem, -0.25rem);
}

.connect-section {
  margin-bottom: 4rem;
}

.connect-card {
  background-color: var(--connect-bg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .connect-card {
    padding: 3rem;
  }
}

.connect-title {
  opacity: 0.6;
}

.connect-text {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 3rem;
  max-width: 24rem;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .connect-text {
    font-size: 1.5rem;
  }
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}

.download-link:hover {
  opacity: 0.7;
}

.download-icon {
  width: 1rem;
  height: 1rem;
}

.decorative-grid {
  display: none;
}

@media (min-width: 768px) {
  .decorative-grid {
    display: block;
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    opacity: 0.2;
    pointer-events: none;
    transition: transform 0.7s;
  }
  
  .connect-card:hover .decorative-grid {
    transform: scale(1.05);
  }

  .grid-dots {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
  }

  .dot {
    width: 0.375rem;
    height: 0.375rem;
    background-color: var(--dot-color);
    border-radius: 9999px;
  }
}

.footer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-title {
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-links a, .app-link {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
}

.footer-links a:hover, .app-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.external-icon {
  width: 0.75rem;
  height: 0.75rem;
}
