/* ============ theme ============ */
:root {
  --bg: #f4f4f4;
  --text: #333333;
  --accent: #2ecc71;
  --card: #ffffff;
  --footer-text: #888888;

  /* buttons (navbar, socials, downloads) */
  --btn-bg: #2a2a2e;
  --btn-text: #ffffff;
  --btn-outline: #ffffff;
  --card-outline: #333333;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e0e0e0;
    --card: #1e1e1e;
    --card-outline: #ffffff;
  }
}

/* ============ base ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-transform: lowercase;
  /* 'SiteFont' is registered by /font/font.js using the file named in /font/font.txt */
  font-family: 'SiteFont', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 600;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer {
  padding: 2rem;
  text-align: center;
  color: var(--footer-text);
  font-size: 0.9rem;
}

.page-title {
  margin-bottom: 2rem;
  text-align: center;
}

/* ============ buttons (one shared look) ============ */
nav a,
.social-links a,
.dl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-bg);
  color: var(--btn-text);
  text-decoration: none;
  border-radius: 16px;
  outline: 3px solid transparent;
  outline-offset: -3px;
  transition: outline-color 0.15s ease;
}

nav a:hover,
nav a:focus-visible,
.social-links a:hover,
.social-links a:focus-visible,
.dl-btn:hover,
.dl-btn:focus-visible {
  outline-color: var(--btn-outline);
}

/* ============ navbar: always one row, all buttons identical ============ */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(0.5rem, 2vw, 1rem);
  padding: 1.5rem 1rem;
}

nav a {
  flex: 0 1 11rem;       /* same width for every button, shrinks equally on small screens */
  min-width: 0;
  height: 3.5rem;        /* same height for every button */
  font-size: clamp(0.9rem, 4.6vw, 1.25rem);
  white-space: nowrap;
}

/* ============ social buttons: always one row, 1:1 ============ */
.social-links {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: clamp(0.4rem, 1.5vw, 0.9rem);
  width: 100%;
  margin-top: 2rem;
}

.social-links a {
  flex: 0 1 4.5rem;
  min-width: 0;
  aspect-ratio: 1 / 1;
}

.social-links img {
  width: 50%;
  height: 50%;
  filter: brightness(0) invert(1); /* icons always white */
}

/* ============ home ============ */
.profile-card {
  text-align: center;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pfp-container {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.pfp-container img {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--card);
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: #747f8d;
}

.display-name {
  font-size: 2rem;
}

.username-tag {
  display: inline-block;
  color: #888888;
  white-space: nowrap;
  margin-top: 2px;
}

.bio-text {
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.status-text {
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

#activities-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  width: 100%;
}

.activity-card {
  display: flex;
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  text-align: left;
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(128, 128, 128, 0.1);
  align-items: center;
  gap: 1rem;
}

.activity-card img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.activity-details h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.activity-details p {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 1px;
}

.activity-time {
  font-weight: 500;
  opacity: 0.9;
}

/* ============ about ============ */
.about-wrapper {
  max-width: 500px;
  width: 100%;
  text-align: left;
}

.countdown {
  opacity: 0.6;
  font-size: 0.9rem;
  margin-top: 1.6rem;
}

.about-content {
  text-align: left;
  max-width: 600px;
  width: 100%;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

/* ============ projects list ============ */
.category-select {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(128, 128, 128, 0.2);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232ecc71' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  outline: none;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.project-card {
  position: relative;
  background: var(--card);
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
  outline: 3px solid transparent;
  outline-offset: -3px;
  transition: outline-color 0.15s ease;
}

.project-card:hover,
.project-card:focus-visible {
  outline-color: var(--card-outline);
}

.project-card p {
  opacity: 0.7;
}

.project-icon {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
}

.project-date {
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  color: #ffffff;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
}

/* ============ 404 ============ */
.error-page {
  justify-content: center;
}

.error-code {
  font-size: clamp(5rem, 22vw, 8rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

/* ============ small screens ============ */
@media (max-width: 600px) {
  main {
    padding: 1rem;
  }

  .project-card {
    flex-direction: column;
    text-align: center;
  }

  .project-date {
    position: static;
    margin-top: 0.6rem;
  }
}
