/* ---------------------------- Imports ---------------------------- */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital@0;1&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');


/* ---------------------------- Reset & Global ---------------------------- */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* prevents sticky header overlap */
}

body {
  font: 15px/1.6 "Roboto", 'Segoe UI', sans-serif;
  background: #0b0f19;
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem;
}

a {
  transition: color 0.25s ease;
}

:focus-visible {
  outline: 2px solid #6a0dad;
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}


/* ---------------------------- Typography ---------------------------- */

h1, h2, h3 {
  color: #f3f4f6;
}

h1 {
  margin: 0 0 0.5rem;
  font-family: "Merriweather", serif;
  font-size: 2rem;
  font-weight: 600;
}

h2 {
  font-family: "Merriweather", serif;
  font-size: 24px;
}

.textShortener {
  display: inline-block;
  max-width: 800px;
}

.topHead {
  text-align: center;
  font-weight: bold;
}


/* ---------------------------- Layout Helpers ---------------------------- */

.spacer {
  margin-top: 1rem;
  padding-top: 2rem;
  margin-bottom: 1rem;
}

.picSizer {
  width: 800px;
  height: auto;
}

.picCenter {
  width: 500px;
  height: auto;
  margin: 0 auto;
  display: block;
}


/* ---------------------------- Images ---------------------------- */

.about-photo,
.project-img {
  border: 2px solid #1f2937;
  border-radius: 8px;
}


/* ---------------------------- Header ---------------------------- */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0b0f19, #111827);
  border-bottom: 1px solid #1f2937;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 0;
}

.branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.title {
  font-family: "DM Serif Text", serif;
  color: #f3f4f6;
  font-size: 30px;
  font-weight: bold;
  margin: 0;
}

.slogan {
  font-family: "DM Serif Text", serif;
  color: #9ca3af;
  font-size: smaller;
  margin: -4px 0 0;
}

.nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.navGlow {
  position: relative;
  padding: 3px;
  border-radius: 10px;
  background: linear-gradient(90deg, #0a1a4f, #6a0dad);
  transition: all 0.35s ease;
}

.navGlow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: inherit;
  z-index: -1;
  transition: filter 0.35s ease;
}

.navGlow:hover::before {
  background: linear-gradient(90deg, #0a1a4f, #9b30ff);
  filter: blur(1.2em);
}

.navButton {
  background-color: #111827;
  color: #e5e7eb;
  font-family: "Merriweather", serif;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.navButton:hover {
  background-color: #e5e7eb;
  color: #111827;
  transform: translateY(-2px);
}


/* ---------------------------- Footer ---------------------------- */

footer {
  text-align: center;
  background: linear-gradient(135deg, #0b0f19, #111827);
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
  padding: 0.5rem 0;
}

.copyright {
  font-family: Georgia, serif;
  color: #e5e7eb;
  font-weight: bold;
  font-size: smaller;
}


/* ---------------------------- Contact Card ---------------------------- */

.contact {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem auto;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  text-align: left;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li {
  display: flex;
  align-items: center;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}

.contact-list .icon {
  margin-right: 0.5rem;
  color: #c084fc;
}

.contact-list .label {
  font-weight: 600;
  color: #c084fc;
  margin-right: 0.5rem;
  min-width: 70px;
}

.contact-list a {
  color: #93c5fd;
  text-decoration: none;
}

.contact-list a:hover {
  color: #c084fc;
}


/* ---------------------------- About Section ---------------------------- */

.about-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1000px;
}

.about-photo {
  width: 300px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  border: 2px solid #1f2937;
}

.about {
  background: #111827;
  border: 1px solid #1f2937;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  border-radius: 12px;
  padding: 1.5rem;
  line-height: 1.6;
  flex: 1;
  margin: 0;
}

@media (max-width: 700px) {
  .about-wrapper {
    flex-direction: column;
    text-align: center;
  }

  .about-photo {
    margin: 0 auto;
  }
}


/* ---------------------------- Cert Grid ---------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.certCard {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}

.certCard:hover {
  background: #1f2937;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  border-color: #4c1d95;
  cursor: pointer;
}

.thumb {
  width: 100%;
  display: block;
  object-fit: cover;
}

.cert-info {
  padding: 0.75rem 0.8rem;
  display: grid;
  gap: 0.35rem;
}

.cert-info h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: #f3f4f6;
}

.cert-info div {
  font-size: 0.95rem;
  color: #9ca3af;
}


/* ---------------------------- Modal ---------------------------- */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

#caption {
  margin: 15px auto;
  text-align: center;
  color: #c084fc;
  font-size: 1rem;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #c084fc;
}


/* ---------------------------- Project Cards ---------------------------- */

.project {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin: 2rem 0;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  border-color: #4c1d95;
}

.project-img {
  width: 250px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.project-info {
  flex: 1;
}

.project-info h2 {
  margin-top: 0;
  font-family: "Merriweather", serif;
  font-size: 1.4rem;
  color: #f3f4f6;
}

.project-info p {
  color: #9ca3af;
  margin: 0.5rem 0 1rem;
  line-height: 1.6;
}

.project-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #6a0dad;
  color: #f3f4f6;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.project-link:hover {
  background: #9b30ff;
  transform: translateY(-2px);
}


/* ---------------------------- Coding Cards ---------------------------- */

.code-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.code-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.code-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.code-card-header h2 {
  font-size: 1.4rem;
  margin: 0;
  font-family: "Merriweather", serif;
  color: #f3f4f6;
}

.badges {
  display: flex;
  gap: 8px;
}

.badge {
  background: #1f2937;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #c084fc;
}

.code-description {
  margin: 12px 0 20px;
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.5;
}

.github-button {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 16px;
  background: #6a0dad;
  color: #f3f4f6;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.github-button:hover {
  background: #9b30ff;
  transform: translateY(-2px);
}


/* ---------------------------- Writing Cards ---------------------------- */

.writing-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-left: 6px solid #4c1d95;
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.writing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  border-color: #4c1d95;
}

.writing-card h2 {
  margin-top: 0;
  font-family: "Merriweather", serif;
  font-size: 1.4rem;
  color: #f3f4f6;
  background: linear-gradient(90deg, #1f2937, #111827);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.writing-description {
  margin: 0.75rem 0 1.25rem;
  line-height: 1.6;
  color: #9ca3af;
}

.writing-button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #6a0dad;
  color: #f3f4f6;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.writing-button:hover {
  background: #9b30ff;
  transform: translateY(-2px);
}