:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #161823;
  --ink-muted: #6b6f7b;
  --line: #e6e7ea;
  --muted: #f1f1f2;
  --brand: #fe2c55;
  --brand-soft: #ffe8ec;
  --brand-fg: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
}

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

.small {
  font-size: 0.875rem;
}
.muted {
  color: var(--ink-muted);
}
.break {
  word-break: break-all;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 15rem;
  display: none;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: 1.25rem;
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }
  .main {
    padding-left: 17rem;
  }
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nav-item i {
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
  color: var(--brand);
}

.nav-item:hover {
  background: var(--muted);
}

.sidebar hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.25rem 0;
}

.email-btn {
  display: block;
  margin-top: 0.75rem;
  border: 1px solid var(--brand);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  word-break: break-all;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.email-btn:hover {
  background: var(--brand);
  color: var(--brand-fg);
}

.email-btn.wide {
  max-width: 22rem;
  margin: 0.5rem auto 0;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Main */
.main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  object-fit: cover;
}
.avatar.sm {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1rem;
  display: block;
}

.profile h1 {
  font-size: 1.875rem;
  letter-spacing: -0.02em;
}
.profile h2 {
  margin-top: 0.25rem;
  font-size: 1.125rem;
  color: var(--ink-muted);
}

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
}
.email-link:hover {
  text-decoration: underline;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--ink-muted);
}
.stats strong {
  color: var(--ink);
}

.intro {
  max-width: 48rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 1.5rem 0;
}
.tab {
  padding: 0.625rem 2rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.tab.active {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--muted);
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover img {
  transform: scale(1.05);
}
.card .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.08) 60%, transparent);
}
.card .meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.75rem;
}
.card .tag {
  display: inline-block;
  margin-bottom: 0.25rem;
  border-radius: 0.25rem;
  background: var(--brand);
  color: var(--brand-fg);
  padding: 0.1rem 0.35rem;
  font-size: 10px;
  font-weight: 800;
}
.card .title {
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Modals */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
}
.overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 48rem;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 0.75rem;
  background: var(--card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}
.close:hover {
  color: var(--ink);
}

.about-grid {
  display: grid;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1.4fr;
  }
  .about-side {
    border-right: 1px solid var(--line);
  }
}

.about-side {
  padding: 2rem;
  text-align: center;
}
.about-meta {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.about-meta p {
  margin: 0;
}
.about-meta i {
  color: var(--brand);
  margin-right: 0.5rem;
}

.chips {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem;
}
.chips span {
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 0.25rem 0.625rem;
  font-size: 11px;
  font-weight: 700;
}

.about-body {
  padding: 2rem;
}
.about-body p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

.badge {
  display: inline-block;
  border-radius: 0.25rem;
  background: var(--brand-soft);
  color: var(--brand);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.certs {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--ink-muted);
}
.certs em {
  color: var(--brand);
  font-style: normal;
  font-weight: 700;
}

.connect {
  padding: 2rem;
  text-align: center;
}
.connect p {
  max-width: 28rem;
  margin: 1rem auto 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.5rem;
  color: var(--brand);
}
.contact-lines {
  display: grid;
  gap: 0.25rem;
}
