/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&family=Press+Start+2P&family=VT323&display=swap');

/* Variables */
:root {
  --primary: #000000;
  --secondary: #ffffff;
  --accent: #c4c4c4;
  --background: #f2f2f2;
  --spacing: 5vw;
  --header-font: 'VT323', monospace;
  --body-font: 'Montserrat', sans-serif;
}

/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  color: var(--primary);
  background: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: -0.02em;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* BACKGROUND EFFECTS */
.glitch-blocks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.03;
  background-image: 
    linear-gradient(to right, black 1px, transparent 1px),
    linear-gradient(to bottom, black 1px, transparent 1px);
  background-size: 20px 20px;
}

.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
  animation: scanline 8s linear infinite;
}

.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glitch-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 1px;
  background: #000;
  pointer-events: none;
  z-index: -1;
  opacity: 0.05;
  top: 33%;
}

.glitch-horizontal {
  position: fixed;
  top: 0;
  height: 100%;
  width: 1px;
  background: #000;
  pointer-events: none;
  z-index: -1;
  opacity: 0.05;
  left: 66%;
}

.animated-scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #000;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
  animation: scanline 6s linear infinite;
}

/* ANIMATIONS */
@keyframes scanline {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* TYPOGRAPHY */
h1, h2, h3 {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

h1 {
  font-family: var(--header-font);
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: bold;
  -webkit-text-stroke: 1px var(--primary);
  display: inline-block;
  position: relative;
}

h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
}

h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 2rem;
  position: relative;
  font-family: var(--header-font);
  display: inline-block;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--primary);
}

h3 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-family: var(--header-font);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* LAYOUT */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
 /* border-bottom: 2px solid var(--primary); */
}

header p {
  font-family: var(--header-font);
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

/* NAVIGATION */
.navigation {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  margin-bottom: 30px;
  gap: 1rem;
}

.navigation a {
  font-weight: 800;
  font-size: 1rem;
  position: relative;
  font-family: var(--header-font);
  padding: 8px 12px;
  border: 2px solid var(--primary);
  background: var(--background);
  color: var(--primary);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

.navigation a:hover {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(0);
  box-shadow: 0px 0px 0px rgba(0,0,0,0.8);
  text-decoration: none;
}

/* BACK LINK */
.back-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  font-family: var(--header-font);
  padding: 8px 12px;
  border: 2px solid var(--primary);
  background: var(--background);
  color: var(--primary);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
  width: fit-content;
}

.back-link:hover {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(0);
  box-shadow: 0px 0px 0px rgba(0,0,0,0.8);
  text-decoration: none;
}

.back-link svg {
  vertical-align: middle;
}

.mt-4 {
  margin-top: 16px;
}

/* SERVICES CONTAINER */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
  margin: 3rem 0;
}

.service-card {
  background: var(--secondary);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 3px solid var(--primary);
  box-shadow: 6px 6px 0px rgba(0,0,0,0.9);
  padding: 2.5rem;
}

.service-card:hover {
  transform: translateY(-5px) translateX(-2px);
  box-shadow: 8px 8px 0px rgba(0,0,0,0.9);
}

.service-card h3 {
  margin-bottom: 1.5rem;
  font-family: var(--header-font);
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
  display: inline-block;
  width: auto;
 max-width: fit-content;
}

.service-card h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
}

.service-card ul {
  margin-left: 1.5rem;    /* Add more space on the left */
  margin-bottom: 1.5rem;  /* Add space below the list */
  padding-left: 1rem;     /* Additional padding for the bullets */
}

.service-card li {
  margin-bottom: 0.8rem;  
  padding-left: 0.5rem;
  line-height: 1.5;
  font-weight: normal;
}

.service-card li strong {
  font-weight: 800;
  color: var(--primary);
}

strong {
  font-weight: 800;
  color: var(--primary);
}

.service-card p {
  margin-bottom: 1.2rem;  /* More space below paragraphs */
}

.service-card p:last-child {
  margin-bottom: 0;       /* No margin on the last paragraph */
}

/* Better spacing between elements */
.service-card h3 + p {
  margin-top: 0.5rem;     /* Space after heading */
}

.service-card p + ul {
  margin-top: 1rem;       /* Space between paragraph and list */
}

.service-card ul + p {
  margin-top: 1.2rem;     /* Space between list and following paragraph */
}

/* ARCHITECTURE DIAGRAM */
.architecture-diagram {
  text-align: center;
  background: var(--secondary);
  padding: 30px;
  margin: 30px 0;
  border: 3px solid var(--primary);
  box-shadow: 6px 6px 0px rgba(0,0,0,0.9);
  transition: all 0.3s ease;
}

.architecture-diagram:hover {
  transform: translateY(-5px) translateX(-2px);
  box-shadow: 8px 8px 0px rgba(0,0,0,0.9);
}

.architecture-diagram pre {
  font-family: var(--header-font);
  color: var(--primary);
  display: table;
  margin: 0 auto;
  line-height: 1.4;
  font-size: 1.2rem;
  width: auto;
  text-align: left;
}

.architecture-diagram h3 {
  display: inline-block;
  margin-bottom:1.5rem;
}

/*.architecture-diagram h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
}
*/

/* AWS DATA STYLES */
.aws-data {
  background: var(--secondary);
  border: 3px solid var(--primary);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.9);
  transition: all 0.3s ease;
}

.aws-data:hover {
  transform: translateY(-5px) translateX(-2px);
  box-shadow: 8px 8px 0px rgba(0,0,0,0.9);
}

.aws-data h3 {
  position: relative;
  margin-bottom: 2rem;
  display: inline-block;
}

.aws-data h3::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
}

.data-item {
  display: flex;
  margin: 15px 0;
  padding: 12px;
  background: var(--background);
  border: 1px solid var(--primary);
}

.data-label {
  font-weight: bold;
  min-width: 200px;
  font-family: var(--header-font);
}

.timestamp {
  text-align: center;
  font-style: italic;
  margin: 25px 0;
  font-family: var(--header-font);
}

/* FOOTER */
footer {
  margin-top: 50px;
  border-top: 3px solid var(--primary);
  padding-top: 20px;
  text-align: center;
  font-family: var(--header-font);
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
  :root {
    --spacing: 5vw;
  }
  
  .services-container {
    grid-template-columns: 1fr;
  }
  
  .navigation {
    flex-direction: column;
    align-items: center;
  }
  
  .navigation a {
    margin: 5px 0;
    width: 100%;
    text-align: center;
  }
}
