﻿/* =========================================================
   RASEL — Portfolio Redesign
   Awwwards-grade design system: cohesive, premium, refined
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --accent: #54c5f8;
  --accent-deep: #2e7bff;
  --accent-violet: #a872ff;
  --accent-pink: #ec4899;
  --accent-cyan: #5ef0ff;

  /* Surfaces */
  --bg: #05070e;
  --bg-soft: #080b16;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #eef2f8;
  --text-2: #9aa7b8;
  --text-3: #5b6675;

  /* Gradients */
  --gradient: linear-gradient(120deg, #54c5f8 0%, #a872ff 100%);
  --gradient-soft: linear-gradient(135deg, rgba(84, 197, 248, 0.12), rgba(168, 114, 255, 0.08));
  --glow-blue: 0 0 50px rgba(84, 197, 248, 0.22);
  --glow-violet: 0 0 50px rgba(168, 114, 255, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.25s;
  --t: 0.45s;
  --t-slow: 0.8s;

  /* Radius & layout */
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1280px;

  /* Type */
  --font-display: "Space Grotesk", "Outfit", sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  cursor: none;
  position: relative;
}

/* Ambient color washes for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 80% -10%, rgba(168, 114, 255, 0.10), transparent 60%),
    radial-gradient(50vw 50vw at 0% 30%, rgba(84, 197, 248, 0.08), transparent 55%),
    radial-gradient(40vw 40vw at 50% 110%, rgba(46, 123, 255, 0.08), transparent 60%);
}

/* Subtle film grain for premium texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a,
button,
input {
  cursor: none;
}

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

::selection {
  background: rgba(84, 197, 248, 0.3);
  color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent-violet));
  border-radius: 10px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------- Custom Cursor ---------- */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: width 0.25s, height 0.25s, background 0.25s;
}
.cursor-outline {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(84, 197, 248, 0.45);
  transition: width 0.25s, height 0.25s, background 0.25s, border-color 0.25s, opacity 0.25s;
}
.cursor-dot.active {
  width: 11px;
  height: 11px;
  background: var(--accent-cyan);
  box-shadow: 0 0 18px var(--accent-cyan);
}
.cursor-outline.active {
  width: 64px;
  height: 64px;
  background: rgba(84, 197, 248, 0.08);
  border-color: rgba(94, 240, 255, 0.55);
}
.cursor-outline.hover-label {
  width: 78px;
  height: 78px;
  background: var(--gradient);
  mix-blend-mode: screen;
  border-color: transparent;
}

/* ---------- 3D Canvas Background ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-name {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  gap: 2px;
}
.preloader-name span {
  display: inline-block;
  opacity: 0;
  transform: translateY(120%);
  animation: preletter 0.6s var(--ease) forwards;
}
.preloader-name .br {
  color: var(--accent);
}
@keyframes preletter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.preloader-bar {
  width: min(280px, 60vw);
  height: 2px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.preloader-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gradient);
  transition: width 0.2s linear;
}
.preloader-count {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-2);
  letter-spacing: 2px;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 1500;
  box-shadow: 0 0 14px rgba(84, 197, 248, 0.5);
  transition: width 0.1s linear;
}

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 74px;
  display: flex;
  align-items: center;
  background: rgba(6, 9, 18, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t), height var(--t);
}
#navbar.scrolled {
  background: rgba(6, 9, 18, 0.85);
  border-bottom-color: var(--border);
  height: 66px;
}
.nav-container {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}
.logo-bracket {
  color: var(--accent);
}
.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.15rem;
}
.nav-link {
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.3s var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 55%;
}
.nav-ai {
  background: var(--gradient-soft);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  color: var(--accent) !important;
}
.nav-ai:hover {
  border-color: var(--accent);
  box-shadow: var(--glow-blue);
}
.nav-ai::after {
  display: none;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  margin-left: 0.5rem;
  transition: transform var(--t), background var(--t), color var(--t);
}
.theme-toggle:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  color: var(--accent);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  margin-left: 0.5rem;
}
.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--t);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Layout primitives ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(80px, 11vw, 150px) 0;
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2rem;
}
.section-header {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 80px);
  position: relative;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(84, 197, 248, 0.08);
  border: 1px solid rgba(84, 197, 248, 0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 1.1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.section-index {
  font-family: var(--font-mono);
  color: var(--text-3);
  font-size: 0.78rem;
  margin-left: 2px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 1.1rem;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-line {
  width: 64px;
  height: 3px;
  background: var(--gradient);
  border-radius: 4px;
  margin: 0 auto;
}
.section-sub {
  color: var(--text-2);
  font-size: 1.02rem;
  margin-top: 0.8rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Hero ---------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 120px 2rem 70px;
  overflow: hidden;
}
.hero-content {
  max-width: var(--maxw);
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(84, 197, 248, 0.08);
  border: 1px solid rgba(84, 197, 248, 0.28);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  margin-bottom: 1.6rem;
  animation: fadeInDown 0.9s var(--ease) both;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px #22c55e; }
  50% { opacity: 0.55; box-shadow: 0 0 20px #22c55e; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -2px;
  margin-bottom: 1.6rem;
  animation: fadeInUp 0.9s 0.15s var(--ease) both;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 2.4rem;
  animation: fadeInUp 0.9s 0.3s var(--ease) both;
}
.hero-subtitle strong {
  color: var(--accent);
  font-weight: 600;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.9s 0.45s var(--ease) both;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  animation: fadeInUp 0.9s 0.6s var(--ease) both;
}
.stat-item {
  text-align: left;
}
.stat-number {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-family: var(--font-mono);
  letter-spacing: -1px;
}
.stat-number span {
  color: var(--accent);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
  display: block;
}
.stat-divider {
  width: 1px;
  height: 42px;
  background: var(--border);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.btn svg {
  transition: transform var(--t);
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 30px rgba(46, 123, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(46, 123, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover svg {
  transform: translateX(4px);
}
.btn-secondary {
  background: rgba(84, 197, 248, 0.06);
  color: var(--accent);
  border-color: rgba(84, 197, 248, 0.35);
}
.btn-secondary:hover {
  transform: translateY(-4px);
  background: rgba(84, 197, 248, 0.12);
  border-color: var(--accent);
  box-shadow: var(--glow-blue);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- Hero 3D Photo ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
  animation: fadeInRight 1s 0.3s var(--ease) both;
}
.photo-3d-wrapper {
  perspective: 1200px;
  width: min(420px, 80vw);
  height: 500px;
}
.photo-3d-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: heroFloat 7s ease-in-out infinite;
  transition: transform 0.15s ease;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotateX(3deg) rotateY(-5deg); }
  25% { transform: translateY(-16px) rotateX(-2deg) rotateY(5deg); }
  50% { transform: translateY(-22px) rotateX(3deg) rotateY(3deg); }
  75% { transform: translateY(-8px) rotateX(-1deg) rotateY(-3deg); }
}
.photo-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 380px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(84, 197, 248, 0.5);
  box-shadow: 0 0 60px rgba(84, 197, 248, 0.28), 0 0 120px rgba(168, 114, 255, 0.15),
    inset 0 0 30px rgba(84, 197, 248, 0.12);
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 7, 14, 0.55), transparent 55%);
}
.photo-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid;
  animation: ringRotate linear infinite;
}
.ring-1 {
  width: 380px; height: 380px;
  border-color: rgba(84, 197, 248, 0.22);
  animation-duration: 9s;
}
.ring-2 {
  width: 440px; height: 440px;
  border-color: rgba(168, 114, 255, 0.16);
  animation-duration: 13s;
  animation-direction: reverse;
}
.ring-3 {
  width: 500px; height: 500px;
  border-color: rgba(84, 197, 248, 0.09);
  animation-duration: 17s;
}
@keyframes ringRotate {
  from { transform: translate(-50%, -50%) rotate(0); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.floating-badge {
  position: absolute;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  animation: badgeFloat ease-in-out infinite;
}
.floating-badge img { width: 22px; height: 22px; }
.badge-flutter {
  top: 8%; right: -24px;
  border-color: rgba(84, 197, 248, 0.45);
  animation-duration: 4s;
}
.badge-firebase {
  bottom: 22%; right: -34px;
  border-color: rgba(255, 160, 0, 0.45);
  animation-duration: 5s;
  animation-delay: 1s;
}
.badge-dart {
  bottom: 9%; left: -22px;
  border-color: rgba(84, 197, 248, 0.45);
  animation-duration: 4.5s;
  animation-delay: 0.5s;
}
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marqueeScroll 26s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-item {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(154, 167, 184, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
}
.marquee-item::after {
  content: "✳";
  -webkit-text-stroke: 0;
  color: var(--accent);
  font-size: 1rem;
}
.marquee-item.alt {
  color: var(--text);
  -webkit-text-stroke: 0;
}
@keyframes marqueeScroll {
  to { transform: translateX(-50%); }
}

@keyframes scrollAnim {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ---------- Reveal animations ---------- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(44px); }
  to { opacity: 1; transform: translateX(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-46px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.4s; }

/* ---------- Card glow fx ---------- */
.project-card::after,
.skill-category-card::after,
.contact-card::after,
.edu-card::after,
.service-card::after,
.highlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(84, 197, 248, 0.13), transparent 42%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  border-radius: inherit;
}
.project-card:hover::after,
.skill-category-card:hover::after,
.contact-card:hover::after,
.edu-card:hover::after,
.service-card:hover::after,
.highlight-card:hover::after {
  opacity: 1;
}
.project-card-inner,
.skill-category-card > *,
.contact-card > *,
.edu-card > *,
.service-card > * {
  position: relative;
  z-index: 1;
}

/* ---------- About ---------- */
.about-section { position: relative; }
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.about-image-col { position: relative; }
.about-photo-frame {
  position: relative;
  border-radius: 26px;
  overflow: visible;
  transform-style: preserve-3d;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 640px;
  max-height: 840px;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s var(--ease);
}
.about-photo-frame:hover .about-photo {
  transform: scale(1.025);
}
.about-photo-decoration {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(84, 197, 248, 0.25);
  border-radius: 22px;
  z-index: -1;
}
.experience-card {
  position: absolute;
  bottom: -22px;
  right: -22px;
  background: var(--gradient);
  color: #fff;
  padding: 16px 24px;
  border-radius: 18px;
  box-shadow: 0 20px 44px rgba(46, 123, 255, 0.4);
  text-align: center;
  animation: badgeFloat 4s ease-in-out infinite;
}
.exp-number {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1;
}
.exp-label { font-size: 0.72rem; opacity: 0.92; }
.about-intro {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.about-intro strong { color: var(--accent); }
.about-body {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.about-body strong { color: var(--accent); }
.about-body em {
  color: var(--accent-violet);
  font-style: normal;
  font-weight: 600;
}
.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}
.highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t), background var(--t);
  position: relative;
  overflow: hidden;
}
.highlight-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--t);
}
.highlight-card:hover {
  transform: translateX(8px);
  border-color: rgba(84, 197, 248, 0.45);
  background: var(--surface-2);
  box-shadow: var(--glow-blue);
}
.highlight-card:hover::before { opacity: 1; }
.highlight-icon { font-size: 1.5rem; flex-shrink: 0; }
.highlight-card strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 3px;
}
.highlight-card p { font-size: 0.86rem; color: var(--text-2); margin: 0; }
.about-cta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* ---------- Experience ---------- */
.experience-section .about-highlights { max-width: 760px; margin: 0 auto; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t), background var(--t);
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(84, 197, 248, 0.45);
  background: var(--surface-2);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.4), var(--glow-blue);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(84, 197, 248, 0.1);
  border: 1px solid rgba(84, 197, 248, 0.2);
  margin-bottom: 1.1rem;
  font-size: 1.3rem;
  transition: transform var(--t);
}
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
}
.service-card p {
  color: var(--text-2);
  line-height: 1.75;
  font-size: 0.94rem;
}

/* ---------- Skills ---------- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-bottom: 2.6rem;
}
.skill-category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  cursor: default;
  position: relative;
  transform-style: preserve-3d;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.skill-category-card > * { transform: translateZ(36px); }
.skill-category-card:hover {
  border-color: rgba(84, 197, 248, 0.5);
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.45), var(--glow-blue);
}
.skill-cat-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.skill-category-card h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  background: rgba(84, 197, 248, 0.07);
  border: 1px solid rgba(84, 197, 248, 0.22);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 100px;
  font-family: var(--font-mono);
  transition: transform var(--t-fast), background var(--t-fast);
}
.skill-tag:hover {
  background: rgba(84, 197, 248, 0.18);
  transform: scale(1.06);
}
.skill-tag.expert {
  background: rgba(46, 123, 255, 0.32);
  border-color: var(--accent-deep);
  color: #fff;
  box-shadow: 0 0 16px rgba(46, 123, 255, 0.4);
}
.skill-bars-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
}
.skill-bar-item { margin-bottom: 24px; }
.skill-bar-item:last-child { margin-bottom: 0; }
.skill-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 0.92rem;
  font-weight: 600;
}
.skill-bar-header span:last-child {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}
.skill-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 8px;
  width: 0%;
  transition: width 1.5s var(--ease-soft);
  box-shadow: 0 0 14px rgba(84, 197, 248, 0.55);
  position: relative;
}
.skill-bar-fill::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 100%;
  background: rgba(255, 255, 255, 0.4);
  filter: blur(6px);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  position: relative;
  transform-style: preserve-3d;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: default;
}
.project-card-inner {
  transform: translateZ(36px);
  transform-style: preserve-3d;
}
.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--t);
}
.project-card:hover {
  border-color: rgba(84, 197, 248, 0.5);
  transform: translateY(-10px) rotateX(3deg);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.5), var(--glow-blue);
}
.project-card:hover::before { opacity: 1; }
.project-card.featured {
  border-color: rgba(168, 114, 255, 0.35);
  background: linear-gradient(135deg, var(--surface), rgba(168, 114, 255, 0.06));
}
.project-card.featured:hover {
  border-color: var(--accent-violet);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.5), var(--glow-violet);
}
.featured-badge {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 100px;
  font-family: var(--font-mono);
  z-index: 2;
}
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}
.project-emoji { font-size: 2.4rem; }
.project-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.project-tech-chips span {
  background: rgba(84, 197, 248, 0.08);
  border: 1px solid rgba(84, 197, 248, 0.25);
  color: var(--accent);
  font-size: 0.72rem;
  padding: 4px 11px;
  border-radius: 100px;
  font-family: var(--font-mono);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.project-tech-chips span:hover {
  background: rgba(84, 197, 248, 0.18);
  border-color: var(--accent);
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.project-problem, .project-solution { margin-bottom: 12px; }
.problem-label, .solution-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 100px;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.problem-label {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.solution-label {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.project-problem p, .project-solution p {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.65;
}
.project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 1rem 0;
}
.feature-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  padding: 5px 13px;
  border-radius: 100px;
  color: var(--text-2);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.feature-pill:hover {
  border-color: rgba(84, 197, 248, 0.45);
  color: var(--accent);
  background: rgba(84, 197, 248, 0.07);
}
.impact-banner {
  background: linear-gradient(135deg, rgba(168, 114, 255, 0.16), rgba(84, 197, 248, 0.1));
  border: 1px solid rgba(168, 114, 255, 0.35);
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 0.85rem;
  color: var(--text);
  margin: 1rem 0;
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}
.project-link,
.project-demo {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--t-fast), letter-spacing var(--t-fast), transform var(--t-fast);
}
.project-demo {
  padding: 6px 12px;
  border: 1px solid rgba(84, 197, 248, 0.25);
  border-radius: 999px;
  background: rgba(84, 197, 248, 0.08);
}
.project-demo[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.7;
}
.project-link:hover,
.project-demo:hover { color: var(--accent-cyan); letter-spacing: 0.4px; }
.project-demo:hover { transform: translateY(-1px); }
.project-github { color: var(--text-2); transition: color var(--t-fast), transform var(--t-fast); }
.project-github:hover { color: var(--accent); transform: scale(1.2); }

/* ---------- Education Timeline ---------- */
.edu-timeline-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0 30px;
}
.edu-vline {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--accent-deep) 15%, var(--accent) 50%, var(--accent-violet) 85%, transparent);
  opacity: 0.5;
  box-shadow: 0 0 12px rgba(84, 197, 248, 0.4);
}
.edu-entry {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 56px;
  width: 100%;
}
.edu-entry:last-child { margin-bottom: 0; }
.edu-entry--left { justify-content: flex-start; padding-right: calc(50% + 40px); }
.edu-entry--right { justify-content: flex-end; padding-left: calc(50% + 40px); }
.edu-dot {
  position: absolute;
  left: 50%; top: 20px;
  transform: translateX(-50%);
  width: 52px; height: 52px;
  background: rgba(10, 14, 26, 0.9);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 2;
  box-shadow: 0 0 0 6px rgba(84, 197, 248, 0.08), 0 0 20px rgba(84, 197, 248, 0.3);
  animation: dotPulse 3s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(84,197,248,0.08), 0 0 20px rgba(84,197,248,0.3); }
  50% { box-shadow: 0 0 0 10px rgba(84,197,248,0.04), 0 0 40px rgba(84,197,248,0.5); }
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  width: 100%;
  position: relative;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  transform-style: preserve-3d;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: default;
}
.edu-card > * { transform: translateZ(30px); }
.edu-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--t);
  border-radius: var(--radius) var(--radius) 0 0;
}
.edu-card:hover {
  border-color: rgba(84, 197, 248, 0.5);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4), var(--glow-blue);
  transform: translateY(-6px);
}
.edu-card:hover::before { opacity: 1; }
.edu-entry--left .edu-card::after {
  content: "";
  position: absolute;
  top: 30px; right: -10px;
  border: 10px solid transparent;
  border-left-color: var(--border);
}
.edu-entry--right .edu-card::after {
  content: "";
  position: absolute;
  top: 30px; left: -10px;
  border: 10px solid transparent;
  border-right-color: var(--border);
}
.edu-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.edu-year-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(84, 197, 248, 0.1);
  border: 1px solid rgba(84, 197, 248, 0.3);
  padding: 4px 14px;
  border-radius: 100px;
}
.edu-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.edu-status.current {
  background: rgba(84, 197, 248, 0.15);
  color: var(--accent);
  border: 1px solid rgba(84, 197, 248, 0.4);
  animation: statusGlow 2s ease-in-out infinite;
}
@keyframes statusGlow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(84, 197, 248, 0.4); }
}
.edu-status.completed {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.edu-degree {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}
.edu-institution {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.edu-institution strong { color: var(--accent); font-size: 0.95rem; }
.edu-location { font-size: 0.82rem; color: var(--text-3); }
.edu-desc { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; margin-bottom: 16px; }
.edu-desc em { color: var(--accent-violet); font-style: normal; font-weight: 600; }
.edu-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.edu-tags span {
  background: rgba(84, 197, 248, 0.06);
  border: 1px solid rgba(84, 197, 248, 0.18);
  color: var(--text-2);
  font-size: 0.76rem;
  padding: 4px 12px;
  border-radius: 100px;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.edu-tags span:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(84, 197, 248, 0.12);
}

/* ---------- AI Assistant ---------- */
.ai-chat-container {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), var(--glow-blue);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ai-chat-header {
  background: linear-gradient(135deg, rgba(84, 197, 248, 0.12), rgba(168, 114, 255, 0.08));
  border-bottom: 1px solid var(--border);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-avatar { position: relative; width: 46px; height: 46px; }
.ai-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.ai-online-dot {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 12px; height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--bg-soft);
  box-shadow: 0 0 8px #22c55e;
}
.ai-header-info { flex: 1; display: flex; flex-direction: column; }
.ai-header-info strong { font-size: 0.98rem; font-weight: 600; }
.ai-header-info span { font-size: 0.78rem; color: var(--text-2); }
.ai-header-badge {
  background: var(--gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}
.ai-messages {
  padding: 22px;
  min-height: 300px;
  max-height: 460px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ai-message { display: flex; flex-direction: column; gap: 8px; }
.ai-message.bot { align-items: flex-start; }
.ai-message.user { align-items: flex-end; }
.ai-message-bubble {
  max-width: 82%;
  padding: 13px 17px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
  animation: messagePop 0.3s var(--ease);
}
@keyframes messagePop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.ai-message.bot .ai-message-bubble {
  background: rgba(84, 197, 248, 0.08);
  border: 1px solid rgba(84, 197, 248, 0.2);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.ai-message.user .ai-message-bubble {
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ai-suggestion-btn {
  background: rgba(84, 197, 248, 0.07);
  border: 1px solid rgba(84, 197, 248, 0.28);
  color: var(--accent);
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 500;
  transition: transform var(--t-fast), background var(--t-fast);
}
.ai-suggestion-btn:hover { background: rgba(84, 197, 248, 0.18); transform: translateY(-2px); }
.ai-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 16px;
}
.ai-qa-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(84, 197, 248, 0.14);
  border-radius: 16px;
  padding: 16px 15px;
}
.ai-qa-question { font-size: 0.86rem; font-weight: 700; margin-bottom: 0.7rem; }
.ai-qa-answer { color: var(--text-2); line-height: 1.7; font-size: 0.88rem; }
.ai-typing {
  display: flex;
  gap: 4px;
  padding: 13px 17px;
  background: rgba(84, 197, 248, 0.08);
  border: 1px solid rgba(84, 197, 248, 0.2);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.ai-typing span {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-8px); opacity: 1; }
}
.ai-input-row {
  display: flex;
  gap: 12px;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.ai-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  color: var(--text);
  font-size: 0.92rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.ai-input::placeholder { color: var(--text-3); }
.ai-input:focus {
  border-color: var(--accent);
  background: rgba(84, 197, 248, 0.05);
  box-shadow: 0 0 20px rgba(84, 197, 248, 0.15);
}
.ai-send-btn {
  width: 48px; height: 48px;
  background: var(--gradient);
  border: none;
  border-radius: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t), box-shadow var(--t);
  flex-shrink: 0;
}
.ai-send-btn:hover { transform: scale(1.08) rotate(12deg); box-shadow: 0 8px 24px rgba(46, 123, 255, 0.5); }
.ai-send-btn.loading { opacity: 0.6; pointer-events: none; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 22px;
  text-align: center;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  transform-style: preserve-3d;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.contact-card > * { transform: translateZ(26px); }
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35), var(--glow-blue);
}
.contact-card-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}
.contact-card h3 {
  font-size: 0.8rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color var(--t-fast);
  word-break: break-word;
}
.contact-link:hover { color: var(--accent-cyan); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: rgba(6, 9, 18, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
}
.footer p { color: var(--text-3); font-size: 0.86rem; }
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--accent); }

/* ---------- Section dividers ---------- */
.section + .section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-2), transparent);
  pointer-events: none;
}

/* ---------- Avatar Man (refined) ---------- */
.avatar-man {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center bottom;
  --tx: calc(-50vw + 60px);
  --ty: -35vh;
  --s: 1.6;
  transform: translateX(var(--tx)) translateY(var(--ty)) scale(var(--s));
  pointer-events: none;
}
.avatar-man.sitting { --tx: 0px; --ty: 0px; --s: 0.85; }
.avatar-speech {
  background: var(--surface-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent);
  padding: 11px 16px;
  border-radius: 16px;
  border-bottom-right-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 22px;
  box-shadow: var(--glow-blue);
  opacity: 1;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: auto;
}
.avatar-man.sitting .avatar-speech {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.avatar-body-wrapper { position: relative; width: 60px; height: 120px; }
.avatar-head {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 44px;
  background: #ffd1b3;
  border-radius: 50%;
  z-index: 3;
  transition: transform 0.5s;
}
.avatar-hair {
  position: absolute;
  top: -4px; left: -2px;
  width: 48px; height: 24px;
  background: #1e293b;
  border-radius: 20px 20px 0 0;
}
.avatar-eye {
  position: absolute;
  top: 18px;
  width: 6px; height: 6px;
  background: #0f172a;
  border-radius: 50%;
  animation: blink 4s infinite;
}
.avatar-eye.left { left: 10px; }
.avatar-eye.right { right: 10px; }
.avatar-mouth {
  position: absolute;
  top: 28px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 6px;
  background: #ef4444;
  border-radius: 0 0 10px 10px;
}
.avatar-torso {
  position: absolute;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 45px;
  background: var(--accent-deep);
  border-radius: 12px;
  z-index: 2;
  transition: transform 0.5s;
}
.avatar-arm {
  position: absolute;
  top: 45px;
  width: 12px; height: 40px;
  background: var(--accent);
  border-radius: 6px;
  transform-origin: top center;
  z-index: 1;
  transition: transform 0.5s;
}
.avatar-arm.left-arm { left: -2px; transform: rotate(20deg); }
.avatar-arm.right-arm { right: -2px; transform: rotate(-25deg); animation: wave 2s infinite; }
.avatar-leg {
  position: absolute;
  top: 75px;
  width: 14px; height: 45px;
  background: #334155;
  border-radius: 6px;
  transform-origin: top center;
  transition: all 0.5s;
}
.avatar-leg.left-leg { left: 14px; }
.avatar-leg.right-leg { right: 14px; }
.avatar-laptop {
  position: absolute;
  top: 50px; left: 50%;
  transform: translateX(-50%) translateZ(20px) scale(0);
  font-size: 2rem;
  z-index: 4;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.avatar-man.sitting .avatar-leg.left-leg { transform: rotate(-90deg) translateY(-8px) translateX(12px); }
.avatar-man.sitting .avatar-leg.right-leg { transform: rotate(-90deg) translateY(8px) translateX(12px); }
.avatar-man.sitting .avatar-arm.right-arm { animation: none; transform: rotate(-70deg) translate(-5px, 5px); }
.avatar-man.sitting .avatar-arm.left-arm { transform: rotate(70deg) translate(5px, 5px); }
.avatar-man.sitting .avatar-head { transform: translateX(-50%) translateY(15px); }
.avatar-man.sitting .avatar-torso { transform: translateX(-50%) translateY(15px); }
.avatar-man.sitting .avatar-laptop { transform: translateX(-50%) translateZ(20px) scale(1) translateY(12px); }
@keyframes wave {
  0%, 100% { transform: rotate(-25deg); }
  50% { transform: rotate(-140deg); }
}
@keyframes blink {
  0%, 96%, 100% { transform: scaleY(1); }
  98% { transform: scaleY(0.1); }
}

/* ---------- Light Theme ---------- */
body.light-theme {
  --bg: #f4f7fc;
  --bg-soft: #e9eff8;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-2: rgba(255, 255, 255, 0.9);
  --border: rgba(15, 23, 42, 0.1);
  --border-2: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --gradient: linear-gradient(120deg, #0ea5e9 0%, #7c3aed 100%);
  --glow-blue: 0 0 50px rgba(14, 165, 233, 0.18);
  --glow-violet: 0 0 50px rgba(124, 58, 237, 0.18);
}
body.light-theme::before { opacity: 0.5; }
body.light-theme .hero-photo,
body.light-theme .about-photo { border-color: var(--border-2); }
body.light-theme .photo-frame { border-color: rgba(14, 165, 233, 0.4); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 44px; }
  .hero-subtitle { margin: 0 auto 2rem; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .photo-3d-wrapper { width: 320px; height: 380px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image-col { display: none; }
  .skills-categories { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .marquee-item { font-size: 1.2rem; }
}
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 66px; left: 0; right: 0;
    background: rgba(6, 9, 18, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.2rem;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; text-align: center; padding: 0.8rem; }
  .nav-link::after { display: none; }
  .skills-categories { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .floating-badge { display: none; }
  .edu-entry--left, .edu-entry--right {
    flex-direction: column;
    padding-left: 56px;
    padding-right: 0;
    text-align: left;
  }
  .edu-entry--right .edu-card { margin-left: 0; }
  .edu-entry--left .edu-card { margin-right: 0; }
  .edu-dot { left: 0 !important; right: auto !important; transform: translateX(0) !important; }
  .edu-vline { left: 26px; }
  .edu-entry--left .edu-card::after,
  .edu-entry--right .edu-card::after { display: none; }
}
@media (max-width: 480px) {
  .hero-section { padding: 100px 1rem 60px; }
  .section { padding: 64px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .edu-entry--left, .edu-entry--right { padding-left: 44px; }
  .avatar-man { right: 14px; bottom: 14px; --tx: calc(-50vw + 35px); --s: 1.2; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left { opacity: 1; transform: none; }
}
