:root {
  --accent: #3aa14f;
  --bg: #fff;
  --text: #1a1a1a;
  --subtle-text: #535353;
  --nav-bg: #fafcff;
  --nav-shadow: rgba(0, 0, 0, 0.05);
  --btn-bg-hover: #2b8338;
  --border-color: #eaeaea;

  /* Icon base color for toggle & socials */
  --icon-color: #000; /* black in light mode */
}

[data-theme='dark'] {
  --accent: #7ed57e;
  --bg: #181818;
  --text: #e0e0e0;
  --subtle-text: #a0a0a0;
  --nav-bg: #242424;
  --nav-shadow: rgba(0, 0, 0, 0.9);
  --btn-bg-hover: #3a7a3a;
  --border-color: #333;

  --icon-color: #fff; /* white in dark mode */
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background: var(--nav-bg);
  box-shadow: 0 2px 12px var(--nav-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 700px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  color: var(--text);
  text-decoration: none;
}

.minimal-toggle {
  background: none;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  transition: filter 0.3s ease, color 0.3s ease;
  color: var(--icon-color);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimal-toggle img {
  display: block;
  pointer-events: none;
  user-select: none;
  filter: invert(0);
  transition: filter 0.3s ease;
}

[data-theme='dark'] .minimal-toggle img {
  filter: brightness(0) invert(1);
}

.minimal-toggle:hover,
.minimal-toggle:focus {
  filter: brightness(0.8);
  outline-offset: 4px;
  outline: 2px solid var(--btn-bg-hover);
  color: var(--btn-bg-hover);
}

/* Toggle icon color adjusts correctly */
[data-theme='dark'] .minimal-toggle {
  color: var(--icon-color);
  filter: none;
}

.container {
  max-width: 420px;
  margin: 3rem auto 4rem;
  padding: 0 1.5rem;
  text-align: center;
  flex-grow: 1;
}

.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
}

.description {
  margin-top: 0.5rem;
  color: var(--subtle-text);
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-line;
}

.social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--icon-color);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease, filter 0.3s ease, color 0.3s ease;
}

.social-links a img {
  width: 26px;
  height: 26px;
  pointer-events: none;
  user-select: none;
  filter: invert(0);
  transition: filter 0.3s ease;
}

[data-theme='dark'] .social-links a img {
  filter: brightness(0) invert(1);
}

/* On hover/focus green circular bg, icons show original colors */
.social-links a:hover,
.social-links a:focus {
  background-color: var(--accent);
  outline: none;
  color: white;
}

.social-links a:hover img,
.social-links a:focus img {
  filter: none;
}

footer {
  text-align: center;
  padding: 1.2rem 0;
  color: var(--subtle-text);
  font-size: 1em;
  border-top: 1px solid var(--border-color);
}

/* Simple fade-in animation */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards 0.1s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    margin: 2rem auto 3rem;
    max-width: 90vw;
  }
  .profile-pic {
    width: 120px;
    height: 120px;
  }
  h1 {
    font-size: 2rem;
  }
  .description {
    font-size: 1rem;
  }
  .social-links {
    gap: 1rem;
  }
}
