:root {
  --bg: #fafafa;
  --text: #111111;
  --muted: #666666;
  --accent: #c85a3c;
  --accent-hover: #a8482e;
  --border: #e5e5e5;
  --card-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-hover: rgba(0, 0, 0, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --text: #f5f5f5;
    --muted: #999999;
    --accent: #e0755a;
    --accent-hover: #ef8a70;
    --border: #262626;
    --card-bg: #161616;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Headings */
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
}

/* Hero */
.hero {
  margin-bottom: 5rem;
}

.tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  color: var(--text);
  margin: 0.75rem 0 0;
  font-weight: 400;
}

.lede {
  color: var(--muted);
  margin: 1.25rem 0 0;
  max-width: 34em;
}

.cta {
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.cta a {
  font-weight: 700;
}

.cta-secondary {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.cta-secondary:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

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

.section p {
  margin: 0 0 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* Projects */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-hover);
  border-color: var(--accent);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.wip {
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}

.chips {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chips li {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
}

.card-link {
  margin: 1rem 0 0 !important;
}

.card-link a {
  font-size: 0.9rem;
  font-weight: 700;
}

/* Experience */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  padding: 0 0 1.25rem;
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.timeline .role {
  color: var(--text);
  font-weight: 700;
}

.timeline .place {
  color: var(--muted);
}

/* Contact */
.contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact a {
  font-weight: 700;
}

#copy-email {
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

#copy-email:hover {
  color: var(--accent-hover);
}

.copy-hint {
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

#copy-email:hover .copy-hint {
  color: var(--accent);
  border-color: var(--accent);
}

#copy-email.copied .copy-hint {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
