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

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

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

body {
  font-family: var(--body-font);
  color: var(--primary);
  background: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: -0.02em;
}

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

h1 {
  font-family: var(--header-font);
  font-size: clamp(5rem, 15vw, 12rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: bold;
  -webkit-text-stroke: 2px var(--primary);
}

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

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

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

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, main, footer {
  padding: var(--spacing);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav {
    margin-top: 2rem;
  }
}

.nav {
  margin-top: 2rem;
}

.nav a {
  margin: 0 1rem;
  font-weight: 800;
  font-size: 1.3rem;
  position: relative;
  font-family: var(--header-font);
  padding: 12px 24px;
}

.nav a:first-child {
  margin-left: 0;
}

.pixel-corners {
  position: relative;
  border: 3px solid var(--primary);
  background: var(--background);
  color: var(--primary);
  box-shadow: 6px 6px 0px rgba(0,0,0,0.8);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

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

/* PROJECTS SECTION */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
  grid-auto-rows: 1fr;
}

.project-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);
}

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

.project-info {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

/* Add decorative element */
.project-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--primary);
}

.project-title {
  margin-bottom: 1.5rem;
  font-family: var(--header-font);
  font-size: 2rem;
  letter-spacing: 0.05em;
}

.project-desc {
  margin-bottom: 2rem;
  color: #333;
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--secondary);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  align-self: flex-start;
  border: 2px solid var(--primary);
  font-family: var(--header-font);
  font-size: 1.1rem;
}

.btn:hover {
  background: var(--secondary);
  color: var(--primary);
  text-decoration: none;
  transform: scale(1.05);
  box-shadow: 3px 3px 0px rgba(0,0,0,0.8);
}

/* CONTACT SECTION */
.contact {
  margin-top: 6rem;
  margin-bottom: 0.5rem;
  padding: 2rem 0;
  position: relative;
  background: var(--secondary);
  border: 3px solid var(--primary);
  box-shadow: 6px 6px 0px rgba(0,0,0,0.9);
}

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

.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.contact-title {
  font-family: var(--header-font);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.contact-title::after {
  content: none !important;
}

.bracket {
  color: var(--primary);
  font-weight: normal;
}

.contact-content {
  margin-bottom: 2rem;
}

.contact-message {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 3px solid var(--primary);
  background: var(--secondary);
  position: relative;
}

.contact-message::before,
.contact-message::after {
  content: "◼";
  position: absolute;
  font-size: 0.8rem;
  color: var(--primary);
}

.contact-message::before {
  top: -0.4rem;
  left: -0.4rem;
}

.contact-message::after {
  bottom: -0.4rem;
  right: -0.4rem;
}

.contact-line {
  font-family: var(--header-font);
  font-size: 1.4rem;
  margin: 0.3rem 0;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.contact-action {
  margin-top: 1.5rem;
}

.contact-prompt {
  font-family: var(--header-font);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.contact-email {
  display: inline-block;
  font-family: var(--header-font);
  font-size: 1.5rem;
  color: var(--primary);
  padding: 0.8rem 1.5rem;
  border: 4px double var(--primary);
  background: var(--secondary);
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  position: relative;
}

.contact-email:hover {
  background: var(--primary);
  color: var(--secondary);
  text-decoration: none;
  transform: scale(1.05);
  box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
}

.contact-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  gap: 0.8rem;
}

.deco-line {
  height: 2px;
  width: 60px;
  background: var(--primary);
}

.deco-box {
  width: 30px;
  height: 30px;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  position: relative;
}

.deco-symbol {
  font-size: 1.2rem;
  color: var(--primary);
  font-family: var(--header-font);
}

/* FOOTER */
footer {
  margin-top: 3rem;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--accent);
  /*text-align: center;
  font-size: 0.9rem;*/
}

.footer-content {
  font-family: var(--header-font);
  font-size: 1.1rem;
}

/* 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;
}

.bad-sector {
  position: fixed;
  width: 5vmin;
  height: 3vmin;
  background: rgba(0, 0, 0, 0.03);
  pointer-events: none;
  z-index: -1;
}

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

/* MEDIA QUERIES */
@media (max-width: 768px) {
  :root {
    --spacing: 5vw;
  }
  
  .projects {
    grid-template-columns: 1fr;
  }
}