/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:       #ffb3c6;
  --pink-deep:  #ff6b9d;
  --lavender:   #c9b8f5;
  --lavender-light: #ede8ff;
  --mint:       #b5ead7;
  --mint-light: #e4f8f0;
  --cream:      #fff9f0;
  --soft-white: #fffcfe;
  --text:       #3a2e4a;
  --text-soft:  #7a6a8a;
  --card-bg:    #ffffff;
  --shadow:     rgba(200, 170, 220, 0.25);
  --border:     #f0d9ff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--cream);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===================== BACKGROUND DECO ===================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255,179,198,.18) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(201,184,245,.22) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(181,234,215,.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.deco-dot {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  animation: float 6s ease-in-out infinite alternate;
}
.deco-dot:nth-child(1) { width: 220px; height: 220px; background: radial-gradient(var(--pink), transparent); top: -60px; left: -60px; animation-delay: 0s; }
.deco-dot:nth-child(2) { width: 160px; height: 160px; background: radial-gradient(var(--lavender), transparent); top: 40%; right: -50px; animation-delay: -2s; }
.deco-dot:nth-child(3) { width: 120px; height: 120px; background: radial-gradient(var(--mint), transparent); bottom: 10%; left: 5%; animation-delay: -4s; }

@keyframes float {
  from { transform: translateY(0px) rotate(0deg); }
  to   { transform: translateY(18px) rotate(6deg); }
}

/* ===================== LAYOUT ===================== */
main { position: relative; z-index: 1; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

/* ===================== SITE NAV ===================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 1.5rem;
}

.site-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  font-family: 'Shrikhand', cursive;
  font-size: 1.6rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  transition: transform 0.2s;
}
.site-nav__brand:hover { transform: scale(1.05); }
.site-nav__brand .tilde { color: var(--pink-deep); }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links .pill-link {
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  white-space: nowrap;
}

.site-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--text);
  border-radius: 99px;
  transition: transform 0.3s, opacity 0.3s;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
}
.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

/* Hamburger -> X animation when open */
.site-nav--open .hamburger { background: transparent; }
.site-nav--open .hamburger::before { top: 0; transform: rotate(45deg); }
.site-nav--open .hamburger::after  { top: 0; transform: rotate(-45deg); }

/* ===================== HERO ===================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.hero__inner { animation: fadeUp .8s ease both; }

.hero__badge {
  display: inline-block;
  background: var(--pink);
  color: #b5005a;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: 'Shrikhand', cursive;
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  color: var(--text);
  position: relative;
  display: inline-block;
}

.hero__title span.tilde { color: var(--pink-deep); }

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-soft);
  margin-top: 1.25rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Navigation (moved to site-nav) */

.socials {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.2rem;
  border-radius: 99px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.social-link:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 18px var(--shadow);
}

.social-link--github   { background: #f0e8ff; color: #5e35b1; border-color: #d1b8ff; }
.social-link--codeberg { background: #e4f8f0; color: #1a6e47; border-color: #b5ead7; }
.social-link--email    { background: #fff0e8; color: #b33c00; border-color: #ffcba8; }

.scroll-hint {
  margin-top: 3.5rem;
  font-size: .8rem;
  color: var(--text-soft);
  letter-spacing: .1em;
  animation: pulse 2.4s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

/* ===================== SECTION HEADER ===================== */
.section-header { text-align: center; margin-bottom: 3rem; }

.section-header__label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: .6rem;
}

.section-header h2 {
  font-family: 'Shrikhand', cursive;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--text);
}

.section-header p {
  color: var(--text-soft);
  max-width: 500px;
  margin: .75rem auto 0;
}

.squiggle {
  display: block;
  width: 80px;
  height: 8px;
  margin: .75rem auto 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 8'%3E%3Cpath d='M0 4 Q10 0 20 4 Q30 8 40 4 Q50 0 60 4 Q70 8 80 4' fill='none' stroke='%23ff6b9d' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ===================== CATEGORY FILTERS ===================== */
.category-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.category-filter {
  display: inline-block;
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  border-radius: 99px;
  border: 2px solid var(--lavender);
  background: var(--card-bg);
  color: #4a2d8a;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.category-filter:hover {
  background: var(--lavender-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.category-filter--active {
  background: var(--lavender);
  color: #4a2d8a;
  border-color: var(--lavender);
  box-shadow: 0 4px 12px var(--shadow);
}

.category-filter--active:hover {
  background: var(--lavender);
}

/* ===================== "SEE ALL" LINK ===================== */
.see-all {
  text-align: center;
  margin-top: 3.5rem;
}

.see-all__link {
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
  box-shadow: 0 4px 15px rgba(200, 170, 220, 0.4);
}

/* ===================== CARDS GRID ===================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===================== BLOG ===================== */
#blog { background: var(--lavender-light); }

.blog-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: transform .25s, box-shadow .25s;
  animation: fadeUp .6s ease both;
}
.blog-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  box-shadow: 0 12px 30px var(--shadow);
}

.blog-card__tag {
  display: inline-block;
  background: var(--lavender);
  color: #4a2d8a;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 99px;
  width: fit-content;
}

.blog-card__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
}

.blog-card__excerpt {
  font-size: .9rem;
  color: var(--text-soft);
  flex: 1;
}

.blog-card__meta {
  font-size: .78rem;
  color: #aaa;
  font-weight: 600;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  border: 2.5px dashed var(--border);
  border-radius: 24px;
  color: var(--text-soft);
}
.empty-state__icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .5rem; }

/* ===================== PROJECTS ===================== */
#personal { background: var(--mint-light); }

.project-card {
  position: relative;
  background: var(--card-bg);
  border: 2px solid #c8f0de;
  border-radius: 20px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: transform .25s, box-shadow .25s;
  animation: fadeUp .6s ease both;
}
.project-card:hover {
  transform: translateY(-5px) rotate(0.5deg);
  box-shadow: 0 12px 30px rgba(150,220,180,.3);
}

.project-card__icon { font-size: 2rem; line-height: 1; }

.project-card__name { font-size: 1.1rem; font-weight: 800; color: var(--text); }

.project-card__link {
  text-decoration: none;
  color: inherit;
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.project-card__desc { font-size: .9rem; color: var(--text-soft); flex: 1; }

.project-card__stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 99px;
  background: var(--mint);
  color: #1a6e47;
}

#school { background: var(--lavender-light); }
#school .project-card { border-color: #f0d9ff; }
#school .project-card:hover { box-shadow: 0 12px 30px rgba(180,150,230,.25); }
#school .tag { background: var(--lavender); color: #4a2d8a; }

.project-card__links {
  position: relative;
  z-index: 2;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 700;
  color: #4a2d8a;
  background: var(--lavender-light);
  border: 1.5px solid var(--lavender);
  border-radius: 99px;
  padding: .25rem .8rem;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.pill-link:hover { background: var(--lavender); transform: scale(1.05); }

#personal .pill-link { color: #1a6e47; background: var(--mint-light); border-color: var(--mint); }
#personal .pill-link:hover { background: var(--mint); }

/* ===================== FOOTER ===================== */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  font-size: .85rem;
  color: var(--text-soft);
  position: relative;
  z-index: 1;
}
footer .heart { color: var(--pink-deep); }

footer a {
  color: var(--pink-deep);
  font-weight: 800;
  text-decoration: none;
}

footer .footer__sub {
  margin-top: .4rem;
  font-size: .75rem;
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cards-grid > *:nth-child(1) { animation-delay: .05s; }
.cards-grid > *:nth-child(2) { animation-delay: .15s; }
.cards-grid > *:nth-child(3) { animation-delay: .25s; }
.cards-grid > *:nth-child(4) { animation-delay: .35s; }
.cards-grid > *:nth-child(5) { animation-delay: .45s; }
.cards-grid > *:nth-child(6) { animation-delay: .55s; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  section { padding: 3.5rem 0; }
  .cards-grid { grid-template-columns: 1fr; }

  /* Hamburger toggle visible on mobile */
  .site-nav__toggle { display: block; }

  /* Nav links: hidden by default, shown when open */
  .site-nav__links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding-top: 1rem;
  }

  .site-nav--open .site-nav__links { display: flex; }

  .site-nav__inner {
    flex-wrap: wrap;
  }

  .site-nav__links .pill-link {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }
}

/* ===================== ARCHIVE / LIST PAGE ===================== */
.archive-section {
  padding-top: 8rem;
  min-height: 80vh;
  background: var(--lavender-light);
}

/* ===================== CONTENT PAGE SPECIFIC ===================== */
.post-container { max-width: 800px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.post-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 12px 30px var(--shadow);
  animation: fadeUp .6s ease both;
}
.post-header { text-align: center; margin-bottom: 2.5rem; }
.back-btn {
  display: inline-block;
  font-weight: 800;
  color: var(--pink-deep);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: transform .2s;
}
.back-btn:hover { transform: translateX(-5px); }

.post-meta {
  font-size: 0.9rem;
  margin-top: 1rem;
  color: var(--text-soft);
}

.post-links {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.pill-link--source {
  background: var(--lavender-light);
  border-color: var(--lavender);
  color: #4a2d8a;
}

.pill-link--demo {
  background: var(--mint-light);
  border-color: var(--mint);
  color: #1a6e47;
}

.post-content { color: var(--text); line-height: 1.8; }
.post-content h1, .post-content h2, .post-content h3 {
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-family: 'Shrikhand', cursive;
}
.post-content p { margin-bottom: 1.5rem; color: var(--text-soft); }
.post-content a {
  color: var(--pink-deep);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--pink);
  text-underline-offset: 4px;
}
.post-content a:hover { color: var(--text); }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--text-soft); }
.post-content li { margin-bottom: 0.5rem; }
.post-content code { background: var(--lavender-light); padding: 0.2rem 0.4rem; border-radius: 4px; font-size: 0.9em; color: #4a2d8a; }
.post-content pre { background: var(--text); padding: 1rem; border-radius: 8px; overflow-x: auto; margin-bottom: 1.5rem; }
.post-content pre code { background: none; color: var(--cream); padding: 0; }
.post-content img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; border-radius: 8px; transition: transform 0.2s; }
.post-content img:hover { transform: scale(1.02); }

.post-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 8px 20px var(--shadow);
}
.post-content th, .post-content td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  color: var(--text-soft);
}
.post-content th {
  background: var(--lavender-light);
  color: #4a2d8a;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.post-content td {
  font-size: 0.95rem;
}
.post-content tr:last-child td {
  border-bottom: none;
}
.post-content tr {
  transition: background-color 0.2s;
}
.post-content tbody tr:hover td {
  background-color: var(--mint-light);
}

/* ===================== IMAGE MODAL ===================== */
.image-modal {
  display: flex;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(58, 46, 74, 0.95); /* Using var(--text) base */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal--open {
  visibility: visible;
  opacity: 1;
}

.image-modal__content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-modal--open .image-modal__content {
  transform: scale(1);
}

.image-modal__close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: var(--cream);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.image-modal__close:hover {
  color: var(--pink-deep);
}

/* ===================== 404 PAGE ===================== */
.error-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.error-page__icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.error-page__title {
  font-family: 'Shrikhand', cursive;
  font-size: clamp(4rem, 10vw, 6rem);
  color: var(--text);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page__message {
  color: var(--text-soft);
  font-size: 1.15rem;
  margin-bottom: 2rem;
}
