*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root, a:link {
  color: #ff6347;
  --primary-color: #ff6347;
  --secondary-color: #ff4500;
  --background-color: #121212;
  --text-color: #e0e0e0;
  --card-background: #1e1e1e;
}
/* Self-host Space Mono (add files to ./fonts) */
@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/SpaceMono-Regular.woff2') format('woff2'),
       url('../fonts/SpaceMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('../fonts/SpaceMono-Bold.woff2') format('woff2'),
       url('../fonts/SpaceMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Space Mono', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
  text-align: center;
}
header {
  background: rgba(30, 30, 30, 0.8);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease-in-out;
}
header.hidden { transform: translateY(-100%); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; text-decoration: none; color: var(--primary-color); }
.logo img { height: 40px; margin-right: 10px; }
.logo span { font-size: 36px; font-weight: 700; }
nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 30px; }
nav ul li a { color: var(--text-color); text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
nav ul li a:hover { color: var(--primary-color); }
.hero {
  height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(45deg, rgba(255, 99, 71, 0.8), rgba(255, 69, 0, 0.8)); color: #fff; position: relative; overflow: hidden; perspective: 1000px;
}
.hero-content { transform-style: preserve-3d; animation: float 6s ease-in-out infinite; }
#bg-particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero h1 { font-size: 4em; margin-bottom: 20px; position: relative; z-index: 1; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.5em; max-width: 600px; margin: 0 auto; position: relative; z-index: 1; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.cta-container { z-index: 3; }
.cta-button { display: inline-block; padding: 15px 30px; background-color: #fff; color: var(--primary-color); text-decoration: none; font-weight: 600; border-radius: 5px; transition: background-color 0.3s ease, color 0.3s ease; position: relative; z-index: 1; }
.cta-button { background-color: var(--primary-color); color: #fff; }
/* Ensure CTA text remains white even for unvisited links */
.cta-button:link,
.cta-button:visited { color: #fff; }
.cta-button:hover { background-color: var(--secondary-color); color: #fff; }
@keyframes float { 0%, 100% { transform: translateZ(0px); } 50% { transform: translateZ(50px); } }
.section { padding: 100px 0; position: relative; scroll-margin-top: 80px; }
h2 { font-size: 2.5em; text-align: center; margin-bottom: 50px; color: var(--primary-color); }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-item { background: var(--card-background); padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-item:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.4); }
.service-item h3 { font-size: 1.5em; margin-bottom: 15px; color: var(--primary-color); }
.service-icon { font-size: 3em; margin-bottom: 20px; color: var(--primary-color); display: inline-block; }
.service-icon svg { width: 1em; height: 1em; }
.portfolio { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.portfolio img { width: 100%; height: auto; border-radius: 10px; transition: transform 0.3s ease; filter: grayscale(100%); }
.portfolio img:hover { transform: scale(1.05); filter: grayscale(0%); }
a:focus, button:focus { outline: 2px dashed var(--primary-color); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hero-content { animation: none !important; } }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #ffffff;
  color: #000000;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1001;
}
