:root {
  --ink: #1a1815;
  --paper: #faf7f2;
  --muted: #6f6a62;
  --line: #e4ded3;
  --accent: #a8442f;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}

.mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.site-header nav a {
  text-decoration: none;
  margin-left: 1.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, border-width 0.2s, color 0.2s;
}

.site-header nav a:hover {
  color: var(--accent);
  border-bottom-width: 3px;
  border-color: var(--accent);
}

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 4rem 0 5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text { flex: 1; min-width: 0; }

.hero-photo {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.hero-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 500;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.02;
  margin: 0 0 1.5rem;
}

.hero-copy {
  font-size: 1.15rem;
  max-width: 46ch;
  color: #3a362f;
  margin: 0 0 2rem;
}

.hero-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  margin-right: 1.75rem;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
}

.hero-links a:hover { color: var(--accent); border-color: var(--accent); }

.section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: none; }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.9rem;
  margin: 0 0 2.5rem;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
}

.timeline-item {
  position: relative;
  padding: 0 0 2.75rem 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent);
}

.timeline-dates {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0 0 0.15rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.timeline-location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.timeline-bullets {
  margin: 0;
  padding-left: 1.2rem;
  color: #3a362f;
  font-size: 0.97rem;
}

.timeline-bullets li { margin-bottom: 0.35rem; }

/* Projects */
.project-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2.5rem;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.project-main { flex: 1; }

.project-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
}

.tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--sans);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  background: var(--line);
  color: var(--muted);
}

.tag[data-type="Website"] { background: #e2ecf6; color: #2c5c8a; }
.tag[data-type="Browser Extension"] { background: #eee2f6; color: #6a3d96; }
.tag[data-type="Desktop Widget"] { background: #e0f0e6; color: #276b45; }

.tag[data-lang="JavaScript"] { background: #fdf1cf; color: #8a6a06; }
.tag[data-lang="TypeScript"] { background: #dce9fa; color: #1e4f8f; }
.tag[data-lang="Python"] { background: #dff1e2; color: #2b7a3f; }
.tag[data-lang="QML"] { background: #fbe3ec; color: #9c3160; }

.project-desc {
  color: #3a362f;
  font-size: 0.93rem;
  margin: 0;
  flex: 1;
}

.project-links {
  display: flex;
  gap: 1.25rem;
  white-space: nowrap;
}

.project-links a {
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.project-links a:hover { color: var(--accent); border-color: var(--accent); }

.contact-section { border-bottom: none; }

.contact-copy {
  font-size: 1.05rem;
  max-width: 44ch;
  color: #3a362f;
  margin: 0 0 1.75rem;
}

.contact-button {
  display: inline-block;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--paper);
  background: var(--ink);
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  transition: background 0.2s;
}

.contact-button:hover { background: var(--accent); }

footer {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  margin-bottom: 0.75rem;
}

footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
footer a:hover { color: var(--accent); border-color: var(--accent); }

.footer-meta { font-size: 0.8rem; }

.status-chip {
  background: #f7e2dc;
  color: var(--accent);
}

@media (max-width: 700px) {
  .hero { flex-direction: column-reverse; text-align: center; gap: 2rem; }
  .hero-photo { width: 128px; height: 128px; }
  .hero-links { justify-content: center; display: flex; }
}

@media (max-width: 700px) {
  .project-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header nav a { margin-left: 1.1rem; }
}
