:root {
  --bg: #fafaf7;
  --fg: #2d2d2d;
  --fg-muted: #6a6a6a;
  --rule: #e6e3dc;
  --underline: #b8b3a5;
  --hatch-1: rgba(45, 45, 45, 0.045);
  --hatch-2: rgba(45, 45, 45, 0.025);

  --serif: "Fraunces", Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius: 999px;
}

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

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

body {
  min-height: 100%;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(-44deg, transparent 0, transparent 37px, var(--hatch-1) 37px, var(--hatch-1) 38px),
    repeating-linear-gradient(-46deg, transparent 0, transparent 71px, var(--hatch-2) 71px, var(--hatch-2) 72px),
    repeating-linear-gradient(-43deg, transparent 0, transparent 113px, var(--hatch-2) 113px, var(--hatch-2) 114px);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "opsz" 14, "SOFT" 50, "WONK" 0;
}

@media (min-width: 720px) {
  body {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: var(--fg); }

.page {
  max-width: 580px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.5rem;
  position: relative;
}

@media (min-width: 720px) {
  .page {
    max-width: 880px;
    padding: 2.5rem 2rem;
  }
}

/* Language toggle (top-right) */
.lang-toggle {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
}
.lang-toggle button {
  background: none;
  border: none;
  padding: 0.4rem 0.3rem;
  font: inherit;
  color: var(--fg-muted);
  cursor: pointer;
  min-height: 36px;
}
.lang-toggle button[aria-pressed="true"] { color: var(--fg); }
.lang-toggle button:hover { color: var(--fg); }

/* Two-column layout (stacks on mobile) */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 720px) {
  .layout {
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 3.5rem;
    align-items: start;
  }
}

/* Bio (left column on desktop) */
.bio { min-width: 0; }

/* Avatar */
.avatar {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  margin: 0 0 1rem;
  object-fit: cover;
}
@media (min-width: 720px) {
  .avatar { width: 110px; height: 110px; }
}

/* Name & tagline */
.name {
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  line-height: 1.05;
}
@media (min-width: 720px) {
  .name { font-size: 2.4rem; }
}
.tagline {
  margin: 0 0 1.25rem;
  color: var(--fg-muted);
  font-style: italic;
  font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1;
  font-size: 1rem;
  line-height: 1.35;
}

/* Social */
.social {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.social li {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.social-icon {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.social a:hover .social-icon { opacity: 1; }
.lang-note {
  color: var(--fg-muted);
  font-size: 0.82em;
  font-style: italic;
}

/* Contact */
.contact {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.contact-icon {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0.7;
}
.email { user-select: all; }
.copy-btn {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--fg-muted);
  cursor: pointer;
  min-height: 28px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--fg); border-color: var(--fg-muted); }
.copy-btn.copied { color: var(--fg); border-color: var(--fg); }

/* Content (right column on desktop) — projects */
.content { min-width: 0; }
.content-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 1rem;
}
@media (min-width: 720px) {
  .content-title { margin-top: 0.4rem; }
}

.projects {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.projects li { margin: 0; }

.proj-domain {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  margin-bottom: 0.3rem;
}
.proj-domain a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}
.proj-domain a:hover { border-bottom-color: var(--fg); }
.proj-domain .sep {
  color: var(--rule);
  margin: 0 0.2rem;
}

.proj-desc {
  font-size: 0.97rem;
  line-height: 1.5;
}

.inline-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin: 0 0.15rem 0 0.1rem;
  opacity: 0.85;
}
