/* Theme */
:root[data-theme="light"] {
  --bg:            #f4f5f7;
  --fg:            #5c6067;
  --muted:         #8f939a;
  --muted-light:   #dadbdf;
  --accent:        #111111;
  --link:          #2c2f34;
  --accent-color:  #7b42ff;
}
:root[data-theme="dark"] {
  --bg:            #060606;
  --fg:            #8a8f98;
  --muted:         #6e7278;
  --muted-light:   #1a1a1a;
  --accent:        #f2f2f2;
  --link:          #cfd2da;
  --accent-color:  #a678ff;
}

/* Global styles */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  margin-left: auto;
  margin-right: auto;
}
body {
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.003em;
  font-weight: 400;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  justify-content: center;
}
.content {
  width: 1200px;
  padding-left: 24px;
  padding-right: 24px;
}
@media screen and (max-width: 700px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }
}
h1 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 2.5rem;
  margin: 0;
  line-height: 1;
}
.subtitle {
  font-family: "Inter Tight", sans-serif;
  margin-top: 0.35rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin-top: 0;
}
h2 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 0.75em;
  transition: transform 0.2s;
}
h3 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  margin-top: 0em;
  margin-bottom: 0em;
}
h1,
h2,
h3 {
  color: var(--accent);
}
a {
  color: var(--accent-color);
  text-decoration: none;
  position: relative;
  display: inline-block;
}
a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}
a:hover::after {
  width: 100%;
}
.links {
  margin-top: 1.5em;
}
.muted {
  color: var(--muted);
}

/* Hero image */
img.hero {
  filter: grayscale(100%) brightness(103%) contrast(95%);
  mask-image: radial-gradient(
    circle at center,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 75%,
    rgba(0,0,0,0.7) 100%
  );
  width: 48%;
  float: left;
  margin-left: 32px;
  border-radius: 4px;
  object-fit: cover;
}
@media screen and (max-width: 700px) {
  img.hero {
    width: 100%;
    margin-left: 0;
    margin-bottom: 1.5rem;
    float: none;
  }
}

/* Theme switcher (dark theme, light theme) */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 32px;
}
.theme-switch label {
  background: none; /* Fix a mobile bug where clicking the button highlights label background */
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-switch .icon {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 9px; /* Match optical alignment */
  right: 0;
  bottom: 0;
  border-radius: 32px;
  transition: background 0.2s;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-switch .icon:hover {
  background-color: var(--muted-light);
  color: var(--accent-color);
}
:root[data-theme="light"] .icon .sun {
  display: block;
}
:root[data-theme="light"] .icon .moon {
  display: none;
}
:root[data-theme="dark"] .icon .sun {
  display: none;
}
:root[data-theme="dark"] .icon .moon {
  display: block;
}

/* Navbar */
nav {
  height: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
  z-index: 999;
}
nav a {
  color: var(--fg);
}
nav .content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
@media screen and (max-width: 700px) {
  .cards {
    gap: 12px;
  }
}
.cards > div {
  padding: 1.5rem;
  border: 1px solid var(--muted-light);
  border-radius: 6px;
}
@media screen and (max-width: 700px) {
  .cards > div {
    padding: 1.5rem;
  }
}
.cards h3 {
  font-family: "Inter Tight", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  margin-top: 0rem;
  line-height: 1;
}
.cards p {
  margin: 0 0 0.75rem 0;
  color: var(--fg);
  line-height: 1.5;
}
.cards .meta {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* Section */
section {
  display: flex;
  flex-direction: column;
  margin-top: 4rem;
}
section:first-of-type {
  margin-top: 5rem;
  margin-bottom: 4rem;
}
section.row {
  flex-direction: row;
}
@media screen and (max-width: 700px) {
  section.row {
    flex-direction: column;
  }
}
section p {
  margin-top: 0;
}

/* Skill badges */
.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0rem;
}
.skill-badges span {
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--fg) 15%, var(--bg));
  color: var(--fg);
}

/* Other */
.circle {
  display: inline-block;
  width: calc(1rem - 4px);
  height: calc(1rem - 4px);
  background-color: var(--accent-color);
  border-radius: 50%;
  margin-right: 0.25rem;
}

/* Articles */
.articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.articles li:not(:last-child) {
  margin-bottom: 1.5rem;
}
.articles a {
  color: var(--accent);
  display: inline;
}
.articles .meta {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* Certification */
.certification {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.certification h4 {
  margin-top: 20px;
  margin-bottom: 0;
}

/* Footer */
footer {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 6rem;
  margin-bottom: 2rem;
}
footer a {
  color: inherit;
  text-decoration: none;
}
footer a:hover {
  color: var(--fg);
}