:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #171717;
  --text-muted: #525252;
  --border: #e5e5e5;
  --accent: #0f172a;
  --accent-soft: #334155;
  --radius: 10px;
  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --max: 680px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

header {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.intro {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.15rem;
}

.intro-headline {
  min-width: 0;
  flex: 1;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

@media (min-width: 481px) {
  .header-links {
    padding-left: calc(80px + 1.25rem);
  }
}

@media (max-width: 480px) {
  .intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header-links {
    justify-content: center;
  }
}

.name {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.title {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent-soft);
}

.links a svg {
  flex-shrink: 0;
  opacity: 0.85;
}

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

.links a.email-tip {
  position: relative;
}

.links a.email-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  padding: 0.35rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  pointer-events: none;
  z-index: 20;
}

.links a.email-tip:hover::after,
.links a.email-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

section h2 {
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.project-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.project-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.project-logo svg {
  width: 26px;
  height: 26px;
}

.project-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 7px;
}

.project-logo--dark {
  background: #0a0a0a;
  border-color: #262626;
  padding: 6px;
}

.project-meta h3 {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-tagline {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.project-desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

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

.stack li {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--bg);
  color: var(--accent-soft);
  border: 1px solid var(--border);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

.btn:hover {
  background: var(--bg);
  border-color: #d4d4d4;
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #141414;
    --text: #fafafa;
    --text-muted: #a3a3a3;
    --border: #262626;
    --accent: #f5f5f5;
    --accent-soft: #d4d4d4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  .btn:hover {
    background: #1a1a1a;
    border-color: #404040;
  }

  .btn.primary {
    background: #f5f5f5;
    border-color: #f5f5f5;
    color: #0a0a0a;
  }

  .btn.primary:hover {
    background: #e5e5e5;
    border-color: #e5e5e5;
  }
}
