﻿/* ===== LOADING SCREEN ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}
.loader.exit {
  animation: loaderWipeOut 0.8s cubic-bezier(.77,0,.18,1) forwards;
}
@keyframes loaderWipeOut {
  0%   { clip-path: circle(150% at 50% 50%); }
  100% { clip-path: circle(0% at 50% 50%); }
}
.loader.hidden {
  display: none;
}

/* Grid canvas */
.loader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Horizontal scan line */
.loader-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  box-shadow: 0 0 20px var(--accent), 0 0 60px var(--accent-dim);
  opacity: 0.6;
  z-index: 3;
  animation: scanMove 2.5s ease-in-out infinite;
}
@keyframes scanMove {
  0%, 100% { top: 10%; }
  50%      { top: 90%; }
}

/* Center logo area */
.loader-center {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG logo */
.loader-svg {
  width: 180px;
  height: 90px;
  overflow: visible;
  filter: drop-shadow(0 0 12px var(--accent-dim));
}
.loader-letter {
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawLetter 1.6s cubic-bezier(.65,0,.35,1) forwards,
             fillIn 0.5s ease 1.6s forwards;
}
.loader-letter-2 {
  animation: drawLetter 1.6s cubic-bezier(.65,0,.35,1) 0.3s forwards,
             fillIn 0.5s ease 1.9s forwards;
}
@keyframes drawLetter {
  to { stroke-dashoffset: 0; }
}
@keyframes fillIn {
  to { fill: var(--accent); stroke-width: 0; }
}

/* Glow pulse behind logo */
.loader-glow {
  position: absolute;
  width: 220px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0;
  animation: glowPulse 2.5s ease-in-out 0.6s infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50%      { opacity: 0.7; transform: scale(1.2); }
}

/* After draw ÔÇö glitch flicker on letters */
.loader-svg.drawn .loader-letter {
  animation: svgGlitch 3s steps(2, end) infinite;
  stroke-dashoffset: 0;
}
@keyframes svgGlitch {
  0%, 88%, 100% { filter: none; transform: translate(0); }
  90% { filter: drop-shadow(3px 0 var(--accent)) drop-shadow(-3px 0 #0d9488); transform: translate(-2px, 1px); }
  92% { filter: drop-shadow(-2px 0 #0d9488) drop-shadow(2px 0 var(--accent)); transform: translate(2px, -1px); }
  94% { filter: none; transform: translate(0); }
}

/* Terminal boot text */
.loader-terminal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 2rem;
  text-align: left;
  width: 260px;
  min-height: 3.6rem;
  z-index: 2;
  line-height: 1.7;
}
.loader-terminal .term-line {
  opacity: 0;
  animation: termFadeIn 0.3s ease forwards;
  white-space: nowrap;
  overflow: hidden;
}
.loader-terminal .term-accent {
  color: var(--accent);
}
@keyframes termFadeIn {
  to { opacity: 1; }
}

/* Progress bar */
.loader-bar-track {
  width: 260px;
  height: 2px;
  background: var(--border);
  border-radius: 4px;
  margin-top: 1.2rem;
  overflow: hidden;
  z-index: 2;
}
.loader-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
  transition: width 0.25s ease;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #080c14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text: #e4e8ed;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-strong: #e4e8ed;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.3);
  --border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(8, 12, 20, 0.85);
  --nav-border: rgba(255, 255, 255, 0.06);
  --skill-tag-bg: rgba(255, 255, 255, 0.05);
  --skill-tag-border: rgba(255, 255, 255, 0.08);
  --skill-tag-text: #cbd5e1;
  --project-card-bg: rgba(255, 255, 255, 0.02);
  --project-card-border: rgba(255, 255, 255, 0.06);
  --project-icon-bg: rgba(0, 212, 170, 0.12);
  --orb-opacity: 0.4;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-card: rgba(15, 23, 42, 0.04);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-strong: #0f172a;
  --accent: #0d9488;
  --accent-dim: rgba(13, 148, 136, 0.25);
  --border: rgba(15, 23, 42, 0.1);
  --nav-bg: rgba(241, 245, 249, 0.92);
  --nav-border: rgba(15, 23, 42, 0.08);
  --skill-tag-bg: rgba(15, 23, 42, 0.06);
  --skill-tag-border: rgba(15, 23, 42, 0.12);
  --skill-tag-text: #334155;
  --project-card-bg: rgba(15, 23, 42, 0.03);
  --project-card-border: rgba(15, 23, 42, 0.08);
  --project-icon-bg: rgba(13, 148, 136, 0.15);
  --orb-opacity: 0.25;
}

html {
  scroll-behavior: smooth;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Syne', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s, color 0.3s;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #6366f1);
  z-index: 999;
  transition: width 0.1s ease;
}

/* ===== BACKGROUND LAYERS ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--orb-opacity);
  pointer-events: none;
  z-index: 0;
}

.gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.gradient-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  bottom: 20%;
  left: -100px;
}

.gradient-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
  bottom: -100px;
  right: 20%;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-border);
  transition: transform 0.3s ease;
}

.nav.scrolled-up {
  transform: translateY(0);
}

.nav.scrolled-down {
  transform: translateY(-100%);
}

.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.theme-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  z-index: 90;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .theme-toggle:hover {
  background: #080c14;
  color: #e4e8ed;
  border-color: rgba(228, 232, 237, 0.18);
}

/* Theme transition ÔÇö View Transitions API */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  clip-path: circle(0px at var(--tx) var(--ty));
  animation: themeExpand 0.7s cubic-bezier(.4, 0, .2, 1) forwards;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 9999;
}
@keyframes themeExpand {
  to { clip-path: circle(var(--tr) at var(--tx) var(--ty)); }
}

/* Fallback overlay for browsers without View Transitions */
.theme-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  clip-path: circle(0px at var(--tx) var(--ty));
  transition: clip-path 0.7s cubic-bezier(.4, 0, .2, 1);
}
.theme-transition-overlay.expanding {
  clip-path: circle(var(--tr) at var(--tx) var(--ty));
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.nav-cta {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, #0d9488 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .nav-cta {
  color: #0a0a0a;
}

[data-theme="light"] .nav-cta {
  color: #fff;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-dim);
}

.lang-toggle {
  height: 36px;
  min-width: 92px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.hero-line {
  display: block;
}

.hero-line-accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-dim);
  background: linear-gradient(90deg, var(--accent) 0%, #0d9488 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}

.hero-line-accent .cursor {
  -webkit-text-fill-color: var(--accent);
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.hero-line-accent .cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.85rem 1.5rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #0d9488 100%);
  color: #fff;
}

[data-theme="dark"] .btn-primary {
  color: #0a0a0a;
}

[data-theme="light"] .btn-primary {
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 212, 170, 0.35);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== HERO VISUAL (THEMED) ===== */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.code-window {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: transform 0.3s ease;
}

.hero-visual:hover .code-window {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
  border-color: var(--accent-dim);
}

.window-header {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
  margin-right: 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
  opacity: 1;
}

/* Reusing generic dot classes but overriding them */
.dot-red {
  background: var(--border);
}

.dot-yellow {
  background: var(--border);
}

.dot-green {
  background: var(--border);
}

.code-window:hover .dot:nth-child(1) {
  background: var(--text-dim);
}

.code-window:hover .dot:nth-child(2) {
  background: var(--text-muted);
}

.code-window:hover .dot:nth-child(3) {
  background: var(--text);
}

.window-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.8;
}

.window-body {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  display: flex;
  gap: 0.75rem;
  position: relative;
  pointer-events: auto;
}

.line-numbers {
  color: var(--text-dim);
  opacity: 0.5;
  user-select: none;
  text-align: right;
  min-width: 1.5rem;
  white-space: pre;
  flex-shrink: 0;
}

.editor-wrap {
  display: grid;
  flex: 1;
  min-height: 120px;
}

.code-highlight,
.code-input {
  all: unset;
  display: block;
  grid-area: 1 / 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  tab-size: 2;
  letter-spacing: 0;
  word-spacing: 0;
  text-indent: 0;
  text-transform: none;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
  resize: none;
  width: 100%;
}

.code-highlight {
  pointer-events: none;
  z-index: 1;
  color: var(--text-muted);
}

.code-input {
  color: transparent;
  caret-color: var(--accent);
  z-index: 2;
  -webkit-text-fill-color: transparent;
  field-sizing: content;
}

.code-input::selection {
  background: var(--accent-dim);
  -webkit-text-fill-color: transparent;
}

/* Syntax highlight classes */
.syn-keyword { color: var(--text); font-weight: 600; }
.syn-string { color: var(--accent); }
.syn-comment { color: var(--text-dim); font-style: italic; }
.syn-function { color: var(--text-strong); }
.syn-punctuation { color: var(--text-muted); }
.syn-number { color: var(--accent); }

/* Monochromatic Syntax Highlighting */
.cl-purple {
  color: var(--text);
  font-weight: 600;
}

/* Keywords */
.cl-blue {
  color: var(--text-strong);
}

/* Variables/Properties */
.cl-green {
  color: var(--accent);
}

/* Strings */
.cl-yellow {
  color: var(--text-strong);
}

/* Functions */
.cl-white {
  color: var(--text-dim);
  font-style: italic;
}

/* Comments */

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: middle;
  animation: Blink 1s step-end infinite;
}

@keyframes Blink {
  50% {
    opacity: 0;
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 2;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 3rem;
  align-items: start;
  max-width: 100%;
  overflow: hidden;
}

.about-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.about-content p {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.about-content {
  min-width: 0;
  overflow: hidden;
}

.about-content p strong {
  color: var(--text-strong);
}

.about-location {
  color: var(--text-dim) !important;
  font-size: 0.9rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.about-location .location-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.about-card {
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  min-width: 0;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.about-stat {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.about-card span:last-child {
  font-size: 0.85rem;
  color: var(--text-dim);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-group h3 {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags span {
  padding: 0.4rem 0.85rem;
  background: var(--skill-tag-bg);
  border: 1px solid var(--skill-tag-border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--skill-tag-text);
  transition: all 0.2s;
}

.skill-tags span:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

/* ===== MARQUEE ===== */
.marquee-wrap {
  overflow: hidden;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
  will-change: transform;
}

.marquee {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  flex-shrink: 0;
}

.marquee span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-33.3333%);
  }
}

/* ===== NOW SECTION ===== */
.now-grid {
  display: grid;
  gap: 1rem;
}

.now-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s;
  min-width: 0;
  overflow: hidden;
}

.now-card:hover {
  border-color: var(--accent-dim);
}

.now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.4rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

.now-card p {
  color: var(--text-muted);
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.now-card p strong {
  color: var(--text);
}

/* ===== CERTIFICATIONS ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  gap: 1.25rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  max-width: 340px;
  width: 100%;
  transition: all 0.2s;
}

.cert-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.cert-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: none;
  border-radius: 10px;
  overflow: hidden;
}

.cert-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--bg);
}

.cert-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cert-title {
  font-size: 1rem;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cert-issuer {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.cert-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cert-label {
  color: var(--accent);
  margin-right: 0.4rem;
}

.cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cert-actions .btn {
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
}

/* ===== EXPERIENCE / TIMELINE ===== */
.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.5;
}

.timeline-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00d4aa;
  flex-shrink: 0;
  margin-left: -6px;
  margin-top: 4px;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.5);
}

.timeline-content {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  flex: 1;
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.timeline-content p:last-child {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--project-card-bg);
  border: 1px solid var(--project-card-border);
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 0;
  overflow: hidden;
}

.project-expand {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}

.project-expand:hover {
  opacity: 0.8;
}

.project-card:hover {
  background: var(--bg-card);
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-visual {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--project-icon-bg);
  border-radius: 10px;
}

.project-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.project-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
}

.project-body p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.project-tags {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== CONTACT ===== */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-content {
  max-width: 420px;
}

.contact-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.contact-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.contact-network {
  width: 100%;
  max-width: 280px;
  opacity: 0.6;
}

.contact-network .cnet-line {
  fill: none;
  stroke: var(--accent-dim);
  stroke-width: 1;
}

.contact-network .cnet-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 14;
  stroke-linecap: round;
  animation: cnetFlow 2s linear infinite;
}

.contact-network .cnet-flow:nth-of-type(2) {
  animation-delay: 0.5s;
}

.contact-network .cnet-flow:nth-of-type(3) {
  animation-delay: 1s;
}

.contact-network .cnet-node {
  fill: var(--accent);
  animation: cnetPulse 2s ease-in-out infinite;
}

.contact-network .cnet-node:nth-of-type(2) {
  animation-delay: 0.3s;
}

.contact-network .cnet-node:nth-of-type(3) {
  animation-delay: 0.6s;
}

.contact-network .cnet-node:nth-of-type(4) {
  animation-delay: 0.9s;
}

.contact-network .cnet-node:nth-of-type(5) {
  animation-delay: 1.2s;
}

@keyframes cnetFlow {
  to {
    stroke-dashoffset: -20;
  }
}



/* ===== CONTACT TERMINAL (THEMED) ===== */
.contact-terminal-wrapper {
  perspective: 1000px;
  width: 100%;
  max-width: 440px;
}

.contact-terminal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

.contact-terminal:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 20px 40px rgba(0, 212, 170, 0.05);
  /* slightly colorful shadow for effect */
}

.contact-terminal-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-controls {
  display: flex;
  gap: 6px;
}

.control {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.contact-terminal:hover .control:nth-child(1) {
  background: var(--text-dim);
}

.contact-terminal:hover .control:nth-child(2) {
  background: var(--text-muted);
}

.contact-terminal:hover .control:nth-child(3) {
  background: var(--text);
}

.terminal-title {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-terminal-body {
  padding: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.terminal-row {
  display: flex;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.terminal-prompt {
  color: var(--accent);
  margin-right: 10px;
  flex-shrink: 0;
  font-weight: 700;
}

.terminal-path {
  color: var(--text-dim);
}

.terminal-cmd {
  color: var(--text);
}

.terminal-input-line {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  margin-bottom: 8px;
  background: transparent;
  border: none;
  padding: 0;
}

.terminal-input-line span {
  color: var(--accent);
  font-size: 13px;
  opacity: 0.8;
}

.terminal-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  width: 100%;
  padding: 4px 0;
  font-family: inherit;
  font-size: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.terminal-input:focus {
  border-color: var(--accent);
}

.terminal-input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.terminal-textarea-wrapper {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
  align-items: start;
}

.terminal-textarea {
  min-height: 80px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  background: var(--bg-card);
  color: var(--text);
}

.terminal-textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.terminal-textarea::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.terminal-btn-wrap {
  position: relative;
  margin-top: 1rem;
}

.terminal-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  overflow: hidden;
}

.terminal-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 15px var(--accent-dim);
}

/* ── progress bar beneath button ── */
.tx-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-dim);
  border-radius: 0 2px 2px 0;
  transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.tx-progress.active  { width: 88%; }
.tx-progress.complete { width: 100%; transition: width 0.25s ease; }

/* ── transmitting state ── */
@keyframes txPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

@keyframes txDots {
  0%          { content: '.  '; }
  33%         { content: '.. '; }
  66%, 100%   { content: '...'; }
}

.terminal-btn.tx-sending {
  pointer-events: none;
  animation: txPulse 0.7s ease-in-out infinite;
}

.terminal-btn.tx-sending .btn-dots::after {
  content: '.  ';
  display: inline-block;
  width: 2ch;
  animation: txDots 1s steps(3, end) infinite;
}

/* ── shimmer sweep on the button ── */
@keyframes btnShimmer {
  0%   { transform: translateX(-100%) skewX(-15deg); }
  100% { transform: translateX(250%) skewX(-15deg); }
}

.terminal-btn.tx-sending::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0,212,170,0.25) 50%, transparent 100%);
  animation: btnShimmer 1s linear infinite;
  pointer-events: none;
}

/* ── success flash ── */
@keyframes txSuccess {
  0%   { background: transparent; color: var(--accent); box-shadow: none; border-color: var(--accent); }
  15%  { background: var(--accent); color: var(--bg); box-shadow: 0 0 30px var(--accent), 0 0 60px var(--accent-dim); border-color: var(--accent); }
  60%  { background: var(--accent); color: var(--bg); box-shadow: 0 0 14px var(--accent-dim); border-color: var(--accent); }
  100% { background: transparent; color: var(--accent); box-shadow: none; border-color: var(--accent); }
}

.terminal-btn.tx-success {
  animation: txSuccess 1.8s ease forwards;
  pointer-events: none;
}

/* ── error shake ── */
@keyframes txErrorShake {
  0%, 100% { transform: translateX(0); border-color: #ef4444; color: #ef4444; }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

.terminal-btn.tx-error {
  animation: txErrorShake 0.45s ease;
  border-color: #ef4444;
  color: #ef4444;
}

/* ── scan line ── */
@keyframes txScanLine {
  0%   { top: 0%;   opacity: 0.9; }
  100% { top: 100%; opacity: 0; }
}

.contact-terminal.tx-scanning::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  box-shadow: 0 0 10px var(--accent), 0 0 22px var(--accent-dim);
  pointer-events: none;
  z-index: 20;
  animation: txScanLine 1.4s linear infinite;
  top: 0;
}

.contact-terminal.tx-scanning {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-dim), 0 0 30px rgba(0,212,170,0.12);
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* ── floating packet particles ── */
@keyframes txPacketFloat {
  0%   { transform: translateY(0) translateX(0);             opacity: 1; }
  100% { transform: translateY(-110px) translateX(var(--pdx,0px)); opacity: 0; }
}

.tx-packet {
  position: fixed;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent-dim);
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  animation: txPacketFloat 1s ease-out forwards;
}

/* ── burst particles ── */
@keyframes txBurstParticle {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--bpx,0px), var(--bpy,0px)) scale(0); opacity: 0; }
}

.tx-burst {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent-dim);
  pointer-events: none;
  z-index: 9999;
  animation: txBurstParticle 0.9s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* ── response text typewriter in ── */
@keyframes txResponseIn {
  from { opacity: 0; letter-spacing: 0.4em; }
  to   { opacity: 1; letter-spacing: 0; }
}

.terminal-response.tx-appear {
  animation: txResponseIn 0.5s ease forwards;
}

.terminal-response {
  margin-top: 16px;
  color: var(--accent);
  font-size: 12px;
  display: none;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.terminal-error {
  color: #ef4444;
  border-left-color: #ef4444;
}

.terminal-response.visible {
  display: block;
}

@keyframes cnetPulse {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: inline-flex;
  font: inherit;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  transition: all 0.2s;
  overflow: hidden;
}

.contact-link:hover {
  border-color: var(--accent-dim);
  background: rgba(0, 212, 170, 0.05);
}

.contact-copy {
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-align: left;
}

.contact-copy .copy-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s;
}

.contact-copy:hover .copy-hint {
  opacity: 1;
}

.contact-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 170, 0.15);
  border-radius: 6px;
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */
/* ===== BACK TO TOP ===== */
/* ===== BACK TO TOP — redesigned ===== */
@keyframes bttPulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

@keyframes bttOrbit1 {
  from { transform: rotate(0deg)   translateX(27px) scale(1); }
  to   { transform: rotate(360deg) translateX(27px) scale(1); }
}
@keyframes bttOrbit2 {
  from { transform: rotate(180deg) translateX(27px) scale(1); }
  to   { transform: rotate(540deg) translateX(27px) scale(1); }
}

@keyframes bttArrowUp {
  0%,100% { transform: translateY(0); }
  45%     { transform: translateY(-4px); }
}

@keyframes bttAppear {
  from { opacity: 0; transform: translateY(16px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s, color 0.25s, box-shadow 0.3s;
  /* glow pulse pseudo-element via box-shadow layers */
  box-shadow:
    0 0 0 1px var(--border),
    0 4px 18px rgba(0,0,0,0.35);
}

/* extra pulse ring — achieved with outline animation */
.back-to-top::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transform: scale(1);
  pointer-events: none;
  transition: opacity 0.3s;
}
.back-to-top::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--accent-dim);
  opacity: 0;
  pointer-events: none;
  animation: bttPulse 2.2s ease-out infinite;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  animation: bttAppear 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.back-to-top:hover {
  color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent-dim),
    0 0 20px rgba(0,212,170,0.18),
    0 6px 22px rgba(0,0,0,0.4);
}
.back-to-top:hover::before { opacity: 1; }
.back-to-top:hover .btt-orbit-1 { animation-play-state: running; opacity: 1; }
.back-to-top:hover .btt-orbit-2 { animation-play-state: running; opacity: 1; }
.back-to-top:hover .btt-icon svg { animation: bttArrowUp 0.55s ease infinite; }
.back-to-top:hover .btt-icon { opacity: 0; transform: translateY(-6px) scale(0.8); }
.back-to-top:hover .btt-pct  { opacity: 1; transform: translateY(0); }

/* scroll-progress SVG ring */
.btt-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.btt-ring-track {
  stroke: var(--border);
}
.btt-ring-fill {
  stroke: var(--accent);
  filter: drop-shadow(0 0 3px var(--accent));
  transition: stroke-dashoffset 0.25s linear;
}

/* orbit dots */
.btt-orbit {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent-dim);
  pointer-events: none;
  opacity: 0;
  transform-origin: 0 0;
  left: 50%;
  top: 50%;
  margin: -2.5px 0 0 -2.5px;
  transition: opacity 0.3s;
}
.btt-orbit-1 {
  animation: bttOrbit1 2s linear infinite;
  animation-play-state: paused;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
}
.btt-orbit-2 {
  animation: bttOrbit2 2s linear infinite;
  animation-play-state: paused;
  background: var(--accent-dim);
  width: 3px; height: 3px;
  margin: -1.5px 0 0 -1.5px;
}

/* icon & percentage */
.btt-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
}
.btt-pct {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  border-radius: 8px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ===== SHORTCUTS MODAL ===== */
.shortcuts-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.shortcuts-modal.open {
  opacity: 1;
  visibility: visible;
}

.shortcuts-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 360px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.shortcuts-content h3 {
  margin-bottom: 1rem;
}

.shortcuts-content ul {
  list-style: none;
}

.shortcuts-content li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shortcuts-content kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ===== PROJECT MODAL ===== */
.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.project-modal.open {
  opacity: 1;
  visibility: visible;
}

.project-modal-inner {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s;
}

.project-modal.open .project-modal-inner {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--accent);
  color: var(--bg);
}

#modal-content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

#modal-content .modal-tags {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

#modal-content .modal-desc {
  color: var(--text-muted);
  line-height: 1.7;
}

.footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-shortcuts {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  opacity: 0.7;
}

.footer-shortcuts:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-shortcuts kbd {
  font-family: 'JetBrains Mono', monospace;
  padding: 0.1rem 0.35rem;
  background: var(--bg-card);
  border-radius: 3px;
}


/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

body.lang-switching .nav,
body.lang-switching main,
body.lang-switching .footer,
body.lang-switching .theme-toggle,
body.lang-switching .back-to-top {
  animation: languageSwitch 1.05s cubic-bezier(.2, .8, .2, 1);
}

.language-switch-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 128px;
  height: 128px;
  border-radius: 14px;
  border: 1px solid var(--accent-dim);
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 36px var(--accent-dim);
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) scale(0.7) rotateX(-24deg) rotateY(22deg);
  opacity: 0;
  pointer-events: none;
  z-index: 100000;
}

.language-switch-indicator::before,
.language-switch-indicator::after {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 1px solid var(--accent-dim);
  pointer-events: none;
}

.language-switch-indicator::before {
  transform: translateZ(16px);
}

.language-switch-indicator::after {
  transform: translateZ(-12px);
  opacity: 0.45;
}

.language-switch-indicator.show {
  animation: languageCubeFlash 1.05s cubic-bezier(.2, .8, .2, 1) forwards;
}

@keyframes languageSwitch {
  0% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
  }
  45% {
    opacity: 0.35;
    filter: blur(5px);
    transform: translateY(8px) scale(0.99);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
  }
}

@keyframes languageCubeFlash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotateX(-40deg) rotateY(28deg);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotateX(-6deg) rotateY(6deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92) rotateX(20deg) rotateY(-22deg);
  }
}

.reveal[data-delay="0"] {
  transition-delay: 0.05s;
}

.reveal[data-delay="100"] {
  transition-delay: 0.1s;
}

.reveal[data-delay="200"] {
  transition-delay: 0.15s;
}

.reveal[data-delay="300"] {
  transition-delay: 0.2s;
}

.reveal[data-delay="400"] {
  transition-delay: 0.25s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-visual {
    display: none;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-visual {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
  }

  .contact-terminal-wrapper {
    max-width: 100%;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--nav-border);
  }

  .nav.active .nav-links {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .lang-toggle {
    margin-left: auto;
    margin-right: 0.75rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .cert-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Removed prefers-reduced-motion block to force animations on all devices */

@media (max-width: 600px) {
  .hero {
    padding: 7rem 1.5rem 3rem;
  }

  .section {
    padding: 3rem 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    text-align: center;
  }

  .contact-link {
    max-width: 100%;
    font-size: 0.88rem;
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }

  .contact-link > span:not(.contact-icon):not(.copy-hint) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .contact-copy .copy-hint {
    display: none;
  }

  .theme-toggle {
    bottom: 1.5rem;
    left: 1.5rem;
    width: 40px;
    height: 40px;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 46px;
    height: 46px;
  }

  .language-switch-indicator {
    width: 108px;
    height: 108px;
    font-size: 0.9rem;
  }
}

/* =============================================
   ✦ WOW FEATURES
   ============================================= */

/* Custom cursor removed */

/* ---- 2. 3D Card Tilt ---- */
.project-card {
  position: relative;
  transform-style: preserve-3d;
}
.card-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.25s;
}

/* ---- 5. Konami Easter Egg ---- */
@keyframes eggFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes eggSlideIn {
  from { transform: scale(0.82) translateY(24px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);     opacity: 1; }
}
@keyframes eggGlitch {
  0%,100% { clip-path: inset(0 0 95% 0);   transform: translate(-3px, 0); }
  20%     { clip-path: inset(22% 0 55% 0);  transform: translate(3px,  0); }
  40%     { clip-path: inset(55% 0 20% 0);  transform: translate(-1px, 0); }
  60%     { clip-path: inset(78% 0 0% 0);   transform: translate(1px,  0); }
  80%     { clip-path: inset(0% 0 82% 0);   transform: translate(0,    0); }
}
@keyframes eggBounce {
  0%,100% { transform: translateY(0)     rotate(-4deg); }
  50%     { transform: translateY(-12px)  rotate(4deg); }
}

.easter-egg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: eggFadeIn 0.25s ease;
}
.easter-egg-terminal {
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 2.5rem 2.5rem 2rem;
  max-width: 460px;
  width: 90%;
  box-shadow:
    0 0 50px rgba(0, 212, 170, 0.22),
    0 0 100px rgba(0, 212, 170, 0.07),
    0 24px 64px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: eggSlideIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.easter-egg-badge {
  display: inline-block;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  animation: eggBounce 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(0, 212, 170, 0.7));
}
.easter-egg-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-dim);
  margin-bottom: 1.25rem;
  position: relative;
}
.easter-egg-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #f43f5e;
  text-shadow: none;
  opacity: 0.5;
  animation: eggGlitch 2.4s steps(2, end) infinite;
  pointer-events: none;
}
.easter-egg-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 2.1;
  margin-bottom: 1.75rem;
}
.easter-egg-sub span { color: var(--accent); }
.easter-egg-close {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 1.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.easter-egg-close:hover { background: var(--accent); color: var(--bg); }
