:root {
  --bg: #000000;
  --fg: #FFFFFF;
  --muted: #A4A4A4;
  --border: #242424;
  --card: #090909;
  --ring: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.045);
  --online: #34D399;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--muted);
  font-family: 'Outfit', 'Avenir Next', 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 28px;
}

h1,
h2,
p,
ul {
  margin: 0;
}

strong {
  color: var(--fg);
  font-weight: 600;
}

a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(128, 128, 128, 0.5);
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* ---------- Layout (desktop) ---------- */

.page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(56px, 14vh, 140px) 24px 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 600px);
  align-items: start;
  gap: 20px 56px;
  text-wrap: pretty;
}

.intro {
  display: contents;
}

.identity {
  grid-column: 1;
  grid-row: 1 / span 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.page > :not(.intro),
.intro h1 {
  grid-column: 2;
}

/* ---------- Intro ---------- */

.avatar {
  display: block;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.status-text {
  display: flex;
  flex-direction: column;
}

.status-text strong {
  font-weight: 500;
}

.status-text span {
  color: var(--muted);
  font-weight: 400;
}

h1 {
  margin-bottom: 8px;
  color: var(--fg);
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.role {
  display: none;
}

/* ---------- Bio ---------- */

.bio {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Contact ---------- */

.contact {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 24px;
  padding: 24px 24px 24px 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}

.contact h2 {
  color: var(--fg);
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.button:hover {
  border-color: var(--muted);
}

.button-primary {
  padding: 0 20px;
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.button-primary:hover {
  border-color: var(--fg);
  opacity: 0.88;
}

/* ---------- Companies ---------- */

.companies {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.companies h2 {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.companies ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.companies li {
  display: flex;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 15px;
  background: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
}

.logo-namm img {
  height: 37px;
}

.logo-expedia img {
  height: 20px;
}

.logo-ibm {
  padding: 0;
}

.logo-ibm img {
  width: 98px;
  height: 54px;
  object-fit: cover;
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  body {
    background-size: 40px 40px;
  }

  .page {
    max-width: 480px;
    padding: 64px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }

  .intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .identity {
    display: contents;
  }

  .avatar {
    order: 1;
    width: 132px;
    height: 132px;
    box-shadow: 0 0 0 1px var(--border), 0 0 0 8px var(--ring);
  }

  .intro h1 {
    order: 2;
    margin: 8px 0 0;
    font-size: 34px;
    line-height: 1.08;
  }

  .status {
    order: 3;
    justify-content: center;
    gap: 8px;
    padding: 0;
    border: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 20px;
    font-weight: 400;
    white-space: normal;
  }

  .status-dot {
    flex-basis: auto;
  }

  .status-text {
    display: inline;
  }

  .status-text span {
    color: inherit;
  }

  .role {
    order: 4;
    display: block;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .bio {
    gap: 18px;
    text-align: center;
  }

  .contact {
    margin-top: 0;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 8px 0;
    border: 0;
    background: none;
    text-align: center;
  }

  .contact h2 {
    font-size: 26px;
    line-height: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .contact-actions {
    flex-wrap: nowrap;
    justify-content: center;
  }

  .button {
    height: 44px;
    gap: 8px;
  }

  .button-primary {
    order: -1;
  }

  .companies {
    margin-top: 0;
    padding-top: 24px;
    align-items: center;
  }

  .companies ul {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .logo {
    flex: 1 1 auto;
    height: 48px;
    padding: 0 8px;
  }

  .logo-namm img {
    height: 32px;
    max-width: 100%;
  }

  .logo-expedia {
    padding: 0 16px;
  }

  .logo-expedia img {
    width: 100%;
    height: auto;
  }

  .logo-ibm {
    padding: 0;
  }

  .logo-ibm img {
    width: 100%;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
