:root {
  --color-text: #111111;
  --color-bg: #ffffff;
  --color-surface: #f5f5f5;
  --color-muted: #666666;
  --color-border: #e0e0e0;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 75ch;
  --spacing: 1.5rem;
}

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

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 100%;
}

main {
  width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Header */
.site-header {
  padding: 1.5rem 0;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  font-family: var(--font);
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--color-text);
}

/* Profile / Homepage */
.profile {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

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

.bio p {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 400;
  text-align: justify;
  hyphens: auto;
}

.bio h2 {
  font-family: var(--font);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-muted);
}

.bio a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s;
}

.bio a:hover {
  opacity: 0.6;
}

/* Page Headings */
h1 {
  font-family: var(--font);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 2.5rem;
}

/* Recent projects on homepage */
.recent-projects .project-card {
  position: relative;
  padding-left: calc(120px + 2.5rem);
}

.recent-projects .project-icon {
  position: absolute;
  left: calc(120px - 48px);
  top: 1.5rem;
}

.recent-projects .project-card p {
  font-size: 1.05rem;
  color: var(--color-text);
}

/* Section heading */
.section-heading {
  font-family: var(--font);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-top: 4rem;
  margin-bottom: 0;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.project-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 0.75rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s;
}

.project-card:hover {
  background: var(--color-surface);
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.project-card h2 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.project-card p {
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-weight: 400;
  text-align: justify;
  hyphens: auto;
}

/* Tags */
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag {
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

/* Project Detail */
.project-detail {
  max-width: var(--max-width);
}

.project-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-border);
}

.project-icon-large {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
}

.project-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.tagline {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.download-button {
  font-family: var(--font);
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 0.375rem;
  background: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: opacity 0.15s;
}

.download-button:hover {
  opacity: 0.75;
}

.screenshot {
  width: 100%;
  margin-bottom: 2.5rem;
}

.project-body {
  line-height: 1.7;
}

.project-body h2 {
  font-family: var(--font);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.project-body p {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 1rem;
}

.project-body ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  color: var(--color-text);
  font-size: 1rem;
  list-style: disc;
}

.project-body li {
  margin-bottom: 0.35rem;
}

.project-body a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s;
}

.project-body a:hover {
  opacity: 0.6;
}

/* Footer */
.site-footer {
  margin-top: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  font-family: var(--font);
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.site-footer a:hover {
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 540px) {
  h1 {
    font-size: 2.25rem;
  }

  .profile {
    flex-direction: column;
  }

  .recent-projects .project-card {
    padding-left: calc(48px + 1.25rem);
  }

  .recent-projects .project-icon {
    left: 0;
  }

  .project-header {
    flex-direction: column;
  }
}
