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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px; 
}

body {
  position: relative;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  color: white;
  background: #000;
  line-height: 1.6;
}

.background-layer {
  position: fixed;
  inset: 0;
  background: #000 url("/assets/essentials/background.jpeg") center center / cover no-repeat;
  z-index: -2;
}

.overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Flying header */

.scroll-header {
  position: fixed;
  top: 25px; 
  left: 50%; 
  transform: translate(-50%, -150%); 
  width: 92%;
  max-width: 1000px;
  height: 70px; 
  z-index: 9999;
  background: rgba(10, 10, 15, 0.85); 
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15); 
  border-radius: 100px; 
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5); 
  display: flex;
  align-items: center;
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.scroll-header.show {
  opacity: 1;
  transform: translate(-50%, 0); 
}

.scroll-header-inner {
  width: 100%;
  padding: 0 35px; 
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo img {
  height: 52px; 
  width: auto;
  display: block;
  filter: invert(1) brightness(2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
  transition: all 0.3s ease;
}

.header-logo:hover img {
  filter: invert(1) brightness(2) drop-shadow(0 0 12px rgba(0, 255, 204, 0.7));
  transform: scale(1.05);
}

.header-nav {
  display: flex;
  gap: 40px;
}

.header-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.header-link:hover {
  color: #00ffcc;
}

.header-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #00ffcc;
  box-shadow: 0 0 10px #00ffcc;
  transition: width 0.3s ease;
}

.header-link:hover::after {
  width: 100%;
}

.nav-num {
  color: #00ffcc;
  opacity: 0.8;
  margin-right: 6px;
  font-weight: 400;
}

.header-link:hover .nav-num {
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
}

/* Hero Section (Top) */
.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.hero-inner {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-sys-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #00ffcc;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ffcc;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

.name {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.2); 
}

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  margin-bottom: 50px;
}

.bracket {
  color: #00ffcc;
  opacity: 0.7;
}

.hero-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

.hero-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #00ffcc; 
  background: rgba(0, 255, 204, 0.05);
  border: 1px solid rgba(0, 255, 204, 0.4);
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.05);
}

.hero-btn:hover {
  transform: translateY(-3px);
  background: rgba(0, 255, 204, 0.15);
  border-color: #00ffcc;
  box-shadow: 0 10px 25px rgba(0, 255, 204, 0.3);
  color: #fff;
}

/* Content Section */

.content-section {
  min-height: auto;
  display: flex;
  justify-content: center;
  padding: 120px 24px;
}

.section-card {
  width: min(1000px, 92vw);
  padding: 60px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(15, 20, 30, 0.5), rgba(5, 5, 10, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Main Cards Padding Setup */
.about-card, .portfolio-card {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  padding: 50px 50px 40px !important; 
  min-height: unset;
  height: auto;
  display: block;
}

.about-card:hover, .portfolio-card:hover {
  border-color: rgba(0, 255, 204, 0.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 204, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-metadata {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.25em;
  color: #00ffcc;
}

.status-indicator {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: #00ffcc;
  padding: 6px 12px;
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 4px;
  background: rgba(0, 255, 204, 0.05);
}

/* About Card block */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-main h2, .portfolio-main h2 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  color: #ffffff;
  margin-bottom: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.about-main h2::before, .portfolio-main h2::before {
  content: ">";
  color: #00ffcc;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 12px;
  opacity: 0.8;
}

.about-main h2 .highlight, .portfolio-main h2 .highlight {
  color: #00ffcc;
}

.about-lead {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  padding-left: 24px;
  background: linear-gradient(90deg, rgba(0, 255, 204, 0.05) 0%, transparent 100%);
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 0 8px 8px 0;
}

.about-specs {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.spec-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #00ffcc;
  letter-spacing: 0.25em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.spec-label::before { content: "»"; opacity: 0.5; }

.spec-item p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* Portfolio Card block */
.portfolio-main h2 { margin-bottom: 30px; }

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  background: linear-gradient(90deg, rgba(0, 255, 204, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(0, 255, 204, 0.3);
  transform: translateX(5px); 
  box-shadow: -4px 0 0 #00ffcc; 
}

.project-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-text h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.in-progress {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #ffaa00; 
  font-style: normal;
  margin-left: 10px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border: 1px solid rgba(255, 170, 0, 0.3);
  border-radius: 4px;
  background: rgba(255, 170, 0, 0.05);
}

.project-text p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tech {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: #00ffcc;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

.project-image {
  width: 240px; 
  height: 140px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) brightness(0.8);
  transition: all 0.4s ease;
}

.project-card:hover .project-image img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

.project-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #00ffcc;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(0, 255, 204, 0.3);
  border-radius: 4px;
  background: rgba(0, 255, 204, 0.05);
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.link-btn:hover {
  background: rgba(0, 255, 204, 0.15);
  border-color: #00ffcc;
  box-shadow: 0 0 12px rgba(0, 255, 204, 0.2);
  color: #ffffff;
  transform: translateY(-2px);
}

/* circuit and footer */
#circuit-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1; 
  pointer-events: none; 
}

.system-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 80px 24px 40px;
  margin-top: 60px;
  border-top: none; 
  background: rgba(10, 10, 15, 0.65); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -30px 50px rgba(10, 10, 15, 0.5); 
}

.footer-inner {
  width: min(1000px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-header { margin-bottom: 30px; }

.footer-links {
  display: flex;
  gap: 30px;
  margin-bottom: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.footer-btn:hover {
  color: #00ffcc;
  background: rgba(0, 255, 204, 0.05);
  border-color: rgba(0, 255, 204, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 255, 204, 0.1);
}

.footer-btn .bracket {
  color: rgba(0, 255, 204, 0.5);
  transition: color 0.3s ease;
}

.footer-btn:hover .bracket { color: #00ffcc; }

.footer-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terminal-prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #00ffcc;
  opacity: 0.8;
}

.blinking-cursor {
  display: inline-block;
  width: 8px;
  background-color: #00ffcc;
  animation: blink 1s step-end infinite;
}

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

.copyright {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* TABLETS & SMALL DESKTOPS */
@media (max-width: 850px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-specs { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-left: 0; padding-top: 40px; }
}

/* PHONES (Landscape & Large Screens) */
@media (max-width: 768px) {
  /* Squeeze Header */
  .scroll-header { height: 65px; width: 95%; top: 15px; }
  .scroll-header-inner { padding: 0 20px; }
  .header-logo img { height: 38px; }
  .header-nav { gap: 15px; }
  .header-link { font-size: 0.75rem; }

  /* Reduce heavy container padding */
  .content-section { padding: 100px 15px; }
  .about-card, .portfolio-card { padding: 35px 25px !important; border-radius: 16px; }
  .section-card { padding: 35px 25px; border-radius: 16px; }

  /* Stack Project Modules */
  .project-card { 
    flex-direction: column-reverse; 
    padding: 20px; 
    gap: 20px; 
  }
  .project-image { 
    width: 100%; 
    height: 180px; 
  }
  .project-tech { font-size: 0.85rem; }
}

/* PHONES (Portrait / Small Screens) */
@media (max-width: 600px) {
  .scroll-header-inner { padding: 0 15px; }
  .header-logo img { height: 32px; }
  .header-nav { gap: 10px; }
  .header-link { font-size: 0.65rem; letter-spacing: 0.1em; }
  .nav-num { display: none; }

  /*Hero Buttons */
  .hero-nav { flex-direction: column; width: 100%; align-items: stretch; gap: 15px; }
  .hero-btn { text-align: center; }

  /*Footer Buttons */
  .footer-links { flex-direction: column; gap: 15px; width: 100%; }
  .footer-btn { width: 100%; text-align: center; }
  
  /* Prevent text squeezing */
  .card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .about-main h2, .portfolio-main h2 { font-size: 1.6rem; }
}