/* ==========================================================================
   K. MADHAN PORTFOLIO - MODERN LUXURY DESIGN SYSTEM
   Identity: AI-Integrated UI/UX Designer & B.Tech IT Student
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  --bg-primary: #fcfaf7;
  --bg-secondary: #f4ede3;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(197, 160, 115, 0.12);
  --bg-glass-hover: rgba(197, 160, 115, 0.22);
  
  --border-color: rgba(180, 148, 108, 0.22);
  --border-color-glow: rgba(197, 160, 115, 0.5);
  
  --text-primary: #1c1712;
  --text-secondary: #524538;
  --text-muted: #857564;
  
  --accent-theme: #c5a073;
  --accent-theme-dark: #9e7a4f;
  --accent-theme-light: #e6d5c3;
  --accent-theme-glow: rgba(197, 160, 115, 0.35);
  
  --accent-terracotta: #c86d4b;
  --accent-emerald: #3f7a61;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', 'Space Grotesk', -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 16px rgba(45, 35, 25, 0.06);
  --shadow-glow: 0 0 30px rgba(197, 160, 115, 0.2);
  --shadow-card: 0 16px 40px -10px rgba(60, 45, 30, 0.08);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.65;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(197, 160, 115, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(230, 213, 195, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(200, 109, 75, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(180, 148, 108, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-theme);
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.18;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

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

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

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }
}

/* Accent Gradients & Badges */
.text-gradient {
  background: linear-gradient(135deg, #1c1712 0%, var(--accent-theme-dark) 60%, var(--accent-theme) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent {
  color: var(--accent-theme-dark);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-theme-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(180, 148, 108, 0.1);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-theme);
  box-shadow: 0 0 10px var(--accent-theme);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Section Header Component */
.section-header {
  margin-bottom: 60px;
}
.section-header.center {
  text-align: center;
}
.section-header .section-subtitle {
  color: var(--accent-theme-dark);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}
.section-header .section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.section-header .section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto;
}

/* --- ATTRACTIVE CUSTOM MOVING CURSOR & TRAIL PARTICLES --- */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background-color: var(--accent-theme-dark);
  border-radius: 50%;
  pointer-events: none !important;
  z-index: 999999 !important;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 0 18px var(--accent-theme-dark), 0 0 8px #ffffff;
}

.custom-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent-theme-dark);
  border-radius: 50%;
  pointer-events: none !important;
  z-index: 999998 !important;
  transform: translate(-50%, -50%);
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  backdrop-filter: blur(1.5px);
  background: rgba(197, 160, 115, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
}

.cursor-trail-container {
  position: fixed;
  inset: 0;
  pointer-events: none !important;
  z-index: 999997 !important;
}

.cursor-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-theme-dark);
  box-shadow: 0 0 10px var(--accent-theme);
  pointer-events: none !important;
  transform: translate(-50%, -50%) scale(1);
  animation: particle-fade 0.55s ease-out forwards;
}

@keyframes particle-fade {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
}

/* Cursor Hover & Drag States */
.cursor-hover .custom-cursor {
  width: 22px;
  height: 22px;
  background-color: var(--accent-terracotta);
  box-shadow: 0 0 24px rgba(200, 109, 75, 0.7);
}

.cursor-hover .custom-cursor-follower {
  width: 68px;
  height: 68px;
  border-color: var(--accent-terracotta);
  background: rgba(200, 109, 75, 0.22);
  box-shadow: 0 0 25px rgba(200, 109, 75, 0.35);
}

.cursor-drag .custom-cursor {
  width: 28px;
  height: 28px;
  background-color: var(--accent-theme-dark);
  box-shadow: 0 0 30px var(--accent-theme-glow);
}

.cursor-drag .custom-cursor-follower {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--accent-theme-dark);
  animation: spin-drag 8s linear infinite;
  background: rgba(197, 160, 115, 0.25);
}

@keyframes spin-drag {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (pointer: coarse), (hover: none) {
  .custom-cursor, .custom-cursor-follower, .cursor-trail-container {
    display: none !important;
  }
}

/* --- FLOATING STICKY NAVIGATION BAR --- */
.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 1100px);
  z-index: 1000;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 30px rgba(60, 45, 30, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  top: 14px;
  padding: 10px 24px;
  background: rgba(252, 250, 247, 0.95);
  border-color: rgba(197, 160, 115, 0.4);
  box-shadow: 0 12px 35px rgba(60, 45, 30, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-theme), var(--accent-theme-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px var(--accent-theme-glow);
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-theme), var(--accent-theme-dark));
  border-radius: var(--radius-full);
  transition: width var(--transition-fast);
}

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

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-theme), var(--accent-theme-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 4px 16px var(--accent-theme-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-theme-glow);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

@media (max-width: 900px) {
  .nav-links, .nav-cta {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

/* Mobile Nav Menu Drawer */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(252, 250, 247, 0.98);
  backdrop-filter: blur(24px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer .nav-link {
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- HERO SECTION --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }
}

.hero-content {
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 800;
  margin: 20px 0 24px;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 36px;
  line-height: 1.65;
}

@media (max-width: 992px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 992px) {
  .hero-actions {
    justify-content: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-theme), var(--accent-theme-dark));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 20px var(--accent-theme-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(197, 160, 115, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

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

/* HERO VISUAL AREA & INTERACTIVE DRAGGABLE FIGMA CARD */
.hero-visual-container {
  position: relative;
  width: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-backdrop-img {
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal);
}

/* DRAGGABLE AI-UI FIGMA CARD WITH ANIMATED POINTER DRAG INDICATOR */
.draggable-card {
  position: absolute;
  top: 12%;
  right: 4%;
  width: 330px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--accent-theme);
  box-shadow: 0 20px 50px rgba(180, 148, 108, 0.25), 0 0 0 4px rgba(197, 160, 115, 0.1);
  cursor: grab;
  user-select: none;
  z-index: 10;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.draggable-card:active {
  cursor: grabbing;
  box-shadow: 0 30px 70px rgba(180, 148, 108, 0.4);
  border-color: var(--accent-terracotta);
}

/* ANIMATED POINTER DRAG INDICATOR OVERLAY */
.drag-pointer-anim {
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(28, 23, 18, 0.88);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: pointer-float 2.5s infinite ease-in-out;
  pointer-events: none;
}

.drag-pointer-anim i {
  color: var(--accent-theme-light);
  animation: drag-arrow-pulse 1.2s infinite ease-in-out;
}

@keyframes pointer-float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

@keyframes drag-arrow-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.drag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(180, 148, 108, 0.2);
}

.drag-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-theme-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.drag-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(197, 160, 115, 0.2);
  color: var(--accent-theme-dark);
}

.drag-prompt-box {
  background: rgba(244, 237, 227, 0.8);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--text-primary);
  margin-bottom: 12px;
  border: 1px solid var(--border-color);
}

.drag-ui-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drag-ui-row {
  height: 12px;
  border-radius: 4px;
  background: rgba(180, 148, 108, 0.2);
}

.drag-ui-row.short { width: 60%; }
.drag-ui-row.accent { background: linear-gradient(90deg, var(--accent-theme), var(--accent-theme-dark)); }

.drag-footer-hint {
  margin-top: 12px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}

/* Floating Badges */
.floating-node {
  position: absolute;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.floating-node.node-1 { top: -10px; left: 8%; animation-delay: 0s; }
.floating-node.node-2 { bottom: 20px; left: 4%; animation-delay: 2s; }
.floating-node.node-3 { bottom: 40px; right: -10px; animation-delay: 4s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

/* --- ABOUT SECTION --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: visible;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent-theme), var(--accent-theme-dark));
}

.about-text {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

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

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tech-pill {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(244, 237, 227, 0.8);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.tech-pill:hover {
  background: var(--accent-theme-dark);
  border-color: var(--accent-theme-dark);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Timeline Cards */
.timeline-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-item {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.timeline-item:hover {
  transform: translateX(6px);
  border-color: var(--accent-theme);
}

.timeline-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(197, 160, 115, 0.15);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-theme-dark);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.timeline-content h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Comic Mascot Easter Egg Floating Button */
.comic-mascot {
  position: relative;
  margin-top: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  z-index: 10;
  cursor: pointer;
}

.speech-bubble {
  background: var(--text-primary);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 18px 18px 2px 18px;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  animation: bounce-gentle 3s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes bounce-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.mascot-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-theme), var(--accent-theme-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  box-shadow: 0 4px 20px var(--accent-theme-glow);
  border: 2px solid #ffffff;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.comic-mascot:hover .mascot-avatar {
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 8px 30px var(--accent-theme-glow);
}

/* --- SKILLS SECTION --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.skill-category-card:hover {
  border-color: var(--accent-theme);
  box-shadow: 0 16px 40px rgba(180, 148, 108, 0.15);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(180, 148, 108, 0.2);
}

.skill-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(197, 160, 115, 0.15);
  color: var(--accent-theme-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.skill-cat-title {
  font-size: 1.25rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
}

.skill-progress-bg {
  height: 8px;
  background: rgba(180, 148, 108, 0.18);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.skill-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent-theme), var(--accent-theme-dark));
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* AI Prompt Simulator Box */
.ai-simulator-box {
  margin-top: 60px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent-theme);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.sim-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.sim-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(244, 237, 227, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sim-btn:hover, .sim-btn.active {
  background: var(--accent-theme-dark);
  border-color: var(--accent-theme-dark);
  color: #ffffff;
}

.sim-output-window {
  background: #1c1712;
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: monospace;
  font-size: 0.88rem;
  color: var(--accent-theme-light);
  min-height: 120px;
  border: 1px solid rgba(180, 148, 108, 0.3);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

/* --- PROJECTS SECTION --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 40px;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.project-card:hover {
  border-color: var(--accent-theme);
  box-shadow: 0 24px 50px rgba(60, 45, 30, 0.12);
}

.project-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-theme-dark);
  text-transform: uppercase;
}

.project-body {
  padding: 28px;
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

.project-card:hover .project-title {
  color: var(--accent-theme-dark);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(180, 148, 108, 0.2);
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-theme-dark);
  transition: gap var(--transition-fast);
}

.project-card:hover .project-link-btn {
  gap: 12px;
}

/* --- IMMERSIVE FULL-SCREEN CASE STUDY MODAL --- */
.case-study-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(252, 250, 247, 0.96);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  overflow-y: auto;
}

.case-study-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(180, 148, 108, 0.15);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-theme-dark);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 24px;
  width: 100%;
}

.modal-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin: 30px 0 40px;
  box-shadow: var(--shadow-card);
}

.case-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 30px;
  overflow-x: auto;
}

.case-tab {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.case-tab.active {
  color: var(--accent-theme-dark);
  border-bottom-color: var(--accent-theme-dark);
}

.case-tab-content {
  display: none;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.case-tab-content.active {
  display: block;
}

.ux-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.ux-box.problem { border-left: 4px solid var(--accent-terracotta); }
.ux-box.solution { border-left: 4px solid var(--accent-emerald); }

/* --- CONTACT SECTION --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

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

.contact-card-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.contact-card-btn:hover {
  border-color: var(--accent-theme);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px var(--accent-theme-glow);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(197, 160, 115, 0.15);
  color: var(--accent-theme-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-control {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-theme);
  box-shadow: 0 0 12px var(--accent-theme-glow);
}

.form-success-toast {
  display: none;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: rgba(63, 122, 97, 0.15);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

/* --- FOOTER --- */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background: #f4ede3;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.back-to-top {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.back-to-top:hover {
  background: var(--accent-theme-dark);
  color: #fff;
}
