:root {
  color-scheme: dark;
  --bg: #0d100f;
  --surface: #171c1a;
  --surface-muted: #202823;
  --text: #f4f1e8;
  --muted: #a9b4ad;
  --line: #303a35;
  --accent: #2dd4bf;
  --accent-strong: #7dded2;
  --gold: #d6a23a;
  --ink: #111827;
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.34);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.05), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-color: rgba(45, 212, 191, 0.5);
  text-underline-offset: 0.2em;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(45, 212, 191, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(13, 16, 15, 0.88);
  border-bottom: 1px solid rgba(48, 58, 53, 0.8);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(100% - 32px, var(--max-width));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.brand:hover {
  color: var(--bg);
  background: var(--accent-strong);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.section-wrap {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 88px 0;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 4rem;
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.25rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.role {
  margin-bottom: 22px;
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 700;
}

.intro {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions,
.card-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: var(--bg);
}

.button:hover {
  border-color: var(--accent);
  background: var(--surface-muted);
  color: var(--accent-strong);
}

.button.primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero-panel,
.experience-card,
.project-card,
.about-panel,
.contact-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

.portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(214, 162, 58, 0.14)),
    var(--surface-muted);
  overflow: hidden;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.quick-facts div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 2px 0 0;
  color: var(--text);
  font-weight: 650;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 42px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.section-heading {
  position: sticky;
  top: 100px;
}

.section-heading p {
  color: var(--muted);
}

.section-heading.compact {
  position: static;
  max-width: 720px;
  margin-bottom: 28px;
}

.timeline {
  display: grid;
  gap: 18px;
}

.experience-card,
.project-content,
.about-panel,
.contact-section {
  padding: 24px;
}

.experience-card {
  position: relative;
}

.experience-card::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -22px;
  width: 10px;
  height: 10px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.experience-card p,
.project-card p,
.about-panel p,
.contact-section p {
  color: var(--muted);
}

.experience-card ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

#projects:not(:has(.project-card)),
body:not(:has(#projects .project-card)) .nav-links a[href="#projects"] {
  display: none;
}

.project-card {
  overflow: hidden;
}

.tags,
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
}

.card-links {
  margin-top: 18px;
}

.card-links a,
.contact-links a {
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-weight: 750;
  text-decoration: none;
}

.card-links a:hover,
.contact-links a:hover {
  border-color: var(--accent);
  background: var(--surface-muted);
}

.about-panel {
  display: grid;
  gap: 22px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 32px;
  align-items: center;
  margin-bottom: 72px;
}

.contact-links {
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 18px;
  justify-content: center;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
}

.contact-links svg {
  display: block;
  width: 52px;
  height: 52px;
  fill: currentColor;
}

@media (max-width: 920px) {
  .hero,
  .split-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .section-heading {
    position: static;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-links {
    align-items: center;
    justify-content: center;
  }

  .experience-card::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-links a {
    padding: 6px 7px;
    font-size: 0.88rem;
  }

  .section-wrap {
    width: min(100% - 24px, var(--max-width));
    padding: 58px 0;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .hero-actions,
  .card-links {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .card-links a {
    width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .experience-card,
  .project-content,
  .about-panel,
  .contact-section {
    padding: 18px;
  }
}
