/* Portfolio - Premium Cursor Inspired Warm Design */
/* Fonts loaded once from each HTML page */

:root {
  /* Cursor Accent Palette */
  --accent: #f54e00;
  --accent-dark: #cf2d56;
  --accent-light: #ff7033;
  --accent-glow: rgba(245, 78, 0, 0.4);
  --accent-subtle: rgba(245, 78, 0, 0.08);
  --accent-border: rgba(245, 78, 0, 0.25);

  /* Backgrounds (Baby Lite Yellow Theme) */
  --bg-primary: #fffdec;
  --bg-secondary: #fff9e0;
  --bg-darker: #fffced;
  --bg-card: #fffbe6;
  --bg-card-solid: #fffbe6;
  --bg-input: rgba(38, 37, 30, 0.02);
  --bg-gradient-main: linear-gradient(145deg, #fffdec 0%, #fffced 100%);

  /* Text */
  --text-primary: #26251e;
  --text-secondary: rgba(38, 37, 30, 0.85);
  --text-muted: rgba(38, 37, 30, 0.72);
  --text-accent: var(--accent);

  /* Borders */
  --border-subtle: rgba(38, 37, 30, 0.06);
  --border-card: rgba(38, 37, 30, 0.1);
  --border-accent: rgba(245, 78, 0, 0.3);

  /* Effects */
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  --shadow-card: rgba(0, 0, 0, 0.06) 0px 14px 32px, rgba(0, 0, 0, 0.02) 0px 4px 12px;
  --shadow-accent: 0 4px 20px rgba(245, 78, 0, 0.15);
  --shadow-accent-intense: 0 8px 40px rgba(245, 78, 0, 0.25);

  /* Transitions */
  --transition-base: 0.2s ease;
  --transition-slow: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Physics-based bounce */

  /* Fonts */
  --font-primary: 'Space Grotesk', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-serif: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  /* Theme transition */
  --theme-transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  --bg-primary: #1a1916;
  --bg-secondary: #222019;
  --bg-darker: #141310;
  --bg-card: #2c2a24;
  --bg-card-solid: #2c2a24;
  --bg-input: rgba(242, 241, 237, 0.06);

  --text-primary: #f2f1ed;
  --text-secondary: rgba(242, 241, 237, 0.85);
  --text-muted: rgba(242, 241, 237, 0.65);

  --border-subtle: rgba(242, 241, 237, 0.06);
  --border-card: rgba(242, 241, 237, 0.1);

  --shadow-card: rgba(0, 0, 0, 0.25) 0px 14px 32px, rgba(0, 0, 0, 0.1) 0px 4px 12px;
  --bg-gradient-main: linear-gradient(145deg, #1a1916 0%, #0d0c0a 100%);
}

/* Dark-theme specific overrides */
[data-theme="dark"] .navbar {
  background: rgba(20, 19, 16, 0.92);
  border-bottom-color: rgba(242, 241, 237, 0.06);
}

[data-theme="dark"] .mobile-menu {
  background: rgba(26, 25, 22, 0.98);
}

[data-theme="dark"] .loading-screen {
  background: #141310;
}

[data-theme="dark"] .hero::before {
  border-color: rgba(245, 78, 0, 0.15);
}

[data-theme="dark"] .bento-card.code-window {
  border-color: rgba(245, 78, 0, 0.25);
}

[data-theme="dark"] .about-user-card {
  background-color: #1a1916;
  border-color: rgba(245, 78, 0, 0.2);
}

[data-theme="dark"] .corner-accent {
  background-color: #2c2a24;
}

[data-theme="dark"] .about-user-card:hover .corner-accent {
  background-color: #3a3730;
}

[data-theme="dark"] .skill-icon-box {
  background: var(--bg-card);
  border-color: var(--border-card);
}

[data-theme="dark"] .project-card {
  border-color: var(--border-card);
}

[data-theme="dark"] .project-image {
  background: var(--bg-card);
  border-color: var(--border-card);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
  background: var(--bg-card);
  border-color: var(--border-card);
  color: var(--text-primary);
}

[data-theme="dark"] .footer {
  background: #141310;
  border-top-color: var(--border-card);
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.05rem;
  transition: var(--transition-base);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-subtle);
}

.theme-toggle .fa-sun {
  display: none;
}

.theme-toggle .fa-moon {
  display: inline-block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
  display: inline-block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
  display: none;
}

/* Smooth theme transition on key elements */
body,
.navbar,
.hero,
.about,
.skills,
.projects,
.contact,
.footer,
.project-card,
.skill-icon-box,
.about-user-card,
.bento-card,
.mobile-menu,
.loading-screen {
  transition: var(--theme-transition);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-gradient-main);
  background-attachment: fixed;
}

html.no-loader #loading-screen {
  display: none !important;
  pointer-events: none;
}

html.no-loader #main-content {
  display: block !important;
}

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

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

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

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

/* ===== Loading Screen ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-darker);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(74, 123, 247, 0.06), transparent 60%);
}

.loading-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(74, 123, 247, 0.15);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  margin: 0 auto 2rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.loading-content h2 {
  font-size: 1.2rem;
  font-weight: 500;
  font-family: var(--font-primary);
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.fade-in-text {
  animation: fadeIn 0.8s ease 0.3s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

.main-content {
  min-height: 100vh;
  opacity: 0;
  animation: fadeInContent 0.6s ease forwards;
}

@keyframes fadeInContent {
  to {
    opacity: 1;
  }
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* ===== Section Titles ===== */
.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: 4rem;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
  letter-spacing: -1.5px;
  /* Cursor style compressed heading */
  color: var(--text-primary);
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-primary);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

/* Shine sweep effect on hover */
.btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn:hover::after {
  left: 125%;
}

.btn:active {
  transform: translateY(0px) scale(0.97);
  transition: transform 0.1s ease;
}

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

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(245, 78, 0, 0.35), 0 0 15px rgba(245, 78, 0, 0.15);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(245, 78, 0, 0.25);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(245, 78, 0, 0.25);
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: var(--bg-primary);
  background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  z-index: 1000;
  transition: var(--theme-transition), transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-bottom: 1px solid var(--border-subtle);
  opacity: 0;
  transform: translateY(-100px);
  animation: slideDown 0.8s ease 0.5s forwards;
  overflow: visible;
}

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

.navbar.scrolled {
  background: var(--bg-primary);
  background: color-mix(in srgb, var(--bg-primary) 96%, transparent);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--border-card);
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

/* ===== Logo ===== */
.nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-primary);
  transition: var(--transition-base);
  gap: 2px;
}

.nav-logo a:hover {
  opacity: 0.9;
}

.logo-text {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 4px;
  display: inline-block;
}

/* ===== Nav Menu ===== */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition-base);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.nav-resume {
  border: 1px solid var(--border-accent);
  background: var(--accent-subtle);
}

.nav-link.nav-resume:hover {
  background: rgba(74, 123, 247, 0.15);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-icon {
  font-size: 0.85rem;
  transition: var(--transition-base);
}

/* ===== Mobile Menu ===== */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text-primary);
  transition: var(--transition-base);
  padding: 8px;
  background: none;
  border: none;
}

.hamburger:hover {
  color: var(--accent);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--bg-primary) 98%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.mobile-menu ul {
  list-style: none;
  padding: 1.5rem 2rem;
}

.mobile-menu li {
  margin-bottom: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
  transition: var(--transition-base);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
  transform: translateX(5px);
}

.mobile-nav-icon {
  font-size: 1.1rem;
}

/* ===== Hero Social Sidebar ===== */
.hero-social-sidebar {
  position: absolute;
  left: 4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 1s ease 1.2s forwards;
}

.hero-social-sidebar::before {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--border-accent);
  margin-bottom: 0.5rem;
}

.hero-social-sidebar::after {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--border-accent);
  margin-top: 0.5rem;
}

.hero-social-sidebar a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition-base);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
}

.hero-social-sidebar a:hover {
  color: var(--accent);
  background: var(--accent-subtle);
  transform: translateY(-2px);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
  background: var(--bg-primary);
}

/* Bordered Frame Effect */
.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  bottom: 40px;
  border: 2px solid var(--border-accent);
  border-radius: 20px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Floating Geometric Shape */
.hero::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--accent);
  top: 15%;
  right: 12%;
  transform: rotate(45deg);
  opacity: 0.7;
  z-index: 3;
  border-radius: 4px;
  animation: floatShape 6s ease-in-out infinite;
}

@keyframes floatShape {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Hero Bento Visual CSS (Reacts opposite to theme) */
.hero-bento-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-card.code-window {
  background: #2c2a24;
  /* Always dark in light mode */
  border-radius: 16px;
  padding: 1.5rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 50px -12px rgba(38, 37, 30, 0.3);
  border: 1px solid rgba(245, 78, 0, 0.15);
  transition: var(--theme-transition);
}

[data-theme="dark"] .bento-card.code-window {
  background: #fffdec;
  /* Light in dark mode */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border-color: rgba(245, 78, 0, 0.3);
}

.bento-card.floating {
  animation: floatShape 6s ease-in-out infinite;
}

.mac-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.mac-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mac-btn.close {
  background: #f54e00;
}

.mac-btn.min {
  background: #ffbd2e;
}

.mac-btn.max {
  background: #27c93f;
}

.code-content pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
}

.code-content {
  color: #e8e6e0;
  transition: var(--theme-transition);
}

[data-theme="dark"] .code-content {
  color: #26251e;
}

.code-content .kw {
  color: #f54e00;
}

.code-content .var {
  color: #ff7033;
}

.code-content .op {
  color: #a09e95;
}

.code-content .key {
  color: #d4c5a9;
}

[data-theme="dark"] .code-content .key {
  color: #5c5344;
}

.code-content .str {
  color: #e0a87c;
}

[data-theme="dark"] .code-content .str {
  color: #b46b2e;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.animated-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(74, 123, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 123, 247, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.5;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 78, 0, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(245, 78, 0, 0.03) 0%, transparent 40%);
  background-color: transparent;
  z-index: 1;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Hero greeting line */
.hero-greeting {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  letter-spacing: 1px;
}

.hero-greeting::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.hero-content::before {
  display: none;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  font-family: var(--font-display);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
  color: var(--text-primary);
}

.typing-text {
  color: var(--text-primary);
}

.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.highlight {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  background: none;
  filter: none;
  font-style: italic;
  font-family: var(--font-display);
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  max-width: 450px;
  font-family: var(--font-serif);
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ===== Profile Card ===== */
.hero-image {
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

.profile-card {
  width: 100%;
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 0 22px 0 16px;
  opacity: 0.15;
}

.profile-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 80px;
  height: 80px;
  background: var(--accent);
  transform: rotate(45deg);
  opacity: 0.1;
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card), var(--shadow-accent);
  border-color: var(--accent);
}

.profile-icon {
  font-size: 10rem;
  color: var(--accent);
  opacity: 0.6;
  transition: var(--transition-base);
}

.profile-card:hover .profile-icon {
  opacity: 0.9;
  transform: scale(1.05);
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 4rem;
  z-index: 2;
  animation: bounce 2s infinite;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scroll-indicator::before {
  content: 'scroll down';
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }
}

.scroll-icon {
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition-base);
}

/* ===== About Section ===== */
.about {
  background: var(--bg-primary);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(74, 123, 247, 0.04), transparent 50%);
  pointer-events: none;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {
  opacity: 0;
  transform: translateX(-30px);
  transition: var(--transition-slow);
}

.about-text.visible {
  opacity: 1;
  transform: translateX(0);
}

.about-text p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.9;
  font-family: var(--font-serif);
}

.about-principle {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ===== Stats ===== */
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.stat {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition-base);
}

.stat:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.stat-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.stat h3 {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-primary);
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.stat p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.about-image {
  width: 100%;
  opacity: 0;
  transform: translateX(30px);
  transition: var(--transition-slow);
}

.about-image.visible {
  opacity: 1;
  transform: translateX(0);
}

.about-user-card {
  display: flex;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 380px;
  margin: 0 auto;
  background-color: var(--bg-card);
  /* Blends with theme by default */
  border-radius: 28px;
  border: 1px solid var(--border-card);
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--transition-slow),
    background-color 0.4s ease,
    box-shadow 0.4s ease,
    min-height 0.4s ease;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  overflow: hidden;
}

.about-user-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(245, 78, 0, 0.1);
  border-color: var(--accent);
}

.user-card-inner {
  width: 260px;
  height: 260px;
  background-color: var(--accent);
  border-radius: 24px;
  /* Removed oval/circle shape */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s var(--transition-slow);
  z-index: 2;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.about-user-card:hover .user-card-inner {
  transform: scale(1.05);
  border-color: var(--accent);
}

.user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  /* Slight inset radius for a nested look */
  transition: transform 0.4s var(--transition-slow);
}

.about-user-card:hover .user-avatar-image {
  transform: scale(1.05);
}

.corner-accent {
  position: absolute;
  width: 120px;
  height: 120px;
  background-color: var(--bg-secondary);
  transition: background-color 0.4s ease;
}

.about-user-card:hover .corner-accent {
  background-color: var(--bg-card-solid);
}

@media (max-width: 480px) {
  .corner-accent {
    width: 80px;
    height: 80px;
  }
}

.corner-accent.top-right {
  top: -20px;
  right: -20px;
  border-radius: 32px;
}

.corner-accent.bottom-left {
  bottom: -40px;
  left: -40px;
  transform: rotate(45deg);
  border-radius: 20px;
}

@media (max-width: 480px) {
  .corner-accent {
    width: 60px;
    height: 60px;
  }

  .corner-accent.top-right {
    top: -10px;
    right: -10px;
  }

  .corner-accent.bottom-left {
    bottom: -20px;
    left: -20px;
  }
}

/* Expanded content (Opposite theme reactions) */
.user-card-expanded {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 2rem 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 3;
}

.user-card-expanded h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: inherit;
  margin-bottom: 0.25rem;
  font-family: var(--font-primary);
}

.user-card-role {
  font-size: 0.9rem;
  color: var(--accent);
  /* Changed to var(--accent) for vibrancy */
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.user-card-location {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.user-card-location i {
  margin-right: 4px;
}

.user-card-links {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 5;
  opacity: 0;
  transition: all 0.4s ease;
}

/* Vertical social links on the right as per user reference */
.about-user-card.expanded .user-card-links {
  opacity: 1;
  right: 1.5rem;
  top: auto;
  bottom: 2rem;
  transform: none;
  z-index: 11;
}

@media (max-width: 480px) {
  .about-user-card.expanded .user-card-links {
    right: 1rem;
    bottom: 1.5rem;
    gap: 0.6rem;
  }
}

.about-user-card.expanded .user-card-links {
  opacity: 1;
}

.user-card-links a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(245, 78, 0, 0.12);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.user-card-links a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.user-card-cta {
  font-size: 0.8rem;
  padding: 8px 22px;
}

.user-card-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.75rem;
  z-index: 3;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: hintBounce 2s ease-in-out infinite;
}

@keyframes hintBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

/* Expanded state (React Opposite to Theme) */
.about-user-card.expanded {
  aspect-ratio: auto;
  min-height: 480px;
  min-width: 300px;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  background-color: #2c2a24;
  color: #f2f1ed;
  border: 2px solid var(--accent);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(245, 78, 0, 0.2);
}

[data-theme="dark"] .about-user-card.expanded {
  background-color: #fffdec;
  color: #26251e;
}

.about-user-card.expanded .user-card-inner {
  width: 100%;
  height: 100%;
  /* Fill entire card */
  border-radius: 0;
  border: none;
  transform: translateY(0);
  margin-bottom: 0;
  position: absolute;
  top: 0;
  left: 0;
}

/* Gradient mask for better text readability */
.about-user-card.expanded .user-card-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, #2c2a24 0%, rgba(44, 42, 36, 0.9) 60%, transparent 100%);
  z-index: 3;
}

[data-theme="dark"] .about-user-card.expanded .user-card-inner::after {
  background: linear-gradient(to top, #fffdec 0%, rgba(255, 253, 236, 0.98) 80%, transparent 100%);
}

.about-user-card.expanded .user-card-expanded {
  opacity: 1;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(0);
  padding: 0.75rem 2.5rem 1.5rem;
  /* Extremely tight padding */
  pointer-events: auto;
  z-index: 10;
  /* High z-index to stay above mask */
  backdrop-filter: blur(12px);
  background: rgba(44, 42, 40, 0.1);
  text-align: center;
}

@media (max-width: 480px) {
  .about-user-card.expanded .user-card-expanded {
    padding: 1rem 1.5rem 1.5rem;
  }

  .about-user-card.expanded {
    min-height: 520px;
  }
}

.about-user-card.expanded h4 {
  margin-bottom: 0;
}

.about-user-card.expanded .user-card-role {
  margin-bottom: 0.1rem;
}

.about-user-card.expanded .user-card-location {
  margin-bottom: 0.6rem;
}

[data-theme="dark"] .about-user-card.expanded .user-card-expanded {
  background: rgba(255, 253, 236, 0.1);
}

.about-user-card.expanded .user-card-hint {
  opacity: 0;
}

.about-user-card.expanded .corner-accent {
  background-color: rgba(245, 78, 0, 0.1);
}

.about-user-card.expanded .corner-accent.top-right {
  top: -30px;
  right: -30px;
}

.about-user-card.expanded .corner-accent.bottom-left {
  bottom: -30px;
  left: -30px;
}

@media (max-width: 480px) {
  .about-user-card.expanded .corner-accent.top-right {
    top: -15px;
    right: -15px;
  }

  .about-user-card.expanded .corner-accent.bottom-left {
    bottom: -15px;
    left: -15px;
  }
}

.skills-group-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin: 2.5rem 0 1.25rem;
  letter-spacing: 0.02em;
}

.skills-group-heading:first-of-type {
  margin-top: 0.5rem;
}

/* ===== Skills Icon Grid (Dribbble Template Style) ===== */
.skills-icon-grid {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 3rem;
  margin-bottom: 0;
  max-width: 100%;
}

.skill-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-slow);
}

.skill-icon-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-icon-box {
  width: 70px;
  height: 70px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.skill-icon-box i {
  font-size: 2rem;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.skill-icon-item:hover .skill-icon-box {
  border-color: var(--border-accent);
  background: var(--accent-subtle);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}

.skill-icon-item:hover .skill-icon-box i {
  color: var(--accent);
}

.skill-icon-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Skills Marquee Layout */
.skills-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 100vw;
  position: relative;
  padding: 1rem 0;
}

.skills-marquee {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.skills-marquee:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Section Subtitle */
.section-subtitle {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4rem;
  margin-bottom: 3rem;
  font-family: var(--font-primary);
  position: relative;
}

.section-subtitle::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ===== Skills Section ===== */
.skills {
  background: var(--bg-secondary);
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-category {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 2.5rem;
  transition: var(--transition-base);
  opacity: 0;
  transform: translateY(30px);
}

.skill-category.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.skill-category h3,
.skill-category .skill-category-title {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--accent);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Anchor sections clear fixed navbar */
#home,
#about,
#skills,
#projects,
#contact {
  scroll-margin-top: 88px;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.skill-bar {
  height: 18px;
  /* Increased from 6px */
  background: var(--bg-card);
  /* Stronger background for thickness */
  border: 1px solid var(--border-card);
  border-radius: 9px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 9px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Physics-based */
}

/* ===== Projects Section ===== */
.projects {
  background: var(--bg-primary);
  position: relative;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(74, 123, 247, 0.04), transparent 50%);
  pointer-events: none;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.project-card {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-base);
  opacity: 0;
  transform: translateY(30px);
  padding: 2rem;
}

@media (max-width: 768px) {
  .project-card {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.project-image {
  flex: 0 0 140px;
  height: 140px;
  background: var(--bg-card-solid);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .project-image {
    flex: 0 0 200px;
    width: 100%;
  }
}

.project-icon {
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.5;
  z-index: 1;
  transition: var(--transition-base);
}

.project-card:hover .project-icon {
  opacity: 0.8;
  transform: scale(1.1);
}

.project-content {
  padding: 1.8rem;
}

.project-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  font-family: var(--font-primary);
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

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

/* Project Accordion / Dropdown Details */
.project-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease, margin 0.3s ease;
}

.project-details.open {
  max-height: 800px;
  opacity: 1;
  margin-bottom: 1.2rem;
}

.toggle-details-btn i {
  transition: transform 0.3s ease;
  margin-left: 0.4rem;
}

.toggle-details-btn.open i {
  transform: rotate(180deg);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.project-tech span {
  padding: 4px 10px;
  background: var(--accent-subtle);
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.project-lead {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.project-case-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

.project-case-list li {
  margin-bottom: 0.35rem;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--bg-secondary);
  position: relative;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  opacity: 0;
  transform: translateX(-30px);
  transition: var(--transition-slow);
}

.contact-info.visible {
  opacity: 1;
  transform: translateX(0);
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-primary);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.contact-info h3::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 12px;
  border-radius: 2px;
}

.contact-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  background: var(--accent-subtle);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: var(--transition-base);
}

.contact-item:hover {
  border-color: var(--border-accent);
  transform: translateX(5px);
}

.contact-icon {
  font-size: 1.2rem;
  color: var(--accent);
}

.contact-item span {
  font-size: 0.9rem;
}

.contact-item a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

.contact-item a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.social-link {
  width: 44px;
  height: 44px;
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition-base);
}

.social-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
  border-color: var(--accent);
}

.contact-form {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateX(30px);
  transition: var(--transition-slow);
}

.contact-form.visible {
  opacity: 1;
  transform: translateX(0);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: var(--transition-base);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(74, 123, 247, 0.04);
  box-shadow: 0 0 0 3px rgba(74, 123, 247, 0.1);
}

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

.contact-form .btn {
  width: 100%;
  font-size: 1rem;
  padding: 14px;
}

#form-status {
  margin-top: 1rem;
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
}

.success-message {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 1rem;
  border-radius: 8px;
}

.error-message {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  padding: 1rem;
  border-radius: 8px;
}

.contact-response-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.6;
}

.contact-response-note a {
  color: var(--accent-light);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  text-align: center;
}

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

.footer .footer-tagline {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-base);
}

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

/* ===== Scroll to Top ===== */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-base);
  box-shadow: var(--shadow-accent);
  z-index: 999;
}

.scroll-to-top.visible {
  opacity: 1;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent-intense);
}

/* ===== Page Section Layout ===== */
.page-section {
  position: relative;
  min-height: calc(100vh - 70px);
  padding-top: 120px;
  padding-bottom: 80px;
  display: block;
}

/* Decorative shapes for page sections */
.page-section::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--accent);
  opacity: 0.08;
  border-radius: 4px;
  transform: rotate(45deg);
  top: 15%;
  left: 5%;
  animation: floatDecor 8s ease-in-out infinite;
  pointer-events: none;
}

.page-section::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  background: var(--accent);
  opacity: 0.06;
  border-radius: 4px;
  transform: rotate(30deg);
  bottom: 20%;
  right: 8%;
  animation: floatDecor 10s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes floatDecor {

  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }

  50% {
    transform: rotate(55deg) translateY(-15px);
  }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {

  .hero-container,
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-image,
  .about-image {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero::before {
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .hero-container {
    padding: 0 2rem;
  }

  .scroll-indicator {
    left: 2rem;
  }

  .hero-social-sidebar {
    left: 1.5rem;
    gap: 0.8rem;
  }

  .hero-social-sidebar::before,
  .hero-social-sidebar::after {
    height: 25px;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero::before {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  section {
    padding: 4rem 0;
  }

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

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

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

  .scroll-indicator {
    display: none;
  }

  .page-section::before,
  .page-section::after {
    display: none;
  }

  .hero-social-sidebar {
    display: none;
  }

  .skills-icon-grid {
    gap: 1.2rem;
  }

  .skill-icon-box {
    width: 60px;
    height: 60px;
  }

  .skill-icon-box i {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {

  .container,
  .nav-container,
  .hero-container,
  .skills-marquee-container {
    padding: 0 1rem;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden;
  }

  .skills-marquee {
    width: max-content;
    overflow: visible;
  }
}

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

.hero-container {
  padding: 0 1.5rem;
}

.profile-card,
.about-card {
  max-width: 260px;
}

.profile-icon {
  font-size: 7rem;
}

.about-icon {
  font-size: 6rem;
}

.skill-category {
  padding: 1.5rem;
}

.contact-form {
  padding: 1.5rem;
}
}

/* ===== Particle Float Animation ===== */
@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(-100vh) translateX(40px);
    opacity: 0;
  }
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== Focus Visible ===== */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(74, 123, 247, 0.2);
}

/* ===== Skip to Main ===== */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  border-radius: 0 0 8px 0;
}

.skip-to-main:focus {
  top: 0;
}

/* ===== Section & Component Gradients ===== */
.page-section {
  padding: 8rem 0;
  position: relative;
  background: var(--bg-gradient-main);
}

.project-card,
.stat,
.skill-icon-box {
  background: var(--bg-card);
  transition: var(--transition-slow);
}

.project-card:hover,
.stat:hover,
.skill-icon-box:hover {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
  box-shadow: var(--shadow-card), 0 10px 30px rgba(245, 78, 0, 0.05);
}

[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .stat:hover,
[data-theme="dark"] .skill-icon-box:hover {
  background: linear-gradient(145deg, #2c2a24, #1a1916);
}

/* ===== Text Contrast ===== */
.hero-description,
.about-text p,
.project-content p {
  color: var(--text-secondary);
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: #d0d0e0;
    --text-muted: #b0b0c8;
  }

  .btn-outline,
  .btn-secondary {
    border-width: 3px;
  }
}

/* ===== Reduced Motion ===== */
@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;
  }
}