/* ========================================
   CSS Variables - Easy Color Tweaking
======================================== */
:root {
  /* === BACKGROUND COLORS === */
  --bg-primary: #0b0f14; /* Main page background */
  --bg-secondary: #131920; /* Cards, sections background */
  --bg-tertiary: #1a222c; /* Input fields, terminal header */

  /* === TEXT COLORS === */
  --text-primary: #e4e8ed; /* Main text, headings */
  --text-secondary: #8b949e; /* Secondary text, descriptions */

  /* === ACCENT COLORS (Light Blue theme) === */
  --accent: #00b4ff; /* Primary accent - links, highlights */
  --accent-dim: rgba(0, 180, 255, 0.1); /* Subtle accent background */
  --accent-glow: rgba(0, 180, 255, 0.4); /* Button hover glow */
  --scan-blue: #2a7bff; /* Scan overlay blue */
  --posh-blue: #2a7bff; /* Posh terminal accent */

  /* === BORDER & UI === */
  --border-color: #2a3441; /* Borders, dividers */

  /* === TERMINAL COLORS === */
  --terminal-bg: rgba(19, 25, 32, 0.6); /* Terminal background (60% opacity) */
  --terminal-dot-red: #ff5f56; /* Terminal close button */
  --terminal-dot-yellow: #ffbd2e; /* Terminal minimize button */
  --terminal-dot-green: #27ca40; /* Terminal maximize button */

  /* === NAVBAR === */
  --navbar-bg: rgba(11, 15, 20, 0.95); /* Navigation bar background */

  /* === SHADOWS === */
  --shadow-dark: rgba(0, 0, 0, 0.45); /* Dark shadow for depth */
  --shadow-light: rgba(0, 0, 0, 0.3); /* Lighter shadow for cards */

  /* === CHARACTER GLOW === */
  --character-glow-inner: rgba(0, 180, 255, 0.22); /* Character inner glow */
  --character-glow-outer: rgba(0, 180, 255, 0.1); /* Character outer glow */

  /* === PARALLAX/GRID EFFECTS === */
  --grid-line-color: rgba(0, 180, 255, 0.03); /* Background grid lines */
  --glow-blob-color: rgba(0, 180, 255, 0.08); /* Background glow effect */
  --dots-color: rgba(0, 180, 255, 0.14); /* Background dots pattern */

  /* === BANNER OVERLAY (gradient stops) === */
  --banner-overlay-top: rgba(11, 15, 20, 0.55); /* Top of banner (lighter) */
  --banner-overlay-mid: rgba(11, 15, 20, 0.72); /* Middle of banner */
  --banner-overlay-bottom: rgba(
    11,
    15,
    20,
    0.9
  ); /* Bottom of banner (darker) */

  /* === FONTS === */
  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "Consolas", "Monaco", monospace;

  /* === LAYOUT === */
  --nav-height: 60px;
  --navHeight: 60px;
  --headerHeight: 0px;
  --heroOffset: 0px;
  --section-padding: 100px;
  --container-width: 1200px;
  --cardRadius: 10px;
  --cardBorder: 1px solid var(--border-color);
  --cardBg: var(--bg-secondary);
  --cardShadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --cardGlow: 0 0 24px var(--accent-dim);
}

/* ========================================
   Reset & Base
======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

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

/* ========================================
   Typography
======================================== */
h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
}

/* ========================================
   Layout
======================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding) 1.5rem;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Make HERO full width while keeping other sections constrained */
section.hero {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

main {
  position: relative;
  z-index: 1;
}

/* ========================================
   Global Background
======================================== */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ========================================
   Scan Overlay (disabled)
======================================== */
#scanOverlay {
  display: none;
}

/* ========================================
   Scroll Reveal Animations
======================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for project cards */
.project-card.reveal:nth-child(1) {
  transition-delay: 0ms;
}
.project-card.reveal:nth-child(2) {
  transition-delay: 100ms;
}
.project-card.reveal:nth-child(3) {
  transition-delay: 200ms;
}
.project-card.reveal:nth-child(4) {
  transition-delay: 300ms;
}
.project-card.reveal:nth-child(5) {
  transition-delay: 400ms;
}
.project-card.reveal:nth-child(6) {
  transition-delay: 500ms;
}

/* Stagger for skill categories */
.skill-category.reveal:nth-child(1) {
  transition-delay: 0ms;
}
.skill-category.reveal:nth-child(2) {
  transition-delay: 100ms;
}
.skill-category.reveal:nth-child(3) {
  transition-delay: 200ms;
}

/* Stagger for log entries */
.log-entry.reveal:nth-child(1) {
  transition-delay: 0ms;
}
.log-entry.reveal:nth-child(2) {
  transition-delay: 100ms;
}
.log-entry.reveal:nth-child(3) {
  transition-delay: 200ms;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  .parallax-layer {
    transform: none !important;
  }
}

/* ========================================
   Navigation
======================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--navbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0 clamp(16px, 4vw, 32px);
  height: var(--nav-height);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background-color: transparent;
  border: 2px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  background-color: var(--accent-dim);
  box-shadow:
    0 0 20px var(--accent-glow),
    inset 0 0 20px var(--accent-dim);
  text-decoration: none;
}

/* ========================================
   Hero Section (FIXED)
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding-top: calc(var(--headerHeight) - var(--heroOffset));
  padding-bottom: clamp(24px, 6vh, 80px);
  position: relative;
  overflow: hidden;
}

/* Parallax Background Container (behind banner) */
.parallax-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Banner Background (in front of parallax) */
.hero-banner {
  position: absolute;
  inset: 0;
  background-image: url("../assets/banner.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Dark overlay on banner */
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--banner-overlay-top) 0%,
    var(--banner-overlay-mid) 40%,
    var(--banner-overlay-bottom) 100%
  );
}

.parallax-layer {
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  will-change: transform;
}

/* Layer 1: Hex grid pattern */
.layer-grid {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='104'%20viewBox='0%200%20120%20104'%3E%3Cpolygon%20points='30,0%2090,0%20120,52%2090,104%2030,104%200,52'%20fill='none'%20stroke='rgba(0,180,255,0.18)'%20stroke-width='1'/%3E%3C/svg%3E");
  background-size: 120px 104px;
  background-position: 0 0;
  opacity: 0.85;
}

/* Layer 2: Glow blob */
.layer-glow {
  background: radial-gradient(
    ellipse 80% 50% at 70% 40%,
    var(--glow-blob-color) 0%,
    transparent 55%
  );
}

/* Layer 3: Dots pattern (disabled) */
.layer-dots {
  display: none;
}

/* Main hero layout - text content only */
.hero-content {
  display: block;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: clamp(8px, 2vh, 24px);
}

/* LEFT column = text + buttons only */
.hero-left {
  display: block;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-text h1 {
  margin-bottom: 0.25rem;
}

/* Hero title shine sweep: adjust duration for sweep interval */
.hero-title {
  margin: 0 0 0.25rem;
  color: var(--text-primary);
}

.hero-titleText {
  display: inline-block;
  color: var(--text-primary);
  background: linear-gradient(
    120deg,
    var(--text-primary) 0%,
    var(--text-primary) 42%,
    rgba(0, 180, 255, 0.85) 50%,
    var(--text-primary) 58%,
    var(--text-primary) 100%
  );
  background-size: 240% 100%;
  background-position: 0% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(3.4rem, 9vw, 6.6rem);
  letter-spacing: 0.1em;
  font-weight: 800;
  animation: hero-title-drift 5s ease-in-out infinite;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-titleText {
    color: var(--text-primary);
    background: none;
  }
}

.hero-titleText:hover {
  text-shadow: 0 0 18px rgba(0, 180, 255, 0.4);
  animation-duration: 3s;
}

@keyframes hero-title-drift {
  0%,
  100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  max-width: 520px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.socialButton {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.4rem;
  min-width: 140px;
  border-radius: 8px;
  --ring-radius: 8px;
  --ring-gap: 3px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.socialButton > * {
  position: relative;
  z-index: 1;
}

.socialButton .socialIcon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.socialButton .text_button {
  color: var(--text-primary);
}

.socialButton .dots_border {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 108%;
  height: 108%;
  border-radius: calc(var(--ring-radius) + var(--ring-gap));
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.25s ease;
  z-index: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.socialButton .dots_border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    transparent 0 72%,
    rgba(0, 180, 255, 0.9) 78%,
    rgba(0, 180, 255, 0.25) 88%,
    transparent 100%
  );
  animation: rotateRing 2s linear infinite;
  filter: drop-shadow(0 0 6px rgba(0, 180, 255, 0.6));
}

.socialButton .dots_border::after {
  content: "";
  position: absolute;
  inset: var(--ring-gap);
  border-radius: var(--ring-radius);
  background: var(--bg-secondary);
}

.socialButton::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(0, 180, 255, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.socialButton:hover {
  border-color: rgba(0, 180, 255, 0.5);
  box-shadow:
    0 0 18px var(--accent-glow),
    inset 0 0 18px var(--accent-dim);
  transform: translateY(-2px);
  text-decoration: none;
}

.socialButton:hover::before,
.socialButton:hover .dots_border {
  opacity: 1;
}

.socialButton:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .socialButton {
    width: 100%;
    justify-content: center;
  }
}

@media (max-height: 900px) {
  .hero {
    min-height: 92vh;
    padding-top: calc(var(--navHeight) + clamp(8px, 2vh, 24px));
    padding-bottom: clamp(16px, 4vh, 48px);
  }

  .hero-buttons {
    gap: 0.75rem;
  }
}

@keyframes rotateRing {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .socialButton .dots_border::before {
    animation: none;
  }
}

/* RIGHT column = terminal + character accent */
.hero-right {
  position: relative;
  min-height: 520px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
}

/* Terminal (fixed bottom-right, always visible) */
.hero-terminal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--terminal-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow-dark);
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(6px);
  z-index: 900;
}

.terminal-header {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--border-color);
}

.terminal-dot:nth-child(1) {
  background-color: var(--terminal-dot-red);
}
.terminal-dot:nth-child(2) {
  background-color: var(--terminal-dot-yellow);
}
.terminal-dot:nth-child(3) {
  background-color: var(--terminal-dot-green);
}

.hero-terminal.terminal--posh {
  border-color: rgba(42, 123, 255, 0.55);
  border-radius: 6px;
  background-color: rgba(14, 18, 24, 0.92);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.hero-terminal.terminal--posh .terminal-header {
  background-color: rgba(12, 16, 22, 0.98);
  padding: 8px 12px;
  border-bottom: 1px solid rgba(42, 123, 255, 0.25);
}

.hero-terminal.terminal--posh .terminal-header::before {
  content: "zerrius@arch: ~/code/java";
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--posh-blue);
}

.hero-terminal.terminal--posh .terminal-header {
  justify-content: flex-start;
}

.hero-terminal.terminal--posh .terminal-dot {
  display: none;
}

.hero-terminal.terminal--posh .terminal-body {
  padding: 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.hero-terminal.terminal--posh .terminal-prompt {
  color: var(--posh-blue);
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  min-height: 180px;
}

.terminal-body p {
  color: var(--text-primary);
}

.terminal-prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

.terminal-cursor {
  color: var(--accent);
}

/* Character (fixed bottom-left, always visible) */
.hero-character {
  position: fixed;
  bottom: 0;
  left: 0;
  width: clamp(200px, 22vw, 340px);
  z-index: 900;
  pointer-events: auto;
}

.character-img {
  width: 100%;
  height: auto;
  object-fit: contain;

  /* Slightly cleaner glow and less "sticker" look */
  filter: drop-shadow(0 0 18px var(--character-glow-inner))
    drop-shadow(0 0 42px var(--character-glow-outer));
}

.hero-character:hover .character-img {
  animation: annoyedJostle 0.45s ease-in-out;
}

@keyframes annoyedJostle {
  0% {
    transform: translateY(0);
  }
  15% {
    transform: translateY(-6px);
  }
  30% {
    transform: translateY(4px);
  }
  45% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(3px);
  }
  75% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ========================================
   Responsive - Tablet (Hero only)
======================================== */
@media (max-width: 900px) {
  .hero-character {
    width: clamp(150px, 18vw, 200px);
    left: 0;
  }

  .hero-terminal {
    max-width: 360px;
  }

  .hero-buttons {
    justify-content: center;
  }
}

/* ========================================
   Responsive - Mobile (Hero only)
======================================== */
@media (max-width: 600px) {
  .hero-tagline {
    font-size: 1.25rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .terminal-body {
    min-height: 160px;
    font-size: 0.85rem;
  }

  /* Reduce parallax intensity on mobile */
  .layer-grid {
    background-size: 40px 40px;
  }
  .layer-dots {
    background-size: 30px 30px;
  }
}

/* ========================================
   Projects Section
======================================== */
#projects h2 {
  text-align: center;
}

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

.projectTiltWrap {
  width: 100%;
  perspective: 1000px;
}

.project-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.6s ease;
}

.projectTiltCard {
  transform-style: preserve-3d;
  background-image:
    radial-gradient(
      circle at 30% 20%,
      rgba(0, 180, 255, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, var(--bg-secondary), var(--bg-secondary));
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease,
    background-position 0.5s ease;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.projectTiltContent {
  transform-style: preserve-3d;
}

.projectTiltContent > * {
  transform: translateZ(22px);
  transition: transform 0.5s ease;
}

.projectTiltWrap:hover .projectTiltCard {
  transform: rotate3d(0.4, 0.8, 0, 12deg);
  background-position: 0 0;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.45),
    0 0 24px var(--accent-dim);
}

.projectTiltWrap:hover .projectTiltContent > * {
  transform: translateZ(36px);
}

.project-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.project-card > p {
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background-color: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
}

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

.project-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.project-links a:hover {
  color: var(--accent);
}

/* ========================================
   Card Glow (Projects + Skills)
======================================== */
.glowBorderCard,
.projectTiltCard,
.skill-category {
  border: 1px solid rgba(0, 180, 255, 0.25);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(0, 180, 255, 0.14);
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease,
    background-position 0.5s ease,
    border-color 0.35s ease;
}

.projectTiltWrap:hover .projectTiltCard,
.skill-category:hover,
.glowBorderCard:hover {
  border-color: rgba(0, 180, 255, 0.55);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.45),
    0 0 24px var(--accent-dim),
    0 0 34px rgba(0, 180, 255, 0.28);
}

/* ========================================
   Terminal Cards (Shared)
======================================== */
.terminalCard {
  width: min(900px, 92vw);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--cardRadius);
  border: 1px solid rgba(0, 180, 255, 0.45);
  background: var(--bg-secondary);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(0, 180, 255, 0.18);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.terminalCard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 6px
  );
  opacity: 0.2;
  pointer-events: none;
}

.terminalCard:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(0, 180, 255, 0.22);
  border-color: rgba(0, 180, 255, 0.6);
}

.terminalTopBar,
.terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 180, 255, 0.2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.terminalFile,
.terminal-title {
  color: var(--accent);
  letter-spacing: 0.04em;
}

.terminalStatus,
.terminal-status {
  color: var(--text-secondary);
}

.terminalBody {
  background: rgba(12, 18, 24, 0.82);
  border: 1px solid rgba(0, 180, 255, 0.14);
  border-radius: 8px;
  padding: clamp(14px, 2vw, 20px);
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.terminalFooterHint,
.terminal-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.terminalPrompt {
  color: var(--accent);
}

.terminalHint {
  color: var(--text-secondary);
}

/* ========================================
   Build Log Section
======================================== */
#build-log {
  background-color: transparent;
  max-width: 100%;
  padding: clamp(56px, 8vh, 80px) clamp(16px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

#build-log h2 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.buildlogCard {
  width: min(900px, 92vw);
  margin: 0 auto;
}

.buildlogBody {
  max-height: 420px;
  overflow-y: auto;
  padding: 0;
  background: rgba(12, 18, 24, 0.92);
  scrollbar-color: rgba(0, 180, 255, 0.45) rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
}

.buildlogBody::-webkit-scrollbar {
  width: 8px;
}

.buildlogBody::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.buildlogBody::-webkit-scrollbar-thumb {
  background: rgba(0, 180, 255, 0.45);
  border-radius: 8px;
}

.buildlogBody::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 180, 255, 0.6);
}

.build-log-entries {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(14px, 2vw, 20px);
}

.log-entry {
  padding: 0.95rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 180, 255, 0.14);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

.log-entry + .log-entry {
  border-top: 1px solid rgba(0, 180, 255, 0.08);
}

.log-entry time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.log-entry h3 {
  color: var(--text-primary);
  margin: 0.35rem 0;
}

.log-entry p {
  margin: 0;
}

/* ========================================
   Skills Section
======================================== */
#skills h2 {
  text-align: center;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-category {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.skill-category h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  text-align: center;
}

.skill-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-list li {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0;
  position: relative;
}

.skill-list li::before {
  content: ">";
  position: static;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ========================================
   About Section
======================================== */
.aboutSection {
  padding: clamp(56px, 8vh, 84px) clamp(16px, 4vw, 48px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.aboutGlassCard {
  position: relative;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 26px 48px 34px;
  border-radius: 18px;
  background: rgba(10, 18, 28, 0.38);
  border: 1px solid rgba(0, 180, 255, 0.25);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.48),
    0 0 28px rgba(0, 180, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition:
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.about-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.aboutGlassCard > *:not(.about-trail) {
  position: relative;
  z-index: 1;
}

.aboutGlassCard::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    135deg,
    rgba(0, 180, 255, 0.16),
    rgba(0, 180, 255, 0.04),
    rgba(0, 180, 255, 0.12)
  );
  opacity: 0.2;
  filter: blur(18px);
  transform: translate3d(0, 0, 0);
  animation: aboutGradientDrift 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.aboutGlassCard::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 32px rgba(0, 180, 255, 0.12);
  pointer-events: none;
}

.aboutGlassCard h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.aboutGlassCard .about-text {
  text-align: center;
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.aboutGlassCard .about-text p {
  margin: 10px 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.aboutGlassCard .about-text p:first-of-type {
  margin-top: 6px;
}

.aboutGlassCard:hover {
  border-color: rgba(0, 180, 255, 0.45);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(0, 180, 255, 0.22);
  transition:
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

@keyframes aboutGradientDrift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========================================
   Contact Section
======================================== */
#contact {
  background-color: transparent;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: clamp(60px, 8vh, 90px) clamp(16px, 4vw, 48px);
  padding-top: clamp(60px, 8vh, 90px);
  padding-bottom: clamp(60px, 8vh, 90px);
}

#contact h2 {
  text-align: center;
}

.contact-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

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

.contact-terminal {
  margin: 0 auto 2rem;
  width: min(640px, 92vw);
}

.contact-form {
  text-align: left;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  background-color: rgba(15, 20, 26, 0.9);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 6px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 180, 255, 0.3);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
}

.terminal-btn {
  background-color: rgba(15, 20, 26, 0.9);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: none;
}

.terminal-btn:hover {
  background-color: rgba(0, 180, 255, 0.08);
  box-shadow: 0 0 18px rgba(0, 180, 255, 0.35);
}

.terminal-btn:active {
  transform: translateY(1px);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-links a:hover {
  color: var(--accent);
}

/* ========================================
   Footer
======================================== */
footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

footer p {
  font-size: 0.85rem;
}

/* ========================================
   Responsive - Tablet
======================================== */
@media (max-width: 900px) {
  :root {
    --section-padding: 80px;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ========================================
   Responsive - Mobile
======================================== */
@media (max-width: 600px) {
  :root {
    --section-padding: 60px;
    --nav-height: 56px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .hero-character {
    width: min(140px, 35vw);
    left: 0;
    bottom: 0;
  }

  .hero-terminal {
    max-width: calc(100vw - 40px);
    bottom: 10px;
    right: 10px;
  }

  .terminal-body {
    min-height: 140px;
    font-size: 0.8rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    gap: 1rem;
  }

  /* Reduce parallax intensity on mobile */
  .layer-grid {
    background-size: 40px 40px;
  }

  .layer-dots {
    background-size: 30px 30px;
  }
}
