@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..700;1,300..700&display=swap");

:root {
  color-scheme: light;
  --background: #fdfdfd;
  --foreground: #282728;
  --accent: #6495ed;
  --accent-ink: #315b9d;
  --accent-foreground: #ffffff;
  --muted: #e6e6e6;
  --muted-foreground: #6b7280;
  --border: #ece9e9;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #272822;
  --foreground: #f8f8f2;
  --accent: #a6e22e;
  --accent-ink: #a6e22e;
  --accent-foreground: #272822;
  --muted: #3e3d32;
  --muted-foreground: #cfcfc2;
  --border: #49483e;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 0.2em;
}

a:hover {
  opacity: 0.82;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  border-radius: 0.35rem;
  background: var(--accent-ink);
  color: var(--accent-foreground);
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
}

.site-shell {
  width: min(100% - 2rem, 760px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.brand {
  color: var(--foreground);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.nav-link,
.theme-toggle {
  border: 0;
  color: var(--foreground);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
}

.nav-link {
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-link:hover,
.theme-toggle:hover {
  color: var(--accent-ink);
  opacity: 1;
}

.theme-toggle {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  cursor: pointer;
}

.theme-toggle:focus-visible,
.cta:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}

.theme-icon {
  font-size: 1.1rem;
  line-height: 1;
}

main {
  flex: 1;
}

.profile {
  padding: clamp(3rem, 10vw, 7rem) 0 4rem;
}

.profile-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2.5rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.065em;
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.headline,
.section-intro,
.project-card p,
.contact-info {
  color: var(--muted-foreground);
}

.headline {
  max-width: 48rem;
  margin-bottom: 1.2rem;
  font-size: clamp(1.05rem, 2.8vw, 1.4rem);
}

.contact-info {
  font-style: normal;
}

.contact-info a {
  font-weight: 600;
}

.profile-section {
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.profile-section:last-child {
  border-bottom: 0;
}

.profile-section p {
  max-width: 46rem;
}

.profile-section p + p {
  margin-top: 1rem;
}

.profile-section .cta {
  margin-top: 1.5rem;
}

.projects {
  padding: clamp(3rem, 10vw, 7rem) 0 4rem;
}

.projects-heading {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.projects-heading h1 {
  color: var(--accent-ink);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  padding: 1.5rem;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
  border-color: var(--accent-ink);
  box-shadow: 5px 5px 0 var(--accent);
  transform: translate(-2px, -2px);
}

.project-card p {
  flex: 1;
}

.beta-badge {
  display: inline-block;
  margin-left: 0.35rem;
  border: 1px solid var(--accent-ink);
  border-radius: 0.25rem;
  color: var(--accent-ink);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.1rem 0.35rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid var(--accent-ink);
  border-radius: 0.35rem;
  background: var(--accent-ink);
  color: var(--accent-foreground);
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
}

.cta:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.85rem;
  padding: 1.25rem 0;
}

.footer-content,
.social-links {
  display: flex;
  align-items: center;
}

.footer-content {
  justify-content: space-between;
  gap: 1rem;
}

.social-links {
  gap: 0.35rem;
}

.social-link {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  color: var(--foreground);
}

.social-link:hover {
  border-color: var(--border);
  color: var(--accent-ink);
  opacity: 1;
}

.social-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

@media (max-width: 620px) {
  .site-nav {
    align-items: flex-start;
  }

  .nav-actions {
    justify-content: flex-end;
  }

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

  .project-card:hover {
    box-shadow: none;
    transform: none;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
