/* ==========================================================================
   VEDANT THAKARE - MODERN ANIMATED PORTFOLIO STYLESHEET
   Dark & White High-Contrast Theme System with Smooth Micro-Interactions
   ========================================================================== */

/* --- CSS Reset & Global Custom Properties --- */
:root {
  /* Color Palette - Midnight Navy & Neon Blue/Purple Tech System */
  --bg-primary: #050816;
  --bg-secondary: #090e24;
  --bg-tertiary: #0f1738;
  --bg-card: rgba(12, 18, 44, 0.72);
  --bg-card-hover: rgba(18, 28, 64, 0.88);
  --bg-input: rgba(8, 12, 30, 0.85);
  --bg-badge: rgba(59, 130, 246, 0.12);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverted: #050816;

  /* Accent Colors matching reference UI */
  --accent: #2563eb;
  --accent-light: #38bdf8;
  --accent-cyan: #0ea5e9;
  --accent-purple: #8b5cf6;
  --accent-secondary: #8b5cf6;
  --accent-magenta: #ec4899;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.45);
  --accent-purple-glow: rgba(139, 92, 246, 0.4);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb, #8b5cf6);
  --gradient-purple: linear-gradient(135deg, #8b5cf6, #ec4899);
  --gradient-cyan-blue: linear-gradient(135deg, #0ea5e9, #3b82f6);
  --gradient-name: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-border: linear-gradient(135deg, #0ea5e9, #3b82f6 35%, #8b5cf6 70%, #ec4899 100%);

  --border-subtle: rgba(59, 130, 246, 0.18);
  --border-medium: rgba(59, 130, 246, 0.32);
  --border-highlight: rgba(139, 92, 246, 0.5);

  --card-shadow: 0 16px 40px -12px rgba(2, 6, 23, 0.7);
  --card-shadow-hover: 0 24px 50px -12px rgba(59, 130, 246, 0.25);
  --nav-backdrop: rgba(5, 8, 22, 0.85);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-code: 'Fira Code', monospace;

  /* Layout & Transitions */
  --header-height: 80px;
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Scrollbar */
  scrollbar-color: rgba(59, 130, 246, 0.35) var(--bg-primary);
  scrollbar-width: thin;
}

/* Light Theme Variables Override - Cool Red RGB Palette */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --bg-badge: rgba(225, 29, 72, 0.08);

  --text-primary: #090d24;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  /* Cool Red RGB Accent System */
  --accent: rgb(225, 29, 72);
  --accent-light: rgb(244, 63, 94);
  --accent-dark: rgb(190, 18, 60);
  --accent-glow: rgba(225, 29, 72, 0.35);
  --accent-purple: rgb(217, 70, 239);
  --accent-secondary: rgb(244, 63, 94);

  --gradient-primary: linear-gradient(135deg, rgb(225, 29, 72), rgb(244, 63, 94));
  --gradient-name: linear-gradient(135deg, #090d24 15%, rgb(225, 29, 72) 60%, rgb(244, 63, 94) 100%);
  --gradient-border: linear-gradient(135deg, rgb(244, 63, 94), rgb(225, 29, 72) 50%, rgb(217, 70, 239) 100%);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(225, 29, 72, 0.25);
  --border-highlight: rgba(244, 63, 94, 0.4);

  --card-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.07);
  --card-shadow-hover: 0 20px 40px -10px rgba(225, 29, 72, 0.18);
  --nav-backdrop: rgba(255, 255, 255, 0.88);

  scrollbar-color: rgba(225, 29, 72, 0.35) var(--bg-primary);
}

/* --- High-Contrast Light Theme Component Overrides (Cool Red RGB) --- */
[data-theme="light"] body::before {
  background-image: 
    linear-gradient(to right, rgba(225, 29, 72, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(225, 29, 72, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .hero-description {
  color: #334155;
}

[data-theme="light"] .hero-description strong {
  color: rgb(190, 18, 60);
  font-weight: 700;
}

[data-theme="light"] .hero-greeting {
  color: #1e293b;
}

[data-theme="light"] .status-badge {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: 0 2px 12px rgba(225, 29, 72, 0.1);
}

[data-theme="light"] .status-text {
  color: rgb(190, 18, 60);
  font-weight: 700;
}

[data-theme="light"] .status-dot {
  background-color: rgb(225, 29, 72);
  box-shadow: 0 0 8px rgb(225, 29, 72);
}

[data-theme="light"] .status-dot::after {
  background-color: rgba(225, 29, 72, 0.3);
}

[data-theme="light"] .typewriter-prefix {
  color: rgb(225, 29, 72);
}

[data-theme="light"] .typewriter-text {
  color: rgb(190, 18, 60);
  text-shadow: none;
}

[data-theme="light"] .typewriter-cursor {
  color: rgb(244, 63, 94);
}

[data-theme="light"] .nav-link.active {
  background: rgb(225, 29, 72);
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.4);
  color: #ffffff !important;
}

[data-theme="light"] .nav-link:hover {
  color: rgb(225, 29, 72);
  background: rgba(225, 29, 72, 0.08);
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

[data-theme="light"] .btn-outline {
  background: #ffffff;
  color: rgb(225, 29, 72);
  border-color: rgb(225, 29, 72);
}

[data-theme="light"] .btn-outline:hover {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgb(190, 18, 60);
  color: rgb(190, 18, 60);
}

[data-theme="light"] .social-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

[data-theme="light"] .social-btn:hover {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
}

[data-theme="light"] .floating-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(225, 29, 72, 0.25);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 0 15px rgba(225, 29, 72, 0.1);
}

[data-theme="light"] .badge-title {
  color: #090d24;
}

[data-theme="light"] .badge-sub {
  color: #64748b;
}

[data-theme="light"] .stat-badge-num {
  color: #090d24;
}

[data-theme="light"] .stat-badge-label {
  color: #64748b;
}

[data-theme="light"] .portrait-card-inner {
  border-color: rgba(225, 29, 72, 0.22);
  box-shadow: 0 12px 40px -10px rgba(225, 29, 72, 0.18);
}

[data-theme="light"] .stat-card {
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .stat-card:hover {
  border-color: rgba(225, 29, 72, 0.35);
  box-shadow: 0 12px 35px -5px rgba(225, 29, 72, 0.15);
}

[data-theme="light"] .stat-plus {
  color: rgb(225, 29, 72);
}

[data-theme="light"] .stat-icon-wrap {
  background: rgba(225, 29, 72, 0.1);
  border-color: rgba(225, 29, 72, 0.25);
  color: rgb(225, 29, 72);
}

[data-theme="light"] .category-icon-box {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.25);
  color: rgb(225, 29, 72);
}

[data-theme="light"] .skill-tag {
  color: #1e293b;
  background: #f1f5f9;
  border-color: rgba(225, 29, 72, 0.2);
}

[data-theme="light"] .skill-tag i {
  color: rgb(225, 29, 72);
}

[data-theme="light"] .filter-btn {
  background: #f1f5f9;
  color: #334155;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .filter-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(225, 29, 72, 0.3);
}

[data-theme="light"] .filter-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(225, 29, 72, 0.35);
}

[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus {
  border-color: rgb(225, 29, 72);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

[data-theme="light"] .timeline-dot {
  background: #ffffff;
  border-color: rgb(225, 29, 72);
  color: rgb(225, 29, 72);
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.25);
}

[data-theme="light"] .timeline-date {
  color: rgb(225, 29, 72);
}

[data-theme="light"] .contact-card-icon {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.25);
  color: rgb(225, 29, 72);
}

[data-theme="light"] .contact-card:hover {
  border-color: rgb(225, 29, 72);
}

[data-theme="light"] .section-subtitle {
  color: rgb(225, 29, 72);
}

[data-theme="light"] .brand-logo .logo-bracket {
  color: rgb(225, 29, 72);
}

[data-theme="light"] .brand-logo .logo-dot {
  color: rgb(244, 63, 94);
}

[data-theme="light"] .project-link-text:hover {
  color: #ffffff !important;
}

[data-theme="light"] .back-to-top-btn:hover {
  background: rgb(225, 29, 72);
  border-color: rgb(225, 29, 72);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

button, a, input, textarea, select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Subtle Tech Blueprint Grid Overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  z-index: -1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

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

button, input, textarea {
  font-family: inherit;
  color: inherit;
  border: none;
  outline: none;
}

/* --- Background Ambient Canvas --- */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.65;
  transition: opacity var(--transition-normal);
}

[data-theme="light"] #ambient-canvas {
  opacity: 0.35;
}

/* --- Container & Section Layouts --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-subtitle {
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.25;
}

.section-divider {
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  margin: 18px auto 0;
  border-radius: var(--radius-full);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 26px;
  min-height: 44px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.65);
  filter: brightness(1.15);
}

.btn-secondary {
  background: rgba(15, 23, 56, 0.7);
  color: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(26, 38, 86, 0.85);
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(10, 16, 38, 0.5);
  color: #ffffff;
  border: 1px solid rgba(139, 92, 246, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8b5cf6;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.25);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* --- Header & Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: var(--nav-backdrop);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.navbar.scrolled {
  box-shadow: var(--card-shadow);
  border-bottom-color: var(--border-medium);
}

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

/* Brand Logo */
.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  letter-spacing: -0.5px;
}

.logo-bracket {
  color: var(--accent);
  font-weight: 800;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .logo-bracket {
  transform: scale(1.15);
}

.logo-text {
  color: var(--text-primary);
  margin: 0 2px;
}

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

/* Desktop Nav List */
.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.1);
}

.nav-link.active {
  color: #ffffff !important;
  background: #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
  font-weight: 600;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: rotate(15deg) scale(1.05);
}

.theme-icon-container {
  position: relative;
  width: 18px;
  height: 18px;
}

.moon-icon, .sun-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 1.1rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* Dark mode theme icon states */
[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

/* Light mode theme icon states */
[data-theme="light"] .moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}
[data-theme="light"] .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: #f59e0b;
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  cursor: pointer;
  gap: 6px;
  z-index: 1001;
  border-radius: var(--radius-md);
}

.mobile-toggle .bar {
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  background: var(--bg-primary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 24px 20px;
  padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
  z-index: 999;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-height: 48px;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.mobile-nav-link:hover,
.mobile-nav-link:active,
.mobile-nav-link.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.15);
  transform: translateX(4px);
}

[data-theme="light"] .mobile-nav-link:hover,
[data-theme="light"] .mobile-nav-link:active,
[data-theme="light"] .mobile-nav-link.active {
  color: rgb(225, 29, 72);
  background: rgba(225, 29, 72, 0.08);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

/* Left Hero Content */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: rgba(56, 189, 248, 0.4);
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.2px;
}

.hero-greeting {
  font-size: 1.35rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-name {
  background: var(--gradient-name);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  filter: drop-shadow(0 4px 24px rgba(139, 92, 246, 0.35));
}

.typewriter-container {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: #94a3b8;
  min-height: 2.2rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.typewriter-prefix {
  color: #818cf8;
  margin-right: 8px;
}

.typewriter-text {
  color: #38bdf8;
  font-weight: 700;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.typewriter-cursor {
  color: #a855f7;
  font-weight: 300;
  animation: blinkCursor 0.8s infinite;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1.125rem;
  color: #cbd5e1;
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-description strong {
  color: #38bdf8;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-btn {
  padding: 14px 28px;
}

/* Social Buttons */
.hero-socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.socials-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-code);
}

.social-links-row {
  display: flex;
  gap: 14px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 56, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

/* --- Hero Visual & Professional Image (Right Side) --- */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.portrait-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
  perspective: 1000px;
}

/* Ambient glow backdrop - Cyan on Left & Violet on Right */
.portrait-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  height: 95%;
  background: radial-gradient(ellipse at 30% 40%, rgba(14, 165, 233, 0.45) 0%, rgba(139, 92, 246, 0.4) 45%, transparent 75%);
  filter: blur(55px);
  opacity: 0.75;
  z-index: 1;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

[data-theme="light"] .portrait-glow {
  opacity: 0.3;
}

/* Glowing dual-tone border aura matching screenshot */
.portrait-aura {
  position: absolute;
  inset: -6px;
  border-radius: calc(var(--radius-lg) + 6px);
  background: linear-gradient(135deg, #0ea5e9, #3b82f6 35%, #8b5cf6 70%, #ec4899 100%);
  filter: blur(10px);
  z-index: 1;
  opacity: 0.85;
}

.portrait-card-inner {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 0 35px -5px rgba(59, 130, 246, 0.35), 0 0 45px -5px rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 2;
  transition: transform 0.2s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.portrait-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-card-inner:hover .portrait-img {
  transform: scale(1.04);
}

.portrait-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 8, 22, 0.5) 0%, transparent 60%);
  pointer-events: none;
}

/* Floating Tech Badges */
.floating-item {
  position: absolute;
  background: rgba(10, 16, 38, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.2);
  z-index: 5;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: floatMotion 4s ease-in-out infinite alternate;
}

.floating-item:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(139, 92, 246, 0.35);
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
}

.badge-icon {
  font-size: 1.5rem;
}

.react-icon { color: #61dafb; }
.node-icon { color: #68a063; }
.python-icon { color: #ffca28; }

.badge-content {
  display: flex;
  flex-direction: column;
}

.badge-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.badge-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Positioning Floating Badges */
.badge-top-left {
  top: -24px;
  left: -28px;
  animation-delay: 0s;
}

.badge-top-right {
  top: 15%;
  right: -32px;
  animation-delay: 1.2s;
}

.badge-bottom-left {
  bottom: 25px;
  left: -32px;
  animation-delay: 2s;
}

.stat-badge {
  bottom: -22px;
  right: -18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  animation-delay: 0.8s;
}

.stat-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.stat-badge-text {
  display: flex;
  flex-direction: column;
}

.stat-badge-num {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-badge-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

@keyframes floatMotion {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
  100% {
    transform: translateY(4px) rotate(-0.5deg);
  }
}

/* Hero Scroll Down Indicator */
.scroll-down-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-code);
  transition: color var(--transition-fast);
}

.scroll-down-indicator:hover {
  color: var(--accent);
}

.mouse-icon {
  width: 22px;
  height: 36px;
  border: 2px solid var(--border-medium);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 2px;
  animation: mouseScroll 1.8s infinite;
}

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

/* ==========================================================================
   ABOUT SECTION & STATS
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.about-headline {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.about-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.7;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 28px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.highlight-icon {
  color: #10b981;
  font-size: 1.1rem;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  transition: all var(--transition-fast);
  box-shadow: 0 8px 32px rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 12px 35px -5px rgba(139, 92, 246, 0.25);
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #38bdf8;
}

.stat-number {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-plus {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #38bdf8;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-normal);
}

.skill-category-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -10px rgba(139, 92, 246, 0.25);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.category-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #38bdf8;
}

.category-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.category-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(15, 23, 52, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.22);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.skill-tag i {
  color: #38bdf8;
}

.skill-tag:hover {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.skill-tag:hover i {
  color: #ffffff;
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.project-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  background: rgba(15, 23, 52, 0.7);
  color: var(--text-secondary);
  border: 1px solid rgba(59, 130, 246, 0.22);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(26, 38, 86, 0.85);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

.project-card.hide {
  display: none;
}

/* Mockup previews */
.project-image-box {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

/* Project Real Images */
.project-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img {
  transform: scale(1.06);
}

.project-img-contain {
  object-fit: contain;
  object-position: center;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.98));
  padding: 8px;
}

[data-theme="light"] .project-img-contain {
  background: radial-gradient(circle at center, rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.98));
}

.project-image-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  pointer-events: none;
}

.project-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(5, 8, 22, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .project-badge-pill {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(225, 29, 72, 0.35);
  color: rgb(190, 18, 60);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}

.project-placeholder-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
  transition: transform 0.5s ease;
}

.project-card:hover .project-placeholder-preview {
  transform: scale(1.05);
}

/* Gradients for project mockups */
.project-bg-1 { background: linear-gradient(135deg, #1e1b4b, #312e81); }
.project-bg-2 { background: linear-gradient(135deg, #0f172a, #334155); }
.project-bg-3 { background: linear-gradient(135deg, #111827, #1f2937); }
.project-bg-4 { background: linear-gradient(135deg, #14532d, #064e3b); }
.project-bg-5 { background: linear-gradient(135deg, #581c87, #3b0764); }
.project-bg-6 { background: linear-gradient(135deg, #1e293b, #0f172a); }

.project-mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mock-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.mock-circle.red { background-color: #ef4444; }
.mock-circle.yellow { background-color: #f59e0b; }
.mock-circle.green { background-color: #10b981; }

.mock-url {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 8px;
}

.project-icon-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
}

.project-preview-lines {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.line-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
.w-40 { width: 40%; }
.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }


/* Project Content */
.project-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

.p-tag {
  font-family: var(--font-code);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--bg-badge);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.project-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.project-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: auto;
}

.project-link-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--gradient-primary);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.project-link-text:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
  filter: brightness(1.12);
  gap: 10px;
  color: #ffffff !important;
}

.project-link-text i {
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

.project-link-text:hover i {
  transform: translate(2px, -2px);
}

.project-link-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.project-link-icon:hover {
  color: #ffffff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* ==========================================================================
   EXPERIENCE & TIMELINE
   ========================================================================== */
.timeline-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 40px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 17px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-secondary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

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

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-fast);
}

.timeline-content:hover {
  border-color: var(--border-medium);
  transform: translateX(6px);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline-date {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: var(--radius-full);
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.timeline-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 50px;
  align-items: flex-start;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-fast);
}

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

.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-badge);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
}

.contact-card-content {
  display: flex;
  flex-direction: column;
}

.contact-card-title {
  font-size: 0.8rem;
  font-family: var(--font-code);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-card-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.contact-social-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
}

.contact-social-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

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

.social-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.social-circle:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* Contact Form */
.form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.required {
  color: #ef4444;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.textarea-icon-wrap .input-icon {
  top: 16px;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 46px;
  font-size: 16px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

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

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-card-hover);
}

.form-input:focus + .input-icon,
.input-with-icon:focus-within .input-icon {
  color: var(--accent);
}

.error-msg {
  font-size: 0.78rem;
  color: #ef4444;
  margin-top: 6px;
  min-height: 16px;
}

.submit-btn {
  padding: 16px 28px;
  margin-top: 8px;
  font-size: 1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 24px 0;
  position: relative;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.back-to-top-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.back-to-top-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  min-width: 300px;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-success {
  border-left-color: #10b981;
}

.toast.toast-success .toast-icon {
  color: #10b981;
}

.toast.toast-error {
  border-left-color: #ef4444;
}

.toast.toast-error .toast-icon {
  color: #ef4444;
}

.toast.toast-info {
  border-left-color: #38bdf8;
}

.toast.toast-info .toast-icon {
  color: #38bdf8;
}

[data-theme="light"] .toast.toast-info {
  border-left-color: rgb(225, 29, 72);
}

[data-theme="light"] .toast.toast-info .toast-icon {
  color: rgb(225, 29, 72);
}

.toast-icon {
  font-size: 1.2rem;
  color: #10b981;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.reveal-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-fade-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* --- Large Tablets & Small Laptops (<= 1024px) --- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.1rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .skills-categories-grid {
    gap: 20px;
  }
}

/* --- Tablets & Phablets (<= 900px) --- */
@media (max-width: 900px) {
  .hero-section {
    min-height: auto;
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 50px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 44px;
  }

  .hero-content {
    align-items: center;
    order: 2;
  }

  .hero-visual {
    order: 1;
    margin: 0 auto;
  }

  .portrait-wrapper {
    max-width: 320px;
  }

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

  .hero-socials {
    align-items: center;
  }

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

  .about-content {
    text-align: center;
  }

  .about-highlights {
    justify-content: center;
    display: inline-flex;
    flex-direction: column;
    text-align: left;
    margin: 24px auto 0;
  }

  .skills-categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  /* Reposition floating badges snugly to avoid overflow */
  .badge-top-left {
    top: -14px;
    left: -12px;
  }

  .badge-top-right {
    top: 14%;
    right: -12px;
  }

  .badge-bottom-left {
    bottom: 18px;
    left: -12px;
  }

  .stat-badge {
    bottom: -14px;
    right: -10px;
  }
}

/* --- Mobile Landscape & Standard Phones (<= 768px) --- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .section-padding {
    padding: 70px 0;
  }

  .nav-menu,
  .nav-cta {
    display: none !important;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2.2rem, 7vw, 2.75rem);
    line-height: 1.15;
  }

  .typewriter-container {
    font-size: 1.25rem;
    min-height: 1.8rem;
    justify-content: center;
  }

  .hero-description {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-card {
    padding: 22px 14px;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .stat-plus {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .scroll-down-indicator {
    display: none;
  }

  /* Timeline adjustments for single column */
  .timeline-container {
    padding-left: 32px;
  }

  .timeline-container::before {
    left: 13px;
  }

  .timeline-dot {
    left: -32px;
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .timeline-content {
    padding: 20px;
  }

  .timeline-title {
    font-size: 1.15rem;
  }
}

/* --- Small Phones & Portrait Viewports (<= 640px) --- */
@media (max-width: 640px) {
  .nav-container,
  .hero-container,
  .container {
    padding-left: max(16px, env(safe-area-inset-left, 16px));
    padding-right: max(16px, env(safe-area-inset-right, 16px));
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .hero-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-socials {
    width: 100%;
  }

  .social-links-row {
    justify-content: center;
  }

  /* Projects Filter Bar Horizontal Scroll */
  .filter-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 4px 12px 4px;
    gap: 8px;
    max-width: 100%;
    justify-content: flex-start;
  }

  .filter-container::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  /* Form wrapper */
  .form-wrapper {
    padding: 24px 18px;
  }

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

  /* Toast Notification */
  .toast-container {
    bottom: max(16px, env(safe-area-inset-bottom, 16px));
    left: 16px;
    right: 16px;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: 14px 16px;
  }

  /* Footer Bottom */
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  }
}

/* --- Compact Phones (<= 480px) --- */
@media (max-width: 480px) {
  .section-padding {
    padding: 55px 0;
  }

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

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 0.88rem;
  }

  .hero-greeting {
    font-size: 1.1rem;
  }

  .hero-title {
    font-size: clamp(1.95rem, 8.5vw, 2.35rem);
  }

  .typewriter-container {
    font-size: 1.05rem;
    min-height: 1.6rem;
  }

  .status-badge {
    padding: 6px 14px;
    margin-bottom: 18px;
  }

  .status-text {
    font-size: 0.78rem;
  }

  /* Hero portrait compact scaling without horizontal overflow */
  .portrait-wrapper {
    max-width: 240px;
    margin: 0 auto;
  }

  .portrait-card-inner {
    padding: 12px;
  }

  .floating-item {
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .badge-icon {
    font-size: 1.15rem;
  }

  .badge-title {
    font-size: 0.75rem;
  }

  .badge-sub {
    display: none;
  }

  .stat-badge {
    padding: 6px 10px;
    gap: 8px;
    border-radius: 8px;
  }

  .stat-badge-icon {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .stat-badge-num {
    font-size: 0.82rem;
  }

  .stat-badge-label {
    font-size: 0.65rem;
  }

  .badge-top-left {
    top: -10px;
    left: -6px;
  }

  .badge-top-right {
    top: 10%;
    right: -6px;
  }

  .badge-bottom-left {
    bottom: 14px;
    left: -6px;
  }

  .stat-badge {
    bottom: -10px;
    right: -6px;
  }

  /* Stats Card Compact */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 16px 10px;
  }

  .stat-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
    margin-bottom: 10px;
  }

  .stat-number {
    font-size: 1.85rem;
  }

  .stat-plus {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.78rem;
    margin-top: 4px;
  }

  /* Skill Category Card */
  .skill-category-card {
    padding: 20px 16px;
  }

  .category-title {
    font-size: 1.1rem;
  }

  .skill-pill {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .skill-icon {
    font-size: 1rem;
  }

  /* Project Card */
  .project-content {
    padding: 20px 16px;
  }

  .project-title {
    font-size: 1.15rem;
  }

  .project-description {
    font-size: 0.86rem;
  }

  .project-links {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .project-link-text {
    width: 100%;
    justify-content: center;
  }

  .project-link-icon {
    display: none;
  }

  /* Timeline */
  .timeline-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* Contact Cards */
  .contact-card {
    padding: 16px;
    gap: 14px;
  }

  .contact-card-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.15rem;
  }

  .contact-card-value {
    font-size: 0.95rem;
  }

  .form-wrapper {
    padding: 20px 14px;
  }

  .submit-btn {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
}

/* --- Ultra-Compact Screens (<= 360px) --- */
@media (max-width: 360px) {
  .portrait-wrapper {
    max-width: 190px;
  }

  .badge-top-left {
    left: 0;
    top: -8px;
  }

  .badge-top-right {
    right: 0;
    top: 6%;
  }

  .badge-bottom-left {
    left: 0;
    bottom: 8px;
  }

  .stat-badge {
    right: 0;
    bottom: -8px;
  }

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

  .hero-title {
    font-size: 1.8rem;
  }
}

/* --- Touch Device Ergonomics (Eliminate sticky hover & enable active feedback) --- */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-outline:hover,
  .stat-card:hover,
  .skill-category-card:hover,
  .project-card:hover,
  .contact-card:hover,
  .timeline-content:hover,
  .floating-item:hover,
  .social-btn:hover,
  .social-circle:hover,
  .back-to-top-btn:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .btn:active,
  .social-btn:active,
  .social-circle:active,
  .filter-btn:active,
  .back-to-top-btn:active,
  .theme-toggle:active,
  .mobile-toggle:active {
    transform: scale(0.96) !important;
    transition: transform 0.1s ease !important;
  }

  .portrait-card-inner:hover .portrait-img {
    transform: none !important;
  }
}

/* --- Accessibility: Respect Reduced Motion Preferences --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .floating-item {
    animation: none !important;
  }

  .reveal-fade-up {
    opacity: 1 !important;
    transform: none !important;
  }

  .status-dot::after {
    animation: none !important;
  }

  .typewriter-cursor {
    animation: none !important;
    opacity: 1 !important;
  }
}

