:root {
  --ink: #e7edf5;
  --muted: #8b98ab;
  --muted-dim: #5b6678;
  --line: rgba(148, 163, 184, 0.16);
  --bg: #090c12;
  --surface: #10151f;
  --surface-2: #141b28;
  --accent: #2dd4e0;
  --accent-soft: rgba(45, 212, 224, 0.12);
  --accent-2: #f0b429;
  --maxw: 780px;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(45, 212, 224, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 224, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 50% -10%, rgba(45, 212, 224, 0.16), transparent 55%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  line-height: 1.65;
}
/* background-attachment: fixed is skipped on touch/small screens — it causes
   repaint jank and inconsistent behavior in mobile Safari/Chrome */
@media (min-width: 641px) {
  body { background-attachment: fixed; }
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header / intro */
header {
  padding: 80px 0 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.avatar {
  position: relative;
  flex: none;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px rgba(45, 212, 224, 0.05), 0 0 40px rgba(45, 212, 224, 0.12);
  overflow: hidden;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}
.header-text { min-width: 0; }
.kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
h1 { font-size: clamp(1.9rem, 5vw + 1rem, 2.4rem); margin: 0 0 12px; letter-spacing: -0.5px; font-weight: 700; }
.tagline { font-size: 1.05rem; color: var(--muted); margin: 0 0 20px; max-width: 46ch; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 999px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.links a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Sections */
section { padding: 36px 0; border-top: 1px solid var(--line); }
h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin: 0 0 20px;
}
h2::before { content: "// "; color: var(--accent); }
p { margin: 0 0 16px; color: var(--ink); }
section > p:last-child { margin-bottom: 0; }

/* Looking-for roles */
.roles {
  list-style: none;
  margin: 4px 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.roles li { position: relative; padding-left: 24px; }
.roles li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.roles h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent);
  margin: 0 0 6px;
}
.roles p { margin: 0; color: var(--muted); }

/* Skill chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Key skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 32px;
}
.skill-group h3 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0 0 10px;
}
.skill-group .chips { margin-top: 0; }
@media (min-width: 641px) {
  .skills-grid > .skill-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .skills-grid > .skill-group:last-child:nth-child(odd) .chips { justify-content: center; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: #061014;
  background: var(--accent);
  padding: 11px 22px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }

/* Projects */
.project { margin-bottom: 40px; }
.project:last-child { margin-bottom: 0; }
.project img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  margin-bottom: 12px;
}
.project h3 { margin: 0 0 4px; font-size: 1.2rem; }
.project .meta {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 10px;
}
.project a {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
}
.project a:hover { text-decoration: underline; }
.placeholder-note {
  font-size: 0.92rem;
  color: var(--muted);
  font-style: italic;
}

footer {
  padding: 40px 0 80px;
  color: var(--muted-dim);
  font-family: var(--mono);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  header { flex-direction: column; text-align: center; padding-top: 64px; }
  .header-text { width: 100%; }
  .avatar { width: 132px; height: 132px; }
  .links { justify-content: center; }
  .links a { padding: 10px 16px; }
  .tagline { max-width: none; }
  .chips { justify-content: center; }
  .skills-grid { grid-template-columns: 1fr; }
}
