:root {
  color-scheme: light;
  --max-width: 1080px;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1c1c1c;
  --text-muted: #6a6a68;
  --border: #e7e5df;
  --accent-hover: #5a5a58;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.06), 0 16px 32px rgba(0, 0, 0, 0.06);
  --radius: 8px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-identity {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-name:hover { color: var(--accent-hover); }

.site-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}

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

.social-links svg { width: 18px; height: 18px; }

/* Sections */
section { margin-bottom: 4rem; }

section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
}

/* Project grid */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .projects {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.project {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--text-muted);
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.project-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.005em;
  margin: 0 0 0.5rem;
}

.project-description {
  color: var(--text-muted);
  margin: 0 0 0.9rem;
  font-size: 0.94rem;
  line-height: 1.55;
}

.project-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
}

.project-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

.project:hover .project-link::after {
  transform: translateX(3px);
}

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

/* Footer */
.site-footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Mobile */
@media (max-width: 600px) {
  .container { padding: 2.5rem 1.25rem 4rem; }
  .site-header { margin-bottom: 3rem; }
  section { margin-bottom: 3rem; }
  .project-body { padding: 1.25rem 1.25rem 1.5rem; }
}

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