@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800;900&display=swap');

:root {
  --bg-dark: #0a0505;
  --bg-gradient: radial-gradient(circle at top right, #240a0a 0%, var(--bg-dark) 50%);
  --accent-red: #e61a1a;
  --accent-red-bright: #ff3333;
  --text-main: #ffffff;
  --text-muted: #b0b0b0;
  
  --panel-bg: #110d0d;
  --panel-border: 1px solid #331515;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Utilities */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

.text-accent {
  color: var(--accent-red);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: white;
}

/* Navigation - Floating Pill */
.nav-wrapper {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(15, 8, 8, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 3rem;
  border-radius: 50px;
  width: 90%;
  max-width: 1000px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 30, 30, 0.1);
}

.bat-logo-svg {
  width: 50px;
  height: 25px;
  fill: var(--accent-red);
}

.main-logo-img {
  height: 60px;
  transform: scale(1.4);
  transform-origin: left center;
  /* CSS magic: Invert the black bat to white, and contrast the grey background out. Then screen blend removes the background entirely! */
  filter: invert(1) contrast(200%);
  mix-blend-mode: screen;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #c48a8a; /* Faded pink-red from reference */
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-links a:hover {
  color: white;
  transform: translate(-2px, -2px);
  text-shadow: 3px 3px 0 var(--accent-red);
}

.nav-links a:active {
  transform: translate(0, 0);
  text-shadow: 0 0 0 var(--accent-red);
}

/* Hero Section - Split Layout */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem; /* Account for navbar */
  background: linear-gradient(to right, rgba(10, 5, 5, 0.9) 0%, rgba(10, 5, 5, 0.7) 100%), url('../assets/images/batcave-bg.jpg') center/cover no-repeat;
  background-attachment: fixed;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-left h1 {
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--accent-red);
  /* Slight glow as in reference */
  text-shadow: 0 0 20px rgba(230, 26, 26, 0.3);
}

.hero-left p {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-main);
  max-width: 500px;
  line-height: 1.8;
}

.hero-right {
  display: flex;
  justify-content: flex-end;
}

/* Hero Card (Batman styling) */
.hero-card {
  background: var(--panel-bg);
  border: var(--panel-border);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  gap: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  max-width: 650px;
}

.hero-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-card-content h2 {
  font-size: 2.5rem;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.hero-card-content h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.bio-list {
  list-style: none;
  margin-bottom: auto;
}

.bio-list li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
}

.bio-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-red);
}

.card-socials {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.card-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #4a2020;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.card-socials a:hover {
  background: var(--accent-red);
  color: white;
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0px #4a2020;
}

.card-socials a:active {
  transform: translate(0, 0);
  box-shadow: 0px 0px 0px #4a2020;
}

.hero-card-image {
  width: 250px;
  border-radius: 10px;
  overflow: hidden;
}

.hero-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Projects Section Styled like 'The Shop' */
#work {
  border-top: 1px solid rgba(255,255,255,0.05);
}

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

.card {
  background: var(--panel-bg);
  border: var(--panel-border);
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translate(-6px, -6px);
  border-color: var(--accent-red);
  box-shadow: 8px 8px 0px var(--accent-red);
}

.card:active {
  transform: translate(0, 0);
  box-shadow: 0px 0px 0px var(--accent-red);
}

.card-icon {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 60px;
  height: 35px;
  fill: var(--accent-red);
}

.card-header {
  font-weight: 800;
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.5rem;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-body p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  margin-top: auto;
}

.tag {
  color: var(--accent-red);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #222;
  padding-top: 1rem;
}

/* Button mimicking "Add to cart" style */
.btn-small {
  background: transparent;
  color: white;
  border: 1px solid #4a4a4a;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-small:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0px var(--accent-red);
}

.btn-small:active {
  transform: translate(0, 0);
  box-shadow: 0px 0px 0px var(--accent-red);
}

.card-link-icon {
  color: var(--accent-red);
}

/* Footer / Contact */
.footer {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-dark);
}

.footer-social-link {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.footer-social-link:hover {
  color: var(--accent-red);
  transform: translateY(-3px);
}

.footer-social-link i {
  font-size: 1.5rem;
}

/* =========================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ========================================= */

@media (max-width: 900px) {
  .hero-grid { 
    grid-template-columns: 1fr; 
    gap: 3rem; 
    text-align: center;
  }
  
  .hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-left h1 { 
    font-size: 4rem; 
  }
  
  .hero-right {
    justify-content: center;
  }

  .terminal-container {
    margin: 0 auto;
  }
  
  nav {
    flex-direction: column;
    padding: 1rem;
    border-radius: 20px;
    gap: 1rem;
  }
  
  .nav-left {
    margin-bottom: 0.5rem;
  }
  
  .nav-links { 
    gap: 1.5rem; 
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-right {
    margin-top: 0.5rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 14rem; /* Give space for expanded vertically stacked navbar */
  }

  .hero-left h1 { 
    font-size: 2.5rem; 
    line-height: 1.1;
  }
  
  .hero-left p {
    font-size: 0.95rem;
  }

  h2 {
    font-size: 2rem !important;
  }
  
  .hero-card { 
    flex-direction: column; 
    padding: 1.5rem;
    text-align: left;
  }
  
  .hero-card-image {
    width: 100%;
    margin-top: 1.5rem;
  }
  
  .nav-links a {
    font-size: 0.85rem;
  }

  .terminal-container {
    font-size: 0.75rem;
    padding: 0.8rem;
    height: 280px;
  }

  .true-ascii {
    font-size: 0.4rem;
  }

  .section-title {
    font-size: 1.5rem;
    text-align: center;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .card-footer {
    flex-direction: column;
    gap: 1rem;
  }
  
  .card-footer .btn-small {
    width: 100%;
    text-align: center;
  }

  .footer h2 {
    font-size: 1.5rem !important;
  }

  .footer a {
    font-size: 1rem !important;
  }
}

/* =========================================
   BATCOMPUTER TERMINAL SIMULATOR
   ========================================= */

.terminal-container {
  background: #050505;
  border: 1px solid var(--accent-red);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Courier New', Courier, monospace;
  color: var(--accent-red);
  box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.1), 0 10px 20px rgba(0,0,0,0.8);
  height: 300px;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* CRT Scanline Effect Overlay */
.terminal-container::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

.terminal-header {
  border-bottom: 1px dashed var(--accent-red);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
  text-shadow: 0 0 5px var(--accent-red);
  font-size: 0.9rem;
  opacity: 0.8;
}

#terminal-output {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.system-response {
  color: #ff4d4d;
  text-shadow: 0 0 3px #ff4d4d;
}

.user-cmd {
  color: white;
  text-shadow: 0 0 3px white;
}

.error-cmd {
  color: #880000;
  font-weight: bold;
}

.true-ascii {
  font-size: 0.6rem;
  line-height: 1.1;
  white-space: pre;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.terminal-input-line span {
  font-weight: bold;
}

#terminal-input {
  background: transparent;
  border: none;
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
  text-shadow: 0 0 3px white;
}
