/*
  Mohamed Ezz — Developer Portfolio
  style.css — Complete design system
  Terminal-aesthetic · Dark · Premium
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Core palette */
  --bg: #0a0a0b;
  --bg-surface: #0d0e10;
  --bg-elevated: #111316;

  /* Green accent */
  --green: #5cff72;
  --green-dim: rgba(92, 255, 114, 0.55);
  --green-glow: rgba(92, 255, 114, 0.07);
  --green-glow-md: rgba(92, 255, 114, 0.14);
  --green-border: rgba(92, 255, 114, 0.22);

  /* Syntax colors (terminal) */
  --syn-cyan: #7ee8fa;
  --syn-amber: #e8b96f;
  --syn-muted-purple: #b8a4d8;

  /* Text */
  --text: #d4d4d0;
  --text-dim: #9ea8b3;
  --text-muted: #5e6b78;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.11);

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Layout */
  --nav-h: 62px;
  --container-max: 1080px;
  --section-pad: 140px;

  /* Transitions */
  --t-fast: 0.14s ease;
  --t-base: 0.28s ease;
  --t-slow: 0.55s ease;
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

/* Selection */
::selection {
  background: var(--green-border);
  color: var(--green);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-dim);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-mono);
}

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

/* ============================================================
   BACKGROUND SYSTEM
   ============================================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Floating code fragments canvas */
#code-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Terminal grid */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(92, 255, 114, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 255, 114, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 30%, transparent 100%);
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(18, 55, 28, 0.38) 0%, transparent 65%),
    radial-gradient(ellipse 50% 35% at 85% 75%, rgba(10, 28, 14, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 15% 60%, rgba(8, 22, 11, 0.15) 0%, transparent 55%),
    var(--bg);
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.bg-blob-1 {
  width: 720px;
  height: 480px;
  background: radial-gradient(ellipse, rgba(92, 255, 114, 0.024) 0%, transparent 70%);
  top: -180px;
  left: -160px;
  animation: blob-in 3s 0.4s forwards, blob-float-1 38s 3.4s ease-in-out infinite;
}

.bg-blob-2 {
  width: 950px;
  height: 640px;
  background: radial-gradient(ellipse, rgba(14, 55, 24, 0.065) 0%, transparent 70%);
  top: 38%;
  right: -320px;
  animation: blob-in 3s 0.9s forwards, blob-float-2 45s 3.9s ease-in-out infinite;
}

.bg-blob-3 {
  width: 640px;
  height: 420px;
  background: radial-gradient(ellipse, rgba(92, 255, 114, 0.018) 0%, transparent 70%);
  bottom: -80px;
  left: 28%;
  animation: blob-in 3s 1.4s forwards, blob-float-3 41s 4.4s ease-in-out infinite;
}

/* Grain/noise overlay */
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Scanline overlay */
.bg-scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.028) 3px,
    rgba(0, 0, 0, 0.028) 4px
  );
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 36px;
  position: relative;
  z-index: 2;
}

section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 2;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background var(--t-base), border-color var(--t-base);
}

#nav.scrolled {
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 36px;
}

.nav-logo {
  font-size: 12.5px;
  color: var(--green);
  letter-spacing: 0.01em;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

.nav-logo .nl-host {
  color: var(--text-dim);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 11px;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color var(--t-fast);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
}

.nav-resume {
  color: var(--green) !important;
  border: 1px solid var(--green-border);
  margin-left: 8px;
  transition: background var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast) !important;
}

.nav-resume:hover {
  background: var(--green-glow) !important;
  box-shadow: 0 0 16px var(--green-glow-md);
  border-color: rgba(92, 255, 114, 0.45) !important;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-dim);
  transition: color var(--t-fast);
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.nav-toggle:hover {
  color: var(--green);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--t-base), opacity var(--t-base);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ============================================================
   SECTION HEADER — terminal command style
   ============================================================ */
.section-header {
  margin-bottom: 52px;
}

.section-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}

.section-cmd .s-prompt {
  color: var(--green);
}

.section-cmd .s-cmd {
  color: var(--text);
}

.section-divider {
  height: 1px;
  background: var(--border);
}

/* ============================================================
   TERMINAL WINDOW COMPONENT
   ============================================================ */
.terminal-window {
  background: #0b0c0f;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  position: relative;
  width: 472px;
  height: 646.1px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 28px 88px rgba(0, 0, 0, 0.55),
    0 0 64px rgba(92, 255, 114, 0.028);
}

/* Subtle scanline overlay */
.terminal-window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.025) 2px,
      rgba(0, 0, 0, 0.025) 4px);
  pointer-events: none;
  z-index: 10;
  border-radius: 9px;
  opacity: 0.6;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: #0e0f13;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green-d {
  background: #28c840;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 22px 26px 26px;
  font-size: 12.5px;
  line-height: 1.85;
  height: calc(646.1px - 38px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Terminal syntax tokens */
.t-prompt {
  color: var(--green);
}

.t-path {
  color: var(--green-dim);
}

.t-dim {
  color: var(--text-muted);
}

.t-comment {
  color: var(--text-dim);
}

.t-string {
  color: var(--syn-amber);
}

.t-builtin {
  color: var(--syn-cyan);
}

.t-var {
  color: var(--syn-muted-purple);
}

.t-output {
  color: var(--text);
}

.t-cmd {
  color: var(--text);
}

.t-green-b {
  color: var(--green);
  font-weight: 600;
}

.t-cyan {
  color: var(--syn-cyan);
}

.t-amber {
  color: var(--syn-amber);
}

.t-box {
  color: rgba(92, 255, 114, 0.3);
}

.terminal-line.tl-box {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.terminal-line.tl-box .t-box {
  flex-shrink: 0;
}

.t-box-mid {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

.t-ls {
  display: inline-block;
}

.t-ls-dir {
  color: var(--syn-cyan);
  min-width: 16ch;
  display: inline-block;
}

.terminal-line {
  display: block;
  white-space: pre;
  min-height: 1.85em;
}

/* Interactive terminal input */
.terminal-input-line {
  display: flex;
  align-items: center;
  white-space: normal;
  min-height: 1.85em;
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: inherit;
  line-height: inherit;
  caret-color: var(--green);
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Blinking cursor */
.cursor-block {
  display: inline-block;
  width: 8.5px;
  height: 1em;
  background: var(--green);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: blink 1.1s step-end infinite;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-h);
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 72px 0 52px;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding-left: 36px;
  padding-right: 36px;
}

/* Hero left — text */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-tagline {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fade-up 0.7s 0.25s forwards;
}

.hero-tagline .t-dim {
  color: var(--green-dim);
}

.hero-name-block {
  opacity: 0;
  animation: fade-up 0.7s 0.5s forwards;
}

.hero-rule {
  height: 1px;
  width: 56px;
  background: var(--green-border);
  margin: 10px 0 8px;
}

.hero-name {
  font-size: clamp(26px, 3.8vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-name .accent {
  color: var(--green);
}

.hero-role {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-dim);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 0;
}

.hero-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.hero-desc {
  font-size: 13px;
  color: #a8b4be;
  line-height: 2;
  max-width: 460px;
  opacity: 0;
  animation: fade-up 0.7s 0.8s forwards;
}

.hero-desc-stack {
  color: var(--text-muted);
  font-size: 12px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.7s 1.0s forwards;
}

/* Ghost secondary CTA */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
  letter-spacing: 0.02em;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

/* Terminal-style CTA button */
.btn-terminal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--green-border);
  background: transparent;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
  transition: background var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  letter-spacing: 0.02em;
}

.btn-terminal:hover {
  background: var(--green-glow);
  box-shadow: 0 0 22px var(--green-glow-md), inset 0 0 10px var(--green-glow);
  border-color: rgba(92, 255, 114, 0.48);
}

.btn-arrow {
  transition: transform var(--t-fast);
}

.btn-terminal:hover .btn-arrow {
  transform: translateX(4px);
}

/* Hero right — terminal */
.hero-right {
  opacity: 0;
  animation: fade-left 0.8s 0.7s forwards;
}

/* Hero bottom bar */
.hero-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 36px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-social {
  opacity: 0;
  animation: fade-up 0.7s 1.2s forwards;
}

.hero-social-label {
  font-size: 11px;
  color: var(--green);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.hero-social-divider {
  width: 160px;
  height: 1px;
  background: var(--border);
  margin-bottom: 13px;
}

.hero-social-links {
  display: flex;
  gap: 22px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-dim);
  transition: color var(--t-fast);
}

.social-link:hover {
  color: var(--green);
}

.social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.hero-next {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast);
  opacity: 0;
  animation: fade-up 0.7s 1.3s forwards;
}

.hero-next:hover {
  color: var(--green);
}

.hero-next .arrow {
  color: var(--green);
}

/* ============================================================
   REVEAL — IntersectionObserver animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

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

.reveal-d1 {
  transition-delay: 0.10s;
}

.reveal-d2 {
  transition-delay: 0.20s;
}

.reveal-d3 {
  transition-delay: 0.30s;
}

.reveal-d4 {
  transition-delay: 0.40s;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about .about-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 2.05;
  margin-bottom: 18px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-item {
  padding: 22px 24px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 2px;
  transition: border-color var(--t-base), background var(--t-base);
}

.stat-item:hover {
  border-color: var(--green-border);
  background: var(--bg-elevated);
}

.stat-number {
  font-size: 30px;
  color: var(--green);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

/* ============================================================
   SKILLS SECTION
   ============================================================ */
#skills .skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.skill-category {
  background: var(--bg);
  padding: 30px 24px;
  transition: background var(--t-base);
}

.skill-category:hover {
  background: var(--bg-surface);
}

.skill-cat-title {
  font-size: 12px;
  color: var(--green);
  margin-bottom: 18px;
  letter-spacing: 0.03em;
}

.skill-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.9;
  transition: color var(--t-fast);
  cursor: default;
}

.skill-item:hover {
  color: var(--text);
}

.skill-branch {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
#projects .projects-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.project-item {
  background: var(--bg);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 20px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-base);
  cursor: default;
}

.project-item:last-child {
  border-bottom: none;
}

.project-item:hover {
  background: var(--bg-surface);
}

.proj-index {
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 3px;
  letter-spacing: 0.04em;
}

.proj-name {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: color var(--t-fast);
}

.project-item:hover .proj-name {
  color: var(--green);
}

.proj-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.95;
  margin-bottom: 18px;
  max-width: 540px;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proj-tag {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 2px;
  letter-spacing: 0.04em;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.project-item:hover .proj-tag {
  color: var(--text-dim);
  border-color: var(--border-hover);
}

.proj-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
  flex-shrink: 0;
  padding-top: 2px;
}

.proj-link {
  font-size: 11px;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 2px;
  transition: all var(--t-fast);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.proj-link:hover {
  color: var(--green);
  border-color: var(--green-border);
  background: var(--green-glow);
}

/* ============================================================
   EXPERIENCE SECTION
   ============================================================ */
#experience .exp-log {
  display: flex;
  flex-direction: column;
}

.exp-entry {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 36px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.exp-entry:first-child {
  border-top: 1px solid var(--border);
}

.exp-date {
  font-size: 11px;
  color: var(--green-dim);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.exp-company {
  font-size: 12px;
  color: var(--text-muted);
}

.exp-role {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.exp-bullets li {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.85;
  padding-left: 18px;
  position: relative;
}

.exp-bullets li::before {
  content: '--';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* ============================================================
   ACHIEVEMENTS SECTION
   ============================================================ */
#achievements .achievements-out {
  display: flex;
  flex-direction: column;
}

.achv-line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.38s ease, transform 0.38s ease, color var(--t-fast);
}

.achv-line:first-child {
  border-top: 1px solid var(--border);
}

.achv-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.achv-line:hover .achv-text {
  color: var(--text);
}

.achv-check {
  color: var(--green);
  flex-shrink: 0;
}

.achv-text {
  color: var(--text-dim);
}

.achv-text strong {
  color: var(--text);
  font-weight: 500;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact .contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.contact-info-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 2.05;
  margin-bottom: 36px;
}

.contact-direct {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.contact-lbl {
  color: var(--green-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-lbl svg {
  color: var(--green);
}

.contact-row a {
  color: var(--text-dim);
  transition: color var(--t-fast);
}

.contact-row a:hover {
  color: var(--green);
}

.contact-row.highlight {
  color: var(--green);
  padding: 6px 10px;
  border-left: 2px solid var(--green);
  background: var(--green-glow);
  border-radius: 3px;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), border-left-color var(--t-fast);
}

.contact-row.highlight .contact-lbl {
  color: var(--green-dim);
}

.contact-row.highlight a:hover {
  color: var(--green);
}

.contact-row.highlight:hover {
  background: var(--green-glow-md);
  border-left-color: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
  transform: translateX(4px);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.07em;
}

.form-label .f-prompt {
  color: var(--green);
}

.form-input,
.form-textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--t-fast);
  resize: none;
  width: 100%;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #5e6b78;
}

.form-input:focus,
.form-textarea:focus {
  border-bottom-color: var(--green);
}

.form-textarea {
  height: 110px;
  line-height: 1.85;
}

/* Validation error states */
.form-input.error,
.form-textarea.error {
  border-bottom-color: #ff5f57;
}

.form-error {
  font-size: 11px;
  color: #ff5f57;
  min-height: 15px;
  letter-spacing: 0.03em;
  transition: opacity 0.15s ease;
}

.form-status {
  font-size: 12px;
  min-height: 18px;
  color: var(--green);
}

.form-submit {
  margin-top: 4px;
}

/* ============================================================
   STATUS BAR
   ============================================================ */
.status-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 10px 0;
  position: relative;
  z-index: 2;
}

.status-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green-dim);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (max-width: 600px) {
  .status-bar-inner {
    justify-content: center;
    gap: 6px 20px;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 11px;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer-links a:hover {
  color: var(--text-dim);
}

/* ============================================================
   LIGHT MODE EASTER EGG
   ============================================================ */
.lm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  color: var(--text-muted);
  margin-left: 6px;
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.lm-btn:hover {
  color: var(--syn-amber);
  background: rgba(232, 185, 111, 0.07);
}

.lm-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

/* Toast */
#lm-toast {
  position: fixed;
  top: calc(var(--nav-h) + 14px);
  right: 22px;
  z-index: 200;
  max-width: 380px;
  width: max-content;
  background: #0c0d0f;
  border: 1px solid rgba(255, 95, 87, 0.28);
  border-radius: 3px;
  padding: 16px 40px 16px 18px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 95, 87, 0.06);
  transform: translateX(calc(100% + 36px));
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
  pointer-events: none;
}

#lm-toast.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-cmd {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.toast-cmd .t-prompt {
  color: var(--green);
}

.toast-body {
  font-size: 12.5px;
  line-height: 1.7;
}

.toast-err {
  color: #ff5f57;
  margin-right: 6px;
}

.toast-msg {
  color: var(--text);
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  padding: 2px 4px;
  transition: color var(--t-fast);
}

.toast-close:hover {
  color: #ff5f57;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-left {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes blob-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes blob-float-1 {

  0%,
  100% {
    transform: translate(0px, 0px);
  }

  33% {
    transform: translate(45px, 32px);
  }

  66% {
    transform: translate(-18px, 22px);
  }
}

@keyframes blob-float-2 {

  0%,
  100% {
    transform: translate(0px, 0px);
  }

  33% {
    transform: translate(-52px, -24px);
  }

  66% {
    transform: translate(28px, -38px);
  }
}

@keyframes blob-float-3 {

  0%,
  100% {
    transform: translate(0px, 0px);
  }

  50% {
    transform: translate(22px, -28px);
  }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --section-pad: 100px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-right {
    opacity: 1;
    animation: none;
    display: flex;
    justify-content: center;
  }

  .terminal-window {
    width: 100%;
    max-width: 472px;
    height: 400px;
  }

  .terminal-body {
    height: calc(400px - 38px);
  }

  #about .about-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  #skills .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #contact .contact-layout {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .exp-entry {
    grid-template-columns: 140px 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
    --nav-h: 56px;
  }

  .container,
  .nav-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-bottom {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Mobile nav drawer */
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 10, 11, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 12px 16px 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t-base), opacity var(--t-base);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 10px 16px;
    font-size: 13px;
  }

  .nav-resume {
    margin-left: 0 !important;
    margin-top: 8px;
  }

  .nav-toggle {
    display: flex;
  }

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

  .project-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .proj-index {
    display: none;
  }

  .proj-links {
    flex-direction: row;
    align-items: flex-start;
  }

  .exp-entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}


@media (max-width: 480px) {
  :root {
    --section-pad: 64px;
  }

  .terminal-body {
    padding: 16px 18px;
    font-size: 12px;
  }

  .hero-name {
    font-size: 24px;
  }

  .hero-role {
    font-size: 14px;
  }

  .hero-desc {
    font-size: 12.5px;
  }
}

/* ============================================================
   ASCII NAME BANNER — contact section
   ============================================================ */
.ascii-name-wrap {
  display: flex;
  justify-content: center;
  margin-top: 64px;
  overflow: hidden;
}

.ascii-name {
  font-family: var(--font-mono);
  font-size: clamp(7px, 1.05vw, 13px);
  line-height: 1.25;
  color: var(--green);
  text-shadow:
    0 0 8px rgba(92, 255, 114, 0.55),
    0 0 20px rgba(92, 255, 114, 0.25);
  margin: 0;
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: none;
  background: transparent;
  border: none;
  padding: 0;
  letter-spacing: 0.01em;
  animation: ascii-flicker 6s ease-in-out infinite;
  user-select: none;
}

.ascii-name::-webkit-scrollbar {
  display: none;
}

@keyframes ascii-flicker {

  0%,
  100% {
    opacity: 1;
  }

  92% {
    opacity: 1;
  }

  93% {
    opacity: 0.7;
  }

  94% {
    opacity: 1;
  }

  96% {
    opacity: 0.85;
  }

  97% {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .ascii-name {
    font-size: 6.5px;
  }
}

/* ============================================================
   ASCII NAME — green radial glow
   ============================================================ */
.ascii-name-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 64px;
  overflow: visible;
}
.ascii-name-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(800px, 100%);
  height: 180px;
  background: radial-gradient(ellipse, rgba(92, 255, 114, 0.09) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(18px);
}

/* ============================================================
   FOOTER SEPARATOR
   ============================================================ */
.footer-separator {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(92, 255, 114, 0.35) 30%,
    rgba(92, 255, 114, 0.55) 50%,
    rgba(92, 255, 114, 0.35) 70%,
    transparent 100%
  );
  margin: 0;
  position: relative;
  z-index: 2;
}