/* =============================
   Hytale-Inspired Portfolio CSS
   ============================= */
:root {
  --primary: #4a7c59;
  --secondary: #2d5f3f;
  --accent: #d4af37;
  --dark: #0f1419;
  --light: #f5f1e8;
  --sky: #87ceeb;
  --earth: #8b7355;
  --radius-xl: 2rem;
  --shadow-glow: 0 0 30px var(--primary);
  --blur-bg: blur(16px);
}
body {
  font-family: 'Segoe UI', 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, var(--dark) 0%, #1a2332 100%);
  color: var(--light);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.6s;
}
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, var(--dark) 100%);
}
#hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  background: rgba(74,124,89,0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
  backdrop-filter: var(--blur-bg);
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(90deg, #ce7918, #ecdb8e, #ffc815);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--primary);
  color: black;
}
.hero-role {
  font-size: 1.3rem;
  color: var(--light);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 6px var(--primary);
}
.cta-btn {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: var(--light);
  border: none;
  border-radius: 1.2rem;
  padding: 0.8rem 2.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}
.cta-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 40px var(--accent);
}
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.7;
  animation: float 2s infinite;
  z-index: 2;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.rounded-panel {
  border-radius: var(--radius-xl);
  background: rgba(74,124,89,0.08);
  box-shadow: var(--shadow-glow);
  margin: 2rem auto;
  padding: 2rem;
  max-width: 1100px;
  backdrop-filter: var(--blur-bg);
}
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  text-align: center;
}
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.about-story, .about-stats {
  flex: 1 1 300px;
  background: rgba(45,95,63,0.08);
  border-radius: 1.2rem;
  padding: 1.2rem;
  box-shadow: 0 0 10px var(--primary);
}
.about-stats ul {
  list-style: none;
  padding: 0;
}
.stat-bar {
  display: inline-block;
  background: var(--secondary);
  border-radius: 1rem;
  width: 80px;
  height: 8px;
  margin: 0 0.5rem;
  vertical-align: middle;
  overflow: hidden;
}
.stat-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 1rem;
}
.projects-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.project-card {
  width: 260px;
  height: 180px;
  perspective: 800px;
  position: relative;
  cursor: pointer;
  border-radius: 1.2rem;
  box-shadow: var(--shadow-glow);
  background: rgba(45,95,63,0.12);
  transition: transform 0.3s;
}
.project-card:hover {
  transform: scale(1.07) rotateY(10deg);
  z-index: 2;
}
.project-front, .project-back {
  position: absolute;
  top: 0;      /* Fixes vertical alignment */
  left: 0;     /* Fixes horizontal alignment */
  width: 100%; 
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;    /* Centers horizontally */
  justify-content: center; /* Centers vertically */
  font-size: 1.1rem;
  padding: 1rem;    
  transition: opacity 0.3s;
  text-align: center;
  gap: 0.5rem;
  box-sizing: border-box; /* Ensures padding doesn't overflow the card */
}
.project-card h3, 
.project-card p {
  margin: 0;
  padding: 0;
  text-align: center;
}
.project-back {
  background: rgba(212,175,55,0.12);
  color: var(--primary);
  transform: rotateY(180deg);
  opacity: 0;
}
.project-card:hover .project-back {
  opacity: 1;
}
.project-card:hover .project-front {
  opacity: 0;
}
.modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(15,20,25,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s;
  pointer-events: auto;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: var(--light);
  color: var(--dark);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 40px var(--accent);
  min-width: 320px;
  max-width: 90vw;
  position: relative;
  animation: modalIn 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes modalIn {
  0% { transform: scale(0.7) rotateY(-30deg); opacity: 0; }
  100% { transform: scale(1) rotateY(0); opacity: 1; }
}
.close-modal {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 1.5rem;
  color: var(--accent);
  cursor: pointer;
}
.modal-details {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers the list block horizontally */
  gap: 1rem; /* Adds space between Title, Desc, and List */
}
.modal-details h3 {
  font-size: 2rem;
  margin: 0;
  color: var(--accent);
}
.modal-details p {
  margin-bottom: 1rem;
  color: var(--dark);
}
.modal-details ul {
  list-style: none; /* Removes bullet points */
  padding: 0;
  margin: 0;
}
.modal-details li {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: var(--primary); /* Optional: matches your theme colors */
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}
.skill-item {
  background: rgba(45,95,63,0.12);
  border-radius: 1.2rem;
  box-shadow: 0 0 10px var(--primary);
  padding: 1.2rem;
  min-width: 180px;
  text-align: center;
  flex: 1 1 180px;
}
.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.skill-bar {
  display: block;
  background: var(--secondary);
  border-radius: 1rem;
  width: 80px;
  height: 8px;
  margin: 0.5rem auto;
  overflow: hidden;
}
.skill-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 1rem;
}
.marquee-container {
  overflow: hidden;
  width: 100%;
  background: rgba(45,95,63,0.08);
  border-radius: 1.2rem;
  box-shadow: 0 0 10px var(--primary);
  margin: 1rem 0;
}
.marquee {
  display: flex;
  gap: 2.5rem;
  animation: marquee 18s linear infinite;
  white-space: nowrap;
  padding: 1rem 0;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.comment {
  background: rgba(212,175,55,0.12);
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 1rem;
  font-size: 1rem;
  box-shadow: 0 0 8px var(--accent);
}
.contact-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}
.contact-section input,
.contact-section textarea {
  border-radius: 1rem;
  border: none;
  padding: 0.8rem;
  font-size: 1rem;
  background: rgba(45,95,63,0.08);
  color: var(--dark);
  box-shadow: 0 0 6px var(--primary);
}
.contact-section textarea {
  min-height: 80px;
  resize: vertical;
}
#form-feedback {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--accent);
  min-height: 1.2em;
}
.feature-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.2rem;
  z-index: 99;
  background: rgba(45,95,63,0.12);
  border-radius: 1.2rem;
  box-shadow: 0 0 10px var(--primary);
  padding: 0.6rem 1.2rem;
}
.feature-bar button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--accent);
  transition: transform 0.2s;
}
.feature-bar button:hover {
  transform: scale(1.2);
  color: var(--primary);
}
.world-map {
  position: fixed;
  top: 10vh; left: 50%;
  transform: translateX(-50%);
  background: var(--light);
  color: var(--dark);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 40px var(--accent);
  min-width: 320px;
  max-width: 90vw;
  z-index: 101;
  animation: modalIn 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}
.world-map.hidden { display: none; }
.world-map ul {
  list-style: none;
  padding: 0;
}
.world-map li {
  margin: 0.7rem 0;
}
.world-map a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}
.close-map {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 1.5rem;
  color: var(--accent);
  cursor: pointer;
}
.npc-dialogue {
  position: fixed;
  bottom: 8rem; left: 50%;
  transform: translateX(-50%);
  background: var(--light);
  color: var(--dark);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 40px var(--primary);
  min-width: 220px;
  max-width: 80vw;
  z-index: 102;
  animation: modalIn 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}
.npc-dialogue.hidden { display: none; }
.npc-message {
  font-size: 1.1rem;
  text-align: center;
}
.close-npc {
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}
/* Day/Night Theme */
body.night {
  background: linear-gradient(135deg, #1a3a3a 0%, #0f2626 100%);
  color: #e0f0f0;
}
body.night .hero-section {
  background: linear-gradient(180deg, #1a3a3a 0%, #0f2626 100%);
}
body.night .hero-title {
  background: linear-gradient(90deg, #5dd9ff, #ffd700, #5dd9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.night .hero-role {
  color: #d4f1f9;
}
body.night .rounded-panel {
  background: rgba(93,217,255,0.12);
  box-shadow: 0 0 30px #5dd9ff;
}
body.night .section-title {
  background: linear-gradient(90deg, #5dd9ff, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.night .feature-bar {
  background: rgba(93,217,255,0.12);
  box-shadow: 0 0 10px #5dd9ff;
}
body.night .feature-bar button {
  color: #5dd9ff;
}
body.night a {
  color: #5dd9ff;
}
body.night header {
  background: rgba(93,217,255,0.12);
  box-shadow: 0 0 30px #5dd9ff;
}
body.night header .logo {
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700;
}
body.night header nav a {
  color: #d4f1f9;
}
body.night header nav a:hover {
  color: #ffd700;
  text-shadow: 0 0 8px #ffd700;
}
@media (max-width: 900px) {
  .about-content, .projects-grid, .skills-grid {
    flex-direction: column;
    gap: 1rem;
  }
  .feature-bar {
    bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
  }
}
@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.3rem; }
  .rounded-panel { padding: 1rem; }
  .feature-bar { font-size: 1.1rem; }
  header nav ul { gap: 0.8rem; }
  header .logo { font-size: 1.2rem; }
}

/* Header Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 98;
  background: rgba(45,95,63,0.12);
  box-shadow: var(--shadow-glow);
  backdrop-filter: var(--blur-bg);
  padding: 1.2rem 2rem;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}
header nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
header .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}
header nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
header nav a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, text-shadow 0.3s;
}
header nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}
