:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --accent: #7289da; /* discord blue */
  --accent2: #ff7b7b; /* mail red */
  --accent3: black;
  --text: #0b0b0b;
  --padding: 40px;
  --gap: 24px;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans Code", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--padding);
  gap: var(--gap);
}

body > * {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 48px);
  text-align: center;
  letter-spacing: -1px;
}

h2 {
  margin: 0;
  margin-top: 8px;
  font-size: clamp(16px, 3.2vw, 20px);
  text-align: center;
  font-weight: 400;
}

#pfp-main-div {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
}

#pfp-main {
  display: block;
  width: clamp(140px, 30vw, 220px);
  height: auto;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(10, 20, 40, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.7),
    rgba(255, 255, 255, 0.4)
  );
}

a {
  padding: 0;
  color: inherit;
}

footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
}

footer > div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  min-width: 120px;
}

#maildiv {
  background-color: var(--accent2);
}

#dcdiv {
  background-color: var(--accent);
}

#githubdiv {
  background-color: var(--accent3);
}

footer a {
  display: block;
  color: white;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 8px;
}

/* Navbar / logo inline with nav items */
header.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 6px auto;
  padding: 6px 0;
}

/* logo container (use in HTML: <header class="site-header"><a class="logo" href="/"><img id="pfp-navbar"> ... */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

#pfp-navbar {
  display: block;
  width: clamp(40px, 6vw, 56px); /* small circular logo size */
  height: auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(10, 20, 40, 0.08);
}

/* main navigation list sits inline and aligns vertically with logo */
nav.site-nav {
  margin-left: auto; /* push nav to the right */
}

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

nav.site-nav a {
  display: inline-block;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

nav.site-nav a:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  transition: all 0.16s ease;
}

@media (max-width: 420px) {
  :root {
    --padding: 18px;
    --gap: 12px;
  }
  body {
    padding: var(--padding);
    gap: var(--gap);
  }
  footer > div {
    min-width: 110px;
    padding: 8px 10px;
  }
}

@media (max-width: 640px) {
  /* on small screens, reduce logo and tighten nav spacing */
  #pfp-navbar {
    width: clamp(34px, 8vw, 44px);
  }
  nav.site-nav ul {
    gap: 8px;
  }
}

footer > div:hover {
  transform: translateY(-3px);
  transition: transform 0.18s ease;
}

#maildiv,
#dcdiv,
#githubdiv {
  height: auto;
  width: auto;
  display: flex;
}

span {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Projects showcase */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 6px 0 28px;
}

.project-card {
  display: flex;
  gap: 18px;
  align-items: center;
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.92));
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(10,20,40,0.06);
}

.project-screenshot {
  display: block;
  width: 180px;
  min-width: 120px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(116,137,218,0.12), rgba(74,163,255,0.06));
  text-decoration: none;
}

.project-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white; /* ensure white background */
  padding: 10px;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
  background-size: cover;
}

.project-meta {
  flex: 1;
}

.project-title {
  margin: 0 0 6px 0;
  font-size: 18px;
}

.project-desc {
  margin: 0 0 10px 0;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 6px 0 12px;
}

.project-tags span {
  background: rgba(0,0,0,0.06);
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
}

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

.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), #4aa3ff);
  color: white;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text);
}

@media (max-width: 640px) {
  .project-card {
    flex-direction: column;
    align-items: stretch;
  }
  .project-screenshot {
    width: 100%;
    height: 160px;
  }
}
