/* Variables for easy color theming */
:root {
  --primary-color: #D4AF37; /* premium gold */
  --primary-color-light: #E5C558;
  --background-dark: #0a0a0a; /* deep black */
  --background-darker: #121212; /* charcoal */
  --text-light: #f2f2f2; /* near white */
  --text-lighter: #c8c8c8; /* muted light */
  --shadow-color: rgba(212, 175, 55, 0.25);
  --font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-dark);
  color: var(--text-light);
  line-height: 1.7;
  scroll-behavior: smooth;
  min-height: 100vh;
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
  outline-offset: 2px;
}
a:focus,
a:hover {
  color: var(--primary-color);
  outline: none;
}

/* Images */
img {
  max-width: 100%;
  display: block;
  border-radius: 0.5rem;
  user-select: none;
  pointer-events: none;
}

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(6px);
  padding: 1rem 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  transition: background-color 0.3s ease;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1.5px;
  cursor: default;
  user-select: none;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-light);
  font-size: 1.05rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
  border-radius: 2px;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 50px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 16px;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

body.dark-mode {
  --background-dark: #111;
  --background-darker: #000;
  --text-light: #fff;
  --text-lighter: #eee;
}

.menu-icon {
  display: none;
  font-size: 2.2rem;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.3s ease;
}

.menu-icon:focus,
.menu-icon:hover {
  color: var(--primary-color-light);
  outline: none;
}

/* Scroll padding to avoid header overlap */
html {
  scroll-padding-top: 70px;
}

/* Home Section */
.home {
  position: relative;
  padding: 8rem 9% 5rem;
  display: flex;
  gap: 4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  user-select: none;
}

.hero-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--primary-color) 0%, #0f0f0f 60%);
  filter: blur(70px) brightness(1);
  animation: heroGradient 10s ease-in-out infinite alternate;
}
@keyframes heroGradient {
  0% {
    background: radial-gradient(circle at 30% 30%, var(--primary-color) 0%, #0f0f0f 60%);
  }
  100% {
    background: radial-gradient(circle at 70% 70%, #0f0f0f 0%, var(--primary-color) 65%);
  }
}
.circular-wrapper, .home-content { position: relative; z-index: 1; }

/* Circular image wrapper */
.circular-wrapper {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--text-light);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  flex-shrink: 0;
  transition: box-shadow 0.3s ease;
}
.circular-wrapper:hover,
.circular-wrapper:focus-within {
  box-shadow: 0 0 25px var(--primary-color);
}

.circular-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* Home content */
.home-content {
  flex: 2 1 400px;
  max-width: 600px;
  user-select: text;
}

.home-content h1 {
  font-size: 3.2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-light);
}

.typing-text {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color-light);
  font-weight: 600;
  min-height: 36px; /* reserve space */
  white-space: nowrap;
  overflow: hidden;
}

.typing-text span {
  border-right: 2px solid var(--primary-color);
  padding-right: 4px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%,
  100% {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

.home-content p {
  font-size: 1.2rem;
  color: var(--text-lighter);
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.btn {
  background-color: var(--primary-color);
  color: #1a1a1a;
  padding: 0.75rem 2.2rem;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.15s ease;
  display: inline-block;
  box-shadow: 0 5px 12px rgba(196, 154, 108, 0.35);
  text-align: center;
  user-select: none;
}

.btn:hover,
.btn:focus {
  background-color: var(--primary-color-light);
  outline: none;
  box-shadow: 0 10px 18px rgba(196, 154, 108, 0.45);
  transform: translateY(-1px);
}

/* Social Icons */
.social-icons {
  margin-bottom: 2rem;
}

.social-icons a {
  color: var(--primary-color);
  font-size: 1.7rem;
  margin-right: 1.3rem;
  transition: color 0.3s ease;
}

.social-icons a:last-child {
  margin-right: 0;
}

.social-icons a:hover,
.social-icons a:focus {
  color: var(--primary-color-light);
  outline: none;
}

/* About Section */
#about {
  padding: 5rem 9%;
  background-color: var(--background-darker);
  border-radius: 10px;
  margin: 2rem 9%;
  box-shadow: 0 6px 24px var(--shadow-color);
  border: 1px solid #e3dccb;
}

#about h2 {
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

#about p {
  font-size: 1.15rem;
  color: #ddd;
  line-height: 1.7;
  margin-bottom: 1rem;
  white-space: pre-line;
}

/* Projects Section */
#projects {
  padding: 5rem 9%;
  background: var(--background-dark);
}

#projects .container {
  max-width: 1100px;
  margin: 0 auto;
}

#projects h2 {
  font-size: 2.6rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.projects-section .project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.projects-section .project {
  background: var(--background-darker);
  border: 1px solid rgba(196, 154, 108, 0.25);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.projects-section .project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.projects-section .project img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.projects-section .project h3 {
  font-size: 1.5rem;
  margin: 1rem 1.5rem;
  color: var(--primary-color);
}

.projects-section .project p {
  font-size: 1rem;
  margin: 0 1.5rem 1.5rem;
  flex-grow: 1;
}

.projects-section .project .btn {
  display: inline-block;
  margin: 0 1.5rem 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 0.25rem;
  text-align: center;
  transition: background-color 0.3s ease;
}

.projects-section .project .btn:hover {
  background: var(--primary-color-light);
}

/* Contact Section */
.contact-section {
  padding: 5rem 9%;
  background-color: var(--background-darker);
  border-radius: 10px;
  margin: 2rem 9% 5rem;
  text-align: center;
  box-shadow: 0 6px 24px var(--shadow-color);
  border: 1px solid #e3dccb;
}

#contact h2 {
  font-size: 2.6rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-weight: 700;
}

#contact p {
  font-size: 1.3rem;
  color: #ddd;
  letter-spacing: 1.1px;
  margin-bottom: 2rem;
}

/* QR code container */
#contact > div {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  user-select: none;
}

#contact > div > div {
  text-align: center;
  flex: 0 1 150px;
}

#contact img {
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
}

#contact img:hover,
#contact img:focus {
  box-shadow: 0 0 20px var(--primary-color);
  outline: none;
}

/* Responsive Styling */
@media (max-width: 900px) {
  .home {
    flex-direction: column;
    padding-top: 6rem;
  }

  .home-content {
    max-width: 100%;
    text-align: center;
  }

  nav {
    position: fixed;
    top: 60px;
    right: 0;
    background-color: #1f1f1f;
    height: calc(100vh - 60px);
    width: 220px;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -3px 0 15px #000000bb;
    z-index: 9999;
  }

  nav.show {
    transform: translateX(0);
  }

  nav a {
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  .menu-icon {
    display: block;
  }
}

@media (max-width: 450px) {
  .circular-wrapper {
    width: 250px;
    height: 250px;
  }

  .home-content h1 {
    font-size: 2.5rem;
  }

  .typing-text {
    font-size: 1.2rem;
    min-height: 28px;
  }

  #projects h2,
  #about h2,
  #contact h2 {
    font-size: 2.2rem;
  }
}

.contact-section {
  padding: 5rem 9%;
  background-color: var(--background-darker);
}

.contact-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-section input,
.contact-section textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #333;
  background: #222;
  color: var(--text-light);
  border-radius: 0.25rem;
}

.contact-section .btn {
  align-self: flex-start;
}

/* Project Technology Tags */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tag {
  background: rgba(255, 77, 77, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

.project-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn.secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-left: 1rem;
}

.btn.secondary:hover {
  background-color: var(--primary-color);
  color: #111;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Footer */
footer {
  padding: 2rem 9%;
  background: var(--background-darker);
}

.site-footer {
  width: 100%;
  background: var(--background-darker);
  color: var(--text-light);
  padding: 1.2rem 9%;
  position: sticky;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.25);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 1rem;
}
.footer-socials a {
  color: var(--primary-color);
  margin-left: 1.2rem;
  font-size: 1.3rem;
  transition: color 0.2s;
}
.footer-socials a:hover {
  color: var(--primary-color-light);
}

/* Skills Section */
.skills-section {
  padding: 5rem 9%;
  background: var(--background-darker);
  border-radius: 10px;
  margin: 2rem 9%;
  box-shadow: 0 0 25px var(--shadow-color);
  text-align: center;
}
.skills-section h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}
.skills-list .tech-tag {
  font-size: 1.1rem;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 77, 77, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 20px;
  font-weight: 600;
  transition: background 0.2s;
}
.skills-list .tech-tag:hover {
  background: var(--primary-color);
  color: #111;
}

.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10,10,10,0.92);
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}
.lightbox-modal.show {
  display: flex;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 40px #000a;
  background: #222;
}
.lightbox-close {
  position: absolute;
  top: 2.5rem;
  right: 3.5rem;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 20001;
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--primary-color);
}
@media (max-width: 600px) {
  .lightbox-img {
    max-width: 98vw;
    max-height: 60vh;
  }
  .lightbox-close {
    top: 1.2rem;
    right: 1.2rem;
    font-size: 2rem;
  }
}

.site-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, #f9f6ef 0%, #f1eee8 60%, #ece7df 100%);
  background-size: 120% 120%;
  animation: siteGradient 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes siteGradient {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* Certifications Section */
.certifications-section {
  padding: 5rem 9%;
  background: var(--background-dark);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.cert-card {
  background: var(--background-darker);
  border: 1px solid rgba(196, 154, 108, 0.25);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
}
.cert-image img { width: 100%; height: 180px; object-fit: cover; }
.cert-body { padding: 1rem 1.25rem; }
.cert-title { color: var(--primary-color); font-size: 1.2rem; margin-bottom: 0.5rem; }
.cert-meta { color: var(--text-lighter); margin-bottom: 0.75rem; }
.badge-chip { display: inline-block; font-size: 0.8rem; border: 1px solid rgba(196,154,108,0.3); border-radius: 14px; padding: 0.2rem 0.6rem; margin: 0.15rem; color: var(--primary-color); background: rgba(196,154,108,0.08); }

/* Print-friendly tweaks */
@media print {
  header, .site-footer, .scroll-to-top { display: none !important; }
  .home { padding-top: 2rem; }
  .site-bg { display: none; }
}
body > *:not(.site-bg) { position: relative; z-index: 1; }

.certifications-section, .resume-section {
  padding: 5rem 9%;
  background-color: var(--background-darker);
  border-radius: 10px;
  margin: 2rem 9% 5rem;
  box-shadow: 0 0 25px var(--shadow-color);
}

.certifications-section h2, .resume-section h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Certifications grid centering */
.certifications-section .cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto; /* center grid within section */
}

.cert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--background-darker);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.cert-image {
  position: relative;
  width: 100%;
  height: 180px;
  background: #1c1c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  overflow: hidden;
}
.cert-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-body {
  padding: 1rem 1rem 1.25rem;
  position: relative;
  z-index: 1;
  background: transparent;
}
.cert-title {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin: 0 0 0.25rem;
}
.cert-meta {
  color: var(--text-lighter);
  margin: 0 0 0.75rem;
}
.cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.badge-chip {
  background: rgba(255, 77, 77, 0.08);
  color: var(--primary-color);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 77, 77, 0.25);
}
.cert-actions { display: flex; gap: 0.5rem; }
.resume-inline object {
  width: 100%;
  height: 600px;
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: 8px;
  box-shadow: 0 0 10px var(--shadow-color);
}

.resume-fallback {
  color: #bbb;
}

.projects-section .loading {
  color: #bbb;
  padding: 1rem;
}
.projects-section .project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.projects-section .project {
  background: var(--background-darker);
  border: 1px solid rgba(255, 77, 77, 0.25);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.projects-section .project:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.projects-section .project img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.projects-section .project h3 {
  font-size: 1.5rem;
  margin: 1rem 1.5rem;
  color: var(--primary-color);
}

.projects-section .project p {
  font-size: 1rem;
  margin: 0 1.5rem 1.5rem;
  flex-grow: 1;
}

.projects-section .project .btn {
  display: inline-block;
  margin: 0 1.5rem 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 0.25rem;
  text-align: center;
  transition: background-color 0.3s ease;
}

.projects-section .project .btn:hover {
  background: var(--primary-color-light);
}

/* Contact Section */
.contact-section {
  padding: 5rem 9%;
  background-color: var(--background-darker);
  border-radius: 10px;
  margin: 2rem 9% 5rem;
  text-align: center;
  box-shadow: 0 0 25px var(--shadow-color);
}

#contact h2 {
  font-size: 2.6rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  font-weight: 700;
}

#contact p {
  font-size: 1.3rem;
  color: #ddd;
  letter-spacing: 1.1px;
  margin-bottom: 2rem;
}

/* QR code container */
#contact > div {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  user-select: none;
}

#contact > div > div {
  text-align: center;
  flex: 0 1 150px;
}

#contact img {
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.3);
}

#contact img:hover,
#contact img:focus {
  box-shadow: 0 0 20px var(--primary-color);
  outline: none;
}

/* Responsive Styling */
@media (max-width: 900px) {
  .home {
    flex-direction: column;
    padding-top: 6rem;
  }

  .home-content {
    max-width: 100%;
    text-align: center;
  }

  nav {
    position: fixed;
    top: 60px;
    right: 0;
    background-color: #1f1f1f;
    height: calc(100vh - 60px);
    width: 220px;
    flex-direction: column;
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -3px 0 15px #000000bb;
    z-index: 9999;
  }

  nav.show {
    transform: translateX(0);
  }

  nav a {
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  .menu-icon {
    display: block;
  }
}

@media (max-width: 450px) {
  .circular-wrapper {
    width: 250px;
    height: 250px;
  }

  .home-content h1 {
    font-size: 2.5rem;
  }

  .typing-text {
    font-size: 1.2rem;
    min-height: 28px;
  }

  #projects h2,
  #about h2,
  #contact h2 {
    font-size: 2.2rem;
  }
}

.contact-section {
  padding: 5rem 9%;
  background-color: var(--background-darker);
}

.contact-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-section input,
.contact-section textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #333;
  background: #222;
  color: var(--text-light);
  border-radius: 0.25rem;
}

.contact-section .btn {
  align-self: flex-start;
}

/* Project Technology Tags */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tag {
  background: rgba(255, 77, 77, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 77, 77, 0.3);
}

.project-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn.secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-left: 1rem;
}

.btn.secondary:hover {
  background-color: var(--primary-color);
  color: #111;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Footer */
footer {
  padding: 2rem 9%;
  background: var(--background-darker);
}

.site-footer {
  width: 100%;
  background: var(--background-darker);
  color: var(--text-light);
  padding: 1.2rem 9%;
  position: sticky;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.25);
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 1rem;
}
.footer-socials a {
  color: var(--primary-color);
  margin-left: 1.2rem;
  font-size: 1.3rem;
  transition: color 0.2s;
}
.footer-socials a:hover {
  color: var(--primary-color-light);
}

/* Skills Section */
.skills-section {
  padding: 5rem 9%;
  background: var(--background-darker);
  border-radius: 10px;
  margin: 2rem 9%;
  box-shadow: 0 0 25px var(--shadow-color);
  text-align: center;
}
.skills-section h2 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}
.skills-list .tech-tag {
  font-size: 1.1rem;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 77, 77, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 20px;
  font-weight: 600;
  transition: background 0.2s;
}
.skills-list .tech-tag:hover {
  background: var(--primary-color);
  color: #111;
}

.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10,10,10,0.92);
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}
.lightbox-modal.show {
  display: flex;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 40px #000a;
  background: #222;
}
.lightbox-close {
  position: absolute;
  top: 2.5rem;
  right: 3.5rem;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 20001;
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--primary-color);
}
@media (max-width: 600px) {
  .lightbox-img {
    max-width: 98vw;
    max-height: 60vh;
  }
  .lightbox-close {
    top: 1.2rem;
    right: 1.2rem;
    font-size: 2rem;
  }
}

.site-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0;
  background: radial-gradient(circle at 20% 20%, #0d0d0d 0%, #121212 60%, #0a0a0a 100%);
  background-size: 120% 120%;
  animation: siteGradient 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes siteGradient {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}
body > *:not(.site-bg) { position: relative; z-index: 1; }
