:root {
  --bg: #050505;
  --panel: #181818;
  --panel-2: #202020;
  --text: #f3f3f3;
  --muted: #b8b8b8;
  --soft: #777777;
  --line: #333333;
  --pill: #2a2a2a;
  --accent: #d8d8d8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
  margin: 0;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin: 0 auto;
  max-width: 1160px;
  padding: 18px 44px 0;
}

.brand {
  align-items: center;
  background: linear-gradient(145deg, #787878, #252525);
  border: 1px solid #3d3d3d;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  justify-self: start;
  text-transform: lowercase;
  width: 42px;
}

.nav {
  align-items: center;
  background: rgba(28, 28, 28, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 5px;
}

.nav a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 9px 13px;
}

.nav a:hover {
  background: #2a2a2a;
  color: var(--text);
}

.talk-button {
  background: linear-gradient(145deg, #5b5b5b, #2a2a2a);
  border: 1px solid #4d4d4d;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 850;
  justify-self: end;
  padding: 10px 16px;
}

.hero,
.section,
.contact-section,
.footer {
  margin: 0 auto;
  max-width: 1160px;
  padding-left: 44px;
  padding-right: 44px;
}

.hero {
  align-items: center;
  display: grid;
  gap: 64px;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.72fr);
  min-height: 520px;
  padding-bottom: 76px;
  padding-top: 58px;
}

.intro {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

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

h1 {
  font-size: 3.45rem;
  line-height: 1.03;
  margin-bottom: 16px;
  max-width: 680px;
}

h2 {
  font-size: 2.55rem;
  line-height: 1.05;
  margin-bottom: 12px;
  text-align: center;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.22;
  margin-bottom: 12px;
}

p {
  color: var(--muted);
}

.hero-copy p:not(.intro) {
  max-width: 560px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 900;
  justify-content: center;
  min-height: 43px;
  padding: 10px 15px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.filled {
  background: #5a5a5a;
  border: 1px solid #747474;
  color: var(--text);
}

.button.ghost {
  background: transparent;
  border: 1px solid #626262;
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 22px;
  margin-top: 34px;
}

.social-links a {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.hero-visual {
  height: 390px;
  position: relative;
}

.portrait-orb {
  align-items: center;
  background: radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.12), transparent 58%);
  border-radius: 10px;
  bottom: 44px;
  display: flex;
  height: 350px;
  justify-content: center;
  overflow: hidden;
  position: absolute;
  right: 0;
  width: 360px;
  z-index: 2;
}

.portrait-orb::after {
  background: linear-gradient(to bottom, transparent 58%, #050505 97%);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

.portrait-orb img {
  filter: grayscale(1) contrast(1.08) brightness(0.9);
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  width: 100%;
}

.dashboard-card {
  background: rgba(31, 31, 31, 0.94);
  border: 1px solid #373737;
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 168px;
  padding: 14px;
  position: absolute;
  z-index: 4;
}

.dashboard-card small {
  color: var(--soft);
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.dashboard-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 12px;
}

.dashboard-card i {
  background: #333;
  border-radius: 4px;
  display: block;
  height: 8px;
  overflow: hidden;
}

.dashboard-card i::after {
  background: var(--accent);
  content: "";
  display: block;
  height: 100%;
  width: var(--fill);
}

.card-a {
  left: 14px;
  top: 70px;
}

.card-b {
  right: -38px;
  top: 8px;
}

.card-c {
  bottom: 0;
  left: 8px;
}

.section {
  padding-bottom: 72px;
  padding-top: 48px;
}

.section-heading {
  margin: 0 auto 34px;
  max-width: 820px;
  text-align: center;
}

.section-heading p {
  font-size: 0.94rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.card-grid {
  display: grid;
  gap: 28px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.skill-card,
.project-card {
  background: linear-gradient(180deg, #202020, #181818);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-width: 0;
  padding: 22px;
}

.service-card p,
.project-card p {
  font-size: 0.9rem;
}

#projects .project-card {
  min-height: 220px;
}

.service-card ul {
  border-top: 1px solid #2d2d2d;
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 26px 0 0;
  padding: 14px 0 0;
}

.service-card li {
  background: #242424;
  border: 1px solid #2f2f2f;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 10px;
}

.about {
  padding-top: 70px;
}

.approach-row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px auto 24px;
  max-width: 1040px;
}

.approach-row article {
  align-items: center;
  background: #2a2a2a;
  border: 1px solid #383838;
  border-radius: 8px;
  display: flex;
  gap: 14px;
  padding: 18px;
}

.approach-row span {
  align-items: center;
  background: var(--accent);
  border-radius: 6px;
  color: #111;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.stats-row {
  display: flex;
  gap: 58px;
  justify-content: center;
  margin-top: 28px;
  text-align: center;
}

.stats-row strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
}

.stats-row span {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-list span {
  background: var(--pill);
  border: 1px solid #3a3a3a;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 10px;
}

.project-card > span {
  color: var(--accent);
  display: block;
  font-size: 0.76rem;
  font-weight: 950;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.contact-section {
  align-items: center;
  background: #181818;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 34px;
  margin-top: 28px;
  padding-bottom: 34px;
  padding-top: 34px;
}

.contact-section h2 {
  text-align: left;
}

.contact-section p {
  margin-bottom: 0;
}

.footer {
  color: var(--soft);
  display: flex;
  font-size: 0.86rem;
  justify-content: space-between;
  padding-bottom: 26px;
  padding-top: 0;
}

.cv-hero {
  margin: 0 auto;
  max-width: 1040px;
  padding: 72px 44px 34px;
  text-align: center;
}

.cv-hero h1 {
  margin-left: auto;
  margin-right: auto;
}

.cv-hero p:not(.intro) {
  margin-left: auto;
  margin-right: auto;
  max-width: 680px;
}

.cv-actions {
  justify-content: center;
}

.cv-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1040px;
  padding: 0 44px 72px;
}

.cv-panel {
  background: linear-gradient(180deg, #202020, #181818);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}

.cv-panel h2 {
  font-size: 1.45rem;
  margin-bottom: 16px;
  text-align: left;
}

.cv-panel h3 {
  margin-bottom: 6px;
}

.cv-panel p,
.cv-panel li,
.cv-panel span {
  color: var(--muted);
}

.cv-skill-grid,
.cv-project-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cv-skill-grid > div,
.cv-project-grid > div {
  background: #242424;
  border: 1px solid #303030;
  border-radius: 7px;
  padding: 16px;
}

.cv-role {
  border-top: 1px solid #303030;
  padding-top: 18px;
}

.cv-role:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.cv-role + .cv-role {
  margin-top: 22px;
}

.cv-role ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.cv-role li + li {
  margin-top: 8px;
}

.cv-role.compact {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .brand,
  .talk-button {
    justify-self: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  .hero-copy p:not(.intro),
  .hero-actions,
  .social-links {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
  }

  .card-grid.four,
  .card-grid.three,
  .approach-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-section h2 {
    text-align: center;
  }

  .contact-actions {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section,
  .contact-section,
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header {
    padding-top: 14px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  h1 {
    font-size: 2.25rem;
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 2rem;
  }

  .hero {
    gap: 34px;
    padding-bottom: 48px;
    padding-top: 46px;
  }

  .hero-copy {
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    width: 100%;
  }

  .hero-copy p:not(.intro) {
    max-width: 300px;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    max-width: 300px;
    width: 100%;
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

  .hero-visual {
    height: 420px;
    max-width: 300px;
    overflow: hidden;
  }

  .portrait-orb {
    bottom: 24px;
    height: 300px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 300px;
  }

  .dashboard-card {
    min-width: 145px;
  }

  .card-a {
    left: 8px;
    top: 54px;
  }

  .card-b {
    right: 8px;
    top: 0;
  }

  .card-c {
    bottom: 6px;
    left: 8px;
  }

  .card-grid.four,
  .card-grid.three,
  .approach-row {
    grid-template-columns: 1fr;
  }

  .stats-row {
    flex-direction: column;
    gap: 22px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .cv-hero,
  .cv-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

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

@media print {
  body {
    background: #ffffff;
    color: #111111;
  }

  .site-header,
  .cv-actions {
    display: none;
  }

  .cv-hero,
  .cv-shell {
    max-width: none;
    padding: 20px 28px;
  }

  .cv-hero {
    text-align: left;
  }

  .cv-hero h1 {
    font-size: 2.4rem;
    margin-left: 0;
  }

  .cv-panel,
  .cv-skill-grid > div,
  .cv-project-grid > div {
    background: #ffffff;
    border-color: #dddddd;
    box-shadow: none;
  }

  .cv-panel {
    break-inside: avoid;
    padding: 18px;
  }

  h1,
  h2,
  h3,
  p,
  li,
  span {
    color: #111111 !important;
  }
}
