/* ----------------------------------
   CSS Reset & Base
----------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* ----------------------------------
   Interactive Background
----------------------------------- */
#interactive-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  overflow: hidden;
}

/* Static subtle dots */
#interactive-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Glowing dots following mouse */
#interactive-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--accent) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.8;
  mask-image: radial-gradient(circle 350px at var(--mouse-x, -500px) var(--mouse-y, -500px), black, transparent);
  -webkit-mask-image: radial-gradient(circle 350px at var(--mouse-x, -500px) var(--mouse-y, -500px), black, transparent);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ----------------------------------
   Tech & Cyber Elements
----------------------------------- */
.tech-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  opacity: 0.8;
  text-transform: uppercase;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ----------------------------------
   Buttons
----------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-weight: 500;
  border-radius: 4px; /* Slight radius, keeping it sharp and professional */
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  font-family: var(--font-body);
}

.btn-icon {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background-color: var(--accent);
  color: #111; /* Contrast against golden */
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.btn-outline {
  background-color: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.btn-outline:hover {
  border-color: var(--fg);
}

/* ----------------------------------
   Header (Glassmorphism)
----------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  background-color: var(--bg);
}

.logo {
  font-size: 2rem;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--fg);
}

/* Mobile Nav - Hidden by default on Desktop */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .header .btn {
    display: none;
  }
}

/* ----------------------------------
   Hero Section
----------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* ----------------------------------
   Technologies (Marquee)
----------------------------------- */
.tech {
  background-color: var(--surface);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.tech-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
}

.tech-marquee {
  display: flex;
  white-space: nowrap;
  animation: scroll-marquee 25s linear infinite;
}

.tech-marquee:hover {
  animation-play-state: paused;
}

.tech-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  font-size: 1.1rem;
  font-weight: 400;
  font-family: var(--font-mono);
  color: var(--muted);
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-item:hover {
  color: var(--fg);
}

.tech-item i {
  font-size: 1.5rem;
  color: var(--fg); /* Monochromatic base as per rules */
}

@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----------------------------------
   Projects
----------------------------------- */
.projects {
  padding: 8rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 4rem;
  text-align: center;
}

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

.project-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0; /* Hard corners for tech feel */
  overflow: hidden;
  background-color: var(--surface);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

/* HUD Corners */
.project-card::before, .project-card::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent);
  opacity: 0;
  transition: var(--transition-fast);
  z-index: 10;
  pointer-events: none;
}
.project-card::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.project-card::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.2);
}

.project-card:hover::before, .project-card:hover::after {
  opacity: 1;
}

.project-img-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #111;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
  opacity: 0.8;
}

.project-card:hover .project-img {
  transform: scale(1.05);
  opacity: 1;
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-link:hover {
  gap: 0.75rem; /* simple micro-interaction */
}

/* ----------------------------------
   Contact
----------------------------------- */
.contact {
  background-color: var(--surface);
  padding: 8rem 0;
  border-top: 1px solid var(--border);
}

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

.contact-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.contact-subtitle {
  color: var(--muted);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  max-width: 450px;
}

.tech-link {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.1rem;
  text-decoration: none;
  position: relative;
  display: inline-block;
}

.tech-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.tech-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  position: relative;
  transition: var(--transition-normal);
  text-decoration: none;
}

/* Reusing HUD Corners from Projects */
.contact-card::before, .contact-card::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  opacity: 0;
  transition: var(--transition-fast);
  z-index: 10;
  pointer-events: none;
}
.contact-card::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.contact-card::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

.contact-card:hover {
  transform: translateX(-8px);
  border-color: rgba(212, 175, 55, 0.2);
  background-color: rgba(255, 255, 255, 0.02);
}

.contact-card:hover::before, .contact-card:hover::after {
  opacity: 1;
}

.contact-card-icon i {
  font-size: 2.5rem;
  color: var(--accent);
}

.contact-card-content h3 {
  font-size: 1.25rem;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.contact-card-content p {
  color: var(--muted);
  font-size: 0.95rem;
  font-family: var(--font-mono);
}

.contact-card-arrow {
  margin-left: auto;
  font-size: 1.5rem;
  color: var(--muted);
  transition: var(--transition-fast);
}

.contact-card:hover .contact-card-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ----------------------------------
   Footer
----------------------------------- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copyright {
  color: var(--muted);
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--muted);
  font-size: 1.5rem;
}

.social-links a:hover {
  color: var(--fg);
}

@media (max-width: 480px) {
  .footer-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
