/* ===== DESIGN TOKENS ===== */
:root {
  --bg: #faf9f6;
  --bg-alt: #f0eee9;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555570;
  --text-muted: #8888a0;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-bg: rgba(108, 92, 231, 0.08);
  --amber: #f59e0b;
  --emerald: #10b981;
  --violet: #8b5cf6;
  --rose: #f43f5e;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(108, 92, 231, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-hand: 'Caveat', cursive;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --section-py: 100px;
  --container: 1100px;
}

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

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

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

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

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

ul {
  list-style: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== GRID BG ===== */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: linear-gradient(rgba(108, 92, 231, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(108, 92, 231, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber), var(--emerald));
  z-index: 9999;
  width: 0;
  transition: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.4s var(--ease);
}

.navbar.scrolled {
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

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

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

.logo-bracket {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-links a[data-num]::before {
  content: attr(data-num) ".";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-right: 4px;
}

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

.nav-cta {
  padding: 8px 20px !important;
  border-radius: var(--radius-xs);
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 600 !important;
  transition: transform 0.3s, box-shadow 0.3s !important;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-terminal {
  margin-bottom: 24px;
  display: inline-block;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 14px;
  background: var(--text);
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
}

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

.terminal-dot.red {
  background: #ff5f57;
}

.terminal-dot.yellow {
  background: #ffbd2e;
}

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

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: auto;
}

.terminal-body {
  background: #2d2d3f;
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-prompt {
  color: var(--emerald);
  margin-right: 8px;
}

.terminal-cmd {
  color: #e0e0e0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: var(--accent-bg);
  border: 1px solid var(--border-hover);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.4
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 16px;
}

.name-highlight {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--violet), var(--rose), var(--amber), var(--accent));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease-in-out infinite;
}

.name-highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 12px;
  background: rgba(108, 92, 231, 0.12);
  border-radius: 4px;
  z-index: -1;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }

  100% {
    background-position: 0% 50%
  }
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

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

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

.hero-desc {
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(108, 92, 231, 0.3);
}

.btn-primary .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
  position: relative;
}

.code-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transform: rotate(1deg);
  transition: transform 0.5s var(--ease);
}

.code-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.code-file {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 10px;
  border-radius: 50px;
}

.code-block-wrap {
  display: flex;
}

.line-numbers {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  padding-left: 16px;
  padding-right: 12px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text-muted);
  opacity: 0.4;
  user-select: none;
  border-right: 1px solid var(--border);
  text-align: right;
  min-width: 42px;
}

.line-numbers span {
  display: block;
}

.code-block {
  padding: 20px;
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
  flex: 1;
}

.code-block code {
  white-space: pre;
}

.code-kw {
  color: var(--accent);
  font-weight: 600;
}

.code-var {
  color: var(--rose);
}

.code-str {
  color: var(--emerald);
}

.code-prop {
  color: var(--amber);
}

.code-num {
  color: var(--violet);
}

.code-comment {
  color: var(--text-muted);
}

.hero-stats-float {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  text-align: center;
  flex: 1;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-chip:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-suffix {
  font-size: 1.1rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  display: block;
}

/* ===== SECTIONS ===== */
section {
  padding: var(--section-py) 0;
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 56px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 3px;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.img-frame {
  position: relative;
}

.img-frame img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-md);
}

.img-annotation {
  position: absolute;
  bottom: -20px;
  right: -10px;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--accent);
  transform: rotate(-5deg);
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.about-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 600;
}

.about-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.detail-item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.detail-key {
  color: var(--accent);
}

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

/* ===== SKILLS ===== */
#skills {
  background: var(--bg-alt);
}

.skills-category {
  margin-bottom: 36px;
}

.skills-category:last-child {
  margin-bottom: 0;
}

.cat-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.cat-icon svg {
  stroke: var(--accent);
}

.footer-icon {
  display: inline-block;
  vertical-align: -2px;
  stroke: var(--text-muted);
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: default;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.skill-pill:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.12);
  background: var(--accent-bg);
}

.skill-pill .skill-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* ===== PROJECTS ===== */
.projects-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-card {
  display: flex;
  gap: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  box-shadow: var(--shadow-sm);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  transition: background 0.3s;
}

.project-card[data-accent="amber"]::before {
  background: var(--amber);
}

.project-card[data-accent="emerald"]::before {
  background: var(--emerald);
}

.project-card[data-accent="violet"]::before {
  background: var(--violet);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.project-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(108, 92, 231, 0.1);
  line-height: 1;
  flex-shrink: 0;
}

.project-body {
  flex: 1;
}

.project-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 6px 0 4px;
}

.project-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tag {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.73rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.project-card[data-accent="amber"] .project-tag {
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
}

.project-card[data-accent="emerald"] .project-tag {
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
}

.project-card[data-accent="violet"] .project-tag {
  color: var(--violet);
  background: rgba(139, 92, 246, 0.1);
}

.project-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.3s;
  display: inline-flex;
  gap: 4px;
}

.project-link:hover {
  gap: 10px;
}

/* ===== EDUCATION ===== */
#education {
  background: var(--bg-alt);
}

.edu-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.edu-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-light), transparent);
  border-radius: 2px;
}

.edu-item {
  display: flex;
  gap: 28px;
  margin-bottom: 36px;
  position: relative;
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-marker {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.edu-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}

.edu-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  flex: 1;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

.edu-content:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.edu-content h3 {
  font-size: 1.1rem;
  margin: 6px 0 4px;
  font-weight: 600;
}

.edu-place {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.edu-detail {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 500;
}

/* ===== EXPERIENCE ===== */
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 0 auto;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.exp-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.exp-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  border: 1px solid var(--border);
  padding: 4px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.exp-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.exp-role {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  display: block;
  margin-top: 4px;
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 14px;
  background: var(--accent-bg);
  border-radius: 50px;
}

.exp-list li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  border-bottom: 1px dashed var(--border);
}

.exp-list li:last-child {
  border-bottom: none;
}

.exp-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.handwritten {
  font-family: var(--font-hand);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.contact-chip svg {
  color: var(--accent);
  flex-shrink: 0;
}

.contact-chip:hover {
  border-color: var(--accent);
  transform: translateX(6px);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font);
  font-size: 0.92rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

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

.btn-submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: #5a4bd6;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.3);
}

.submit-arrow {
  transition: transform 0.3s;
}

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

.form-status {
  margin-top: 12px;
  font-size: 0.88rem;
  text-align: center;
  min-height: 24px;
}

.form-status.success {
  color: var(--emerald);
}

.form-status.error {
  color: var(--rose);
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative;
  z-index: 1;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.3s;
}

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

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

/* ===== PAGE LOAD ===== */
.page-loading * {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width:900px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: 1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-image {
    max-width: 320px;
    margin: 0 auto;
  }

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

  .project-card {
    flex-direction: column;
    gap: 16px;
  }

  .project-number {
    font-size: 2rem;
  }
}

@media (max-width:768px) {
  :root {
    --section-py: 70px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    transition: right 0.4s var(--ease);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero h1 {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  .hero-stats-float {
    flex-direction: column;
    gap: 10px;
  }

  .stat-chip {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

  .code-card {
    transform: none;
  }

  .exp-header {
    flex-direction: column;
  }

  .floating-shapes {
    display: none;
  }
}

/* ===== HERO ENTRANCE STAGGER ===== */
.hero-content>* {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeIn 0.7s var(--ease) forwards;
}

.hero-content>*:nth-child(1) {
  animation-delay: 0.15s;
}

.hero-content>*:nth-child(2) {
  animation-delay: 0.3s;
}

.hero-content>*:nth-child(3) {
  animation-delay: 0.45s;
}

.hero-content>*:nth-child(4) {
  animation-delay: 0.55s;
}

.hero-content>*:nth-child(5) {
  animation-delay: 0.65s;
}

.hero-content>*:nth-child(6) {
  animation-delay: 0.75s;
}

.hero-visual {
  opacity: 0;
  transform: translateY(30px) rotate(2deg);
  animation: heroVisualIn 0.9s var(--ease) 0.5s forwards;
}

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

@keyframes heroVisualIn {
  to {
    opacity: 1;
    transform: translateY(0) rotate(1deg);
  }
}

/* ===== FLOATING DECORATIVE SHAPES ===== */
.floating-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.float-shape:nth-child(1) {
  width: 300px;
  height: 300px;
  background: var(--accent);
  top: -80px;
  right: -60px;
  animation: floatA 18s ease-in-out infinite alternate;
}

.float-shape:nth-child(2) {
  width: 200px;
  height: 200px;
  background: var(--amber);
  bottom: 10%;
  left: -40px;
  animation: floatB 22s ease-in-out infinite alternate;
}

.float-shape:nth-child(3) {
  width: 150px;
  height: 150px;
  background: var(--emerald);
  top: 40%;
  right: 5%;
  animation: floatC 15s ease-in-out infinite alternate;
  border-radius: 30%;
}

@keyframes floatA {
  to {
    transform: translate(-50px, 60px) scale(1.15);
  }
}

@keyframes floatB {
  to {
    transform: translate(40px, -40px) scale(0.9);
  }
}

@keyframes floatC {
  to {
    transform: translate(-30px, 50px) rotate(45deg);
  }
}

/* ===== NAV LINK UNDERLINE ===== */
.nav-links a[data-num]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}

.nav-links a[data-num]:hover::after,
.nav-links a[data-num].active::after {
  width: 100%;
}

/* ===== CARD SHINE SWEEP ===== */
.project-card::after,
.about-card::after,
.exp-card::after,
.contact-form::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.6s var(--ease);
  pointer-events: none;
}

.project-card:hover::after,
.about-card:hover::after,
.exp-card:hover::after,
.contact-form:hover::after {
  left: 120%;
}

.about-card,
.exp-card,
.contact-form {
  position: relative;
  overflow: hidden;
}

/* ===== IMAGE DECORATIVE FRAME ===== */
.img-frame::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px dashed var(--accent-light);
  border-radius: calc(var(--radius) + 4px);
  opacity: 0.4;
  z-index: -1;
  animation: dashRotate 30s linear infinite;
}

@keyframes dashRotate {
  to {
    stroke-dashoffset: -1000;
  }
}

.img-frame::after {
  content:'{}';
  position: absolute;
  top: -14px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--bg);
  padding: 0 8px;
  font-weight: 700;
}

/* ===== SECTION HEADER POLISH ===== */
.section-num::before {
  content: '//';
  margin-right: 4px;
  opacity: 0.5;
}

.section-line {
  position: relative;
  overflow: hidden;
}

.section-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    left: -100%
  }

  50% {
    left: 100%
  }

  100% {
    left: 100%
  }
}

/* ===== SKILL PILL STAGGER ===== */
.skills-row .skill-pill {
  opacity: 0;
  transform: translateY(16px);
}

.skills-orbit.visible .skill-pill {
  animation: pillIn 0.5s var(--ease) forwards;
}

.skills-orbit.visible .skill-pill:nth-child(1) {
  animation-delay: 0.05s;
}

.skills-orbit.visible .skill-pill:nth-child(2) {
  animation-delay: 0.1s;
}

.skills-orbit.visible .skill-pill:nth-child(3) {
  animation-delay: 0.15s;
}

.skills-orbit.visible .skill-pill:nth-child(4) {
  animation-delay: 0.2s;
}

.skills-orbit.visible .skill-pill:nth-child(5) {
  animation-delay: 0.25s;
}

.skills-orbit.visible .skill-pill:nth-child(6) {
  animation-delay: 0.3s;
}

.skills-orbit.visible .skill-pill:nth-child(7) {
  animation-delay: 0.35s;
}

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

/* ===== ENHANCED CODE CARD ===== */
.code-card {
  position: relative;
}

.code-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-light), transparent 40%, transparent 60%, var(--amber));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s;
}

.code-card:hover::before {
  opacity: 0.3;
}

/* ===== TERMINAL TYPING ===== */
.terminal-cmd {
  overflow: hidden;
  border-right: 2px solid var(--emerald);
  white-space: nowrap;
  animation: termType 1.5s steps(6) 0.3s forwards, termBlink 0.8s step-end infinite;
  width: 0;
  display: inline-block;
  vertical-align: bottom;
}

@keyframes termType {
  to {
    width: 6ch;
  }
}

@keyframes termBlink {

  0%,
  100% {
    border-color: var(--emerald)
  }

  50% {
    border-color: transparent
  }
}

/* ===== STAT CHIP PULSE ON HOVER ===== */
.stat-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.stat-chip {
  position: relative;
  overflow: hidden;
}

.stat-chip:hover::before {
  opacity: 0.04;
}

/* ===== SMOOTH LINK ARROW BOUNCE ===== */
.project-link:hover {
  animation: arrowBounce 0.5s ease;
}

@keyframes arrowBounce {

  0%,
  100% {
    transform: translateX(0)
  }

  50% {
    transform: translateX(4px)
  }
}

/* ===== CONTACT CHIP ICON SPIN ===== */
.contact-chip:hover svg {
  animation: iconPop 0.4s var(--ease);
}

@keyframes iconPop {
  0% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.2) rotate(-8deg)
  }

  100% {
    transform: scale(1)
  }
}

/* ===== EDU DOT PULSE ===== */
.edu-dot {
  position: relative;
}

.edu-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: dotPulse 2.5s ease-in-out infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.8)
  }

  50% {
    opacity: 0.4;
    transform: scale(1.3)
  }
}


/* ===== NOISE TEXTURE OVERLAY ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%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-repeat: repeat;
  background-size: 128px 128px;
}

/* ===== SCROLL DOWN INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scrollFade 2s ease-in-out infinite;
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}

@keyframes scrollFade {

  0%,
  100% {
    opacity: 0.4
  }

  50% {
    opacity: 1
  }
}

@keyframes scrollDrop {
  0% {
    height: 0;
    opacity: 0
  }

  50% {
    height: 32px;
    opacity: 1
  }

  100% {
    height: 32px;
    opacity: 0
  }
}

/* ===== HERO SOCIALS ===== */
.hero-socials {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.15);
}

/* ===== FOOTER TERMINAL ===== */
.footer-terminal {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 14px 20px;
  margin-bottom: 24px;
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xs);
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-prompt {
  color: var(--emerald);
  font-weight: 600;
}

.footer-cmd {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== ABOUT IMAGE TILT ===== */
.img-frame {
  transition: transform 0.5s var(--ease);
}

.img-frame:hover {
  transform: rotate(-2deg) scale(1.02);
}

.img-frame:hover img {
  box-shadow: var(--shadow-lg);
}

/* ===== SELECTION COLOR ===== */
::selection {
  background: rgba(108, 92, 231, 0.2);
  color: var(--text);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent-light);
  border-radius: 8px;
}

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

/* ===== FOCUS STYLES ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {

  .navbar,
  .scroll-progress,
  .back-to-top,
  .cursor-glow,
  .grid-bg,
  .floating-shapes,
  .noise-overlay,
  .scroll-indicator {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    page-break-inside: avoid;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-indicator,
  .floating-shapes {
    display: none;
  }
}

/* ===== MOBILE SCROLL INDICATOR HIDE ===== */
@media (max-width:768px) {
  .scroll-indicator {
    display: none;
  }

  .hero-socials {
    margin-top: 20px;
  }
}