/* ============================================
   Frances Belleza - Personal Website
   A cozy Frieren-themed portfolio & blog
   ============================================ */

:root {
  --color-bg: #DFE1BC;
  --color-text: #141313;
  --color-accent: #795862;
  --color-highlight: #3D646A;
  --color-alt: #6A83A9;
  --color-nav: #A49FB8;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Monaco, 'Courier New', monospace;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  cursor: url('../images/staff-cursor.svg') 4 4, auto;
}

/* Keep cursor visible on all states */
*, *:active, *:focus {
  cursor: url('../images/staff-cursor.svg') 4 4, auto;
}

/* Pointer cursor for clickable elements */
a, button, .choice-btn, .blog-post-preview, .project-card,
a:active, button:active, .choice-btn:active, .blog-post-preview:active, .project-card:active {
  cursor: url('../images/staff-cursor.svg') 4 4, pointer;
}

/* Twinkle animation for clicks */
.twinkle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 16px;
  animation: twinkle-burst 0.8s ease-out forwards;
  text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

@keyframes twinkle-burst {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    transform: scale(1.2) rotate(15deg);
    opacity: 1;
  }
  40% {
    transform: scale(0.8) rotate(-10deg);
    opacity: 1;
  }
  60% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.8;
  }
  100% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
}

/* ============================================
   Navbar
   ============================================ */
nav {
  background: var(--color-nav);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: bold;
  font-size: 1.25rem;
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-links a {
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: var(--color-alt);
  color: var(--color-bg);
}

.nav-links a.active {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ============================================
   Main Content
   ============================================ */
main {
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 5rem;
}

/* ============================================
   Page Headers
   ============================================ */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--color-alt);
  font-size: 1.1rem;
}

/* ============================================
   Hero Section (Home)
   ============================================ */
.hero {
  text-align: center;
  padding: 2rem 0 1rem 0;
}

.hero h1 {
  font-size: 3rem;
  color: var(--color-accent);
  min-height: 3.5rem;
}

.hero h1::after {
  content: '_';
  animation: blink 0.7s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-alt);
  margin-top: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
  margin-top: 2.5rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.about-section h2 {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.about-content p {
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-tagline {
  color: var(--color-accent);
  font-style: italic;
  margin-top: 1.5rem;
}

/* ============================================
   Choice Modal
   ============================================ */
#choiceModal {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--color-bg);
  padding: 2rem 3rem;
  border: 2px solid var(--color-accent);
  border-radius: 0.5rem;
  text-align: center;
}

.modal-content h2 {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.choice-btn {
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: background 0.2s, transform 0.1s;
}

.choice-btn:hover {
  background: var(--color-highlight);
  transform: translateY(-2px);
}

/* ============================================
   Featured Section
   ============================================ */
.featured {
  margin-top: 3rem;
  text-align: center;
}

.featured h2 {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.featured-card {
  background: var(--color-nav);
  border: 2px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.featured-card h3 {
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.featured-card p {
  color: var(--color-text);
  margin-bottom: 1rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 0.25rem;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--color-highlight);
}

.btn-github {
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-github:hover {
  background: var(--color-highlight);
}

.btn-linkedin {
  background: var(--color-alt);
  color: var(--color-bg);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-linkedin:hover {
  opacity: 0.85;
}

/* ============================================
   Projects Grid (Portfolio)
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--color-nav);
  border: 2px solid var(--color-highlight);
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: transform 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card h3 {
  color: var(--color-highlight);
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--color-text);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.project-card.coming-soon {
  border-style: dashed;
  opacity: 0.8;
}

.project-card.coming-soon h3 {
  color: var(--color-alt);
}

/* ============================================
   Blog Posts
   ============================================ */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-post {
  background: var(--color-nav);
  border: 2px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.blog-post h2 {
  color: var(--color-accent);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.blog-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

.blog-post time {
  color: var(--color-alt);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 1rem;
}

.blog-post p {
  color: var(--color-text);
  line-height: 1.7;
}

/* Blog Post Previews (clickable cards) */
.blog-post-preview {
  background: var(--color-nav);
  border: 2px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-post-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog-post-preview h2 {
  color: var(--color-accent);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.blog-post-preview time {
  color: var(--color-alt);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.75rem;
}

.blog-post-preview p {
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.read-more {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: bold;
}

/* Full Blog Post Page */
.blog-post-full {
  max-width: 700px;
  margin: 0 auto;
  background: var(--color-nav);
  border: 2px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 2rem;
}

.blog-post-full time {
  color: var(--color-alt);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.blog-post-full h1 {
  color: var(--color-accent);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.blog-image-full {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.post-body {
  color: var(--color-text);
  line-height: 1.8;
  font-size: 1.05rem;
}

.back-link {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-accent);
}

.back-link a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: bold;
}

.back-link a:hover {
  text-decoration: underline;
}

/* ============================================
   Research Page
   ============================================ */
.research-page {
  max-width: 800px;
  margin: 0 auto;
}

.research-header {
  margin-bottom: 2rem;
}

.research-header h1 {
  color: var(--color-highlight);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.research-subtitle {
  color: var(--color-alt);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.6;
}

.research-image {
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  border: 2px solid var(--color-highlight);
}

.research-content {
  background: var(--color-nav);
  border: 2px solid var(--color-highlight);
  border-radius: 0.5rem;
  padding: 2rem;
}

.research-content h2 {
  color: var(--color-highlight);
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.research-content h2:first-child {
  margin-top: 0;
}

.research-content p {
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-highlight);
}

/* ============================================
   Contact Form
   ============================================ */
.contact-container {
  max-width: 500px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label {
  color: var(--color-accent);
  font-weight: bold;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid var(--color-accent);
  border-radius: 0.25rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-highlight);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.social-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-accent);
}

.social-section h2 {
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

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

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem;
  border: 2px dashed var(--color-accent);
  border-radius: 0.5rem;
  color: var(--color-alt);
  grid-column: 1 / -1;
}

.empty-state .hint {
  font-size: 0.85rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--color-alt);
}

/* ============================================
   Terminal
   ============================================ */
#terminalToggle {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.25rem;
  font-family: inherit;
  cursor: pointer;
  z-index: 999;
  transition: background 0.2s;
}

#terminalToggle:hover {
  background: var(--color-highlight);
}

#terminalOverlay {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: #0a0a0a;
  color: var(--color-highlight);
  font-family: Monaco, 'Courier New', monospace;
  padding: 1rem;
  overflow-y: auto;
  z-index: 1001;
  border-top: 2px solid var(--color-accent);
}

#terminalContent {
  margin-bottom: 0.5rem;
}

#terminalContent div {
  margin-bottom: 0.25rem;
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

.terminal-prompt {
  color: var(--color-accent);
  margin-right: 0.5rem;
}

#terminalInput {
  background: transparent;
  border: none;
  color: var(--color-highlight);
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  outline: none;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  main {
    padding: 1rem;
    padding-bottom: 5rem;
  }

  .modal-buttons {
    flex-direction: column;
  }
}
