/* ==========================================================================
   Vikhyath M — Editorial Motion Portfolio Design System
   ========================================================================== */

:root {
  --bg-dark: #0b0a09;
  --bg-dark-translucent: rgba(14, 13, 11, 0.78);
  --bg-card: rgba(22, 20, 18, 0.88);

  --terracotta: #d95338;
  --terracotta-bright: #e85d3b;
  --terracotta-glow: rgba(217, 83, 56, 0.35);

  --text-main: #f5f0eb;
  --text-muted: #c8c2ba;
  --text-dim: #8c857b;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-terracotta: rgba(217, 83, 56, 0.35);

  --font-display: 'Cinzel', 'Space Grotesk', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-signature: 'Playfair Display', serif;

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

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--terracotta);
  border-radius: 4px;
}

/* Utility Containers */
.container {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
}

.terracotta-text {
  color: var(--terracotta-bright);
}

.text-highlight {
  color: #ffffff;
}

/* Preloader */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(217, 83, 56, 0.2);
  border-top-color: var(--terracotta-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader-text {
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ==========================================================================
   Background 3D Head Animation & Watermark Placement
   ========================================================================== */
.canvas-fixed-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Darker Background Watermark (Placed behind canvas) */
.editorial-watermark {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 15rem);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 4px;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

.hero-terracotta-halo {
  position: absolute;
  width: min(560px, 85vw);
  height: min(560px, 85vw);
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.85;
  filter: blur(2px);
  box-shadow: 0 0 120px var(--terracotta-glow);
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#animation-canvas {
  position: absolute;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 3;
}

.canvas-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: radial-gradient(circle at center, transparent 35%, rgba(11, 10, 9, 0.75) 100%);
  pointer-events: none;
}

/* ==========================================================================
   Full-Width Glassmorphic Navigation Bar
   ========================================================================== */
.glass-navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1320px, calc(100% - 32px));
  z-index: 100;
  background: rgba(14, 13, 11, 0.72);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 14px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.glass-navbar.nav-hidden {
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-symbol {
  font-size: 1.2rem;
  color: var(--terracotta-bright);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 1.5px;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--terracotta-bright);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.glass-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.glass-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--terracotta-bright);
}

.nav-cta-btn {
  background: var(--terracotta);
  color: #ffffff;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-cta-btn:hover {
  background: var(--terracotta-bright);
  box-shadow: 0 0 20px var(--terracotta-glow);
}

.nav-toggle-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle-btn span {
  width: 22px;
  height: 2px;
  background: #fff;
}

/* Side Badges */
.side-badge {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--text-dim);
  pointer-events: none;
}

.side-left {
  left: 20px;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}

.side-right {
  right: 20px;
  writing-mode: vertical-rl;
}

.badge-line {
  width: 1px;
  height: 30px;
  background: var(--border-subtle);
}

/* ==========================================================================
   Scroll Storytelling Wrapper & Sections
   ========================================================================== */
.story-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.story-section {
  min-height: 100vh;
  padding: 120px 0;
  display: flex;
  align-items: center;
  position: relative;
}

.flex-right-align {
  display: flex;
  justify-content: flex-end;
}

.flex-left-align {
  display: flex;
  justify-content: flex-start;
}

.flex-center-align {
  display: flex;
  justify-content: center;
}

/* Editorial Pop Cards */
.pop-card {
  background: var(--bg-card);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.pop-right {
  transform: translateX(80px);
}
.pop-left {
  transform: translateX(-80px);
}
.pop-bottom {
  transform: translateY(80px);
}
.pop-center {
  transform: scale(0.9);
  max-width: 640px;
}

.pop-card.active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.card-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--terracotta-bright);
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.card-text {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==========================================================================
   Section 1: Split Landing Page (Hero)
   ========================================================================== */
.hero-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 80vh;
}

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

.hero-col-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(217, 83, 56, 0.12);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--terracotta-bright);
  margin-bottom: 20px;
}

.hero-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 28px;
}

.hero-action-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-editorial {
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-editorial.primary {
  background: var(--terracotta);
  color: #fff;
}
.btn-editorial.primary:hover {
  background: var(--terracotta-bright);
  box-shadow: 0 0 25px var(--terracotta-glow);
}

.btn-editorial.outline {
  background: rgba(217, 83, 56, 0.14);
  border: 1.5px solid var(--border-terracotta);
  color: #ffffff;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.btn-editorial.outline:hover {
  background: var(--terracotta-bright);
  border-color: var(--terracotta-bright);
  color: #ffffff;
  box-shadow: 0 0 25px var(--terracotta-glow);
}

.hero-col-right {
  display: flex;
  justify-content: flex-end;
}

/* Compact & Shifted Right Hero Bio Card */
.compact-right-bio {
  max-width: 380px;
  padding: 24px;
  margin-left: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.compact-right-bio h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--terracotta-bright);
}

.compact-right-bio p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Compact Center-Bottom Name & Tagline */
.hero-bottom-name-container {
  margin-top: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-big-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--terracotta-bright);
  text-shadow: 0 10px 40px rgba(217, 83, 56, 0.4), 0 0 50px rgba(0, 0, 0, 0.9);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.hero-sub-tagline {
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-main);
  text-transform: uppercase;
}

/* ==========================================================================
   Section 2: About
   ========================================================================== */
.education-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.edu-item {
  display: flex;
  flex-direction: column;
}

.edu-degree {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.edu-school {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--terracotta-bright);
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ==========================================================================
   Section 3: Projects
   ========================================================================== */
.sub-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.projects-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.project-editorial-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.project-editorial-card:hover {
  border-color: var(--terracotta-bright);
  transform: translateY(-2px);
}

.proj-img-wrap {
  position: relative;
  width: 70px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.proj-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proj-num {
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}

.proj-meta h3 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
}

.proj-meta span {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: block;
}

/* ==========================================================================
   Section: Freelance Services & Digital Products Showcase
   ========================================================================== */
.freelance-editorial-card {
  max-width: 1080px;
  width: 100%;
}

.freelance-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
  margin-bottom: 36px;
}

.freelance-service-item {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.freelance-service-item:hover {
  border-color: var(--terracotta-bright);
  transform: translateY(-3px);
}

.service-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--terracotta-bright);
  margin-bottom: 8px;
  letter-spacing: 1.5px;
}

.freelance-service-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff;
}

.service-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.service-features li {
  font-size: 0.82rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 16px;
}

.service-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--terracotta-bright);
  font-weight: bold;
}

.proof-badge-row {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.proof-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.proof-pill {
  background: rgba(217, 83, 56, 0.18);
  border: 1px solid var(--border-terracotta);
  color: var(--terracotta-bright);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Tech Stack Categorized Grid */
.tech-stack-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.stack-section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--terracotta-bright);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-align: center;
}

.tech-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.tech-cat-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--terracotta-bright);
  text-transform: uppercase;
}

.cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Process Section */
.process-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.process-step {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--terracotta-bright);
}

.process-step h4 {
  font-family: var(--font-display);
  font-size: 1.0rem;
  font-weight: 700;
}

.process-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* CTA Banner */
.cta-banner {
  background: rgba(217, 83, 56, 0.12);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.cta-banner h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.cta-banner p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.55;
}

.cta-btn-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   Section 4: Technical Skills - Outwards Aligned (Matching Container & Equal Dimensions)
   ========================================================================== */
.services-two-cards-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 32px;
}

.table-box-card {
  flex: 1;
  max-width: 480px;
  width: 100%;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.capabilities-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  flex: 1;
  justify-content: space-between;
}

.srv-col {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.srv-icon {
  font-size: 1.2rem;
  color: var(--terracotta-bright);
  margin-bottom: 4px;
}

.srv-col h3 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.srv-col p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.skills-editorial-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.sk-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.sk-pct {
  color: var(--terracotta-bright);
  font-family: var(--font-display);
  font-weight: 700;
}

.sk-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sk-fill {
  height: 100%;
  background: var(--terracotta);
}

.tech-badge-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.t-badge {
  background: rgba(217, 83, 56, 0.12);
  border: 1px solid var(--border-terracotta);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ==========================================================================
   Section 5: Contact & In-Place Thank You
   ========================================================================== */
.contact-editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.contact-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.contact-box .lbl {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.contact-box a, .contact-box span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.social-links-inline a {
  color: var(--terracotta-bright);
}

.quick-form {
  margin-bottom: 24px;
}

.form-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-inputs input:not([type="checkbox"]):not([type="hidden"]), .form-inputs textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
}

.form-inputs input:focus, .form-inputs textarea:focus {
  border-color: var(--terracotta-bright);
}

.in-place-thank-you {
  background: rgba(217, 83, 56, 0.12);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Project Type Selector */
.project-type-selector {
  margin-bottom: 18px;
  text-align: left;
}

.selector-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--terracotta-bright);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.project-type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-type-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.project-type-pill:hover,
.project-type-pill.selected {
  background: rgba(217, 83, 56, 0.22);
  border-color: var(--terracotta-bright);
  color: #ffffff;
  box-shadow: 0 0 14px var(--terracotta-glow);
}

.thank-check-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
}

.in-place-thank-you h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--terracotta-bright);
}

.in-place-thank-you p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.scroll-top-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.back-top-btn {
  background: rgba(217, 83, 56, 0.15);
  border: 1px solid var(--border-terracotta);
  color: var(--terracotta-bright);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Footer */
.editorial-footer {
  position: relative;
  z-index: 10;
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-dark);
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

.footer-actions {
  display: flex;
  gap: 16px;
}

.footer-btn {
  background: none;
  border: none;
  color: var(--terracotta-bright);
  cursor: pointer;
}

/* Floating AI Chatbot Button & In-Page Container */
.glass-chatbot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  background: rgba(14, 13, 11, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-full);
  padding: 12px 22px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.glass-chatbot-btn.btn-hidden {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}

.bot-emoji {
  font-size: 1.1rem;
}

.chatbot-floating-container {
  position: fixed;
  bottom: 85px;
  right: 24px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.chatbot-floating-container.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.chat-opt-btn {
  background: rgba(217, 83, 56, 0.14);
  border: 1px solid var(--border-terracotta);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.chat-opt-btn:hover {
  background: var(--terracotta-bright);
  color: #ffffff;
  transform: translateX(4px);
}

.resume-modal-overlay, .project-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.resume-modal-overlay.active, .project-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.glass-panel-nav {
  background: rgba(20, 18, 16, 0.96);
  border: 1px solid var(--border-terracotta);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
}

.chatbot-window {
  width: min(450px, 90vw);
  height: 540px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-bot-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-icon {
  font-size: 1.4rem;
}

.bot-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.bot-status {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-reset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}
.chat-reset-btn:hover {
  background: rgba(217, 83, 56, 0.3);
  transform: rotate(180deg);
  border-color: var(--terracotta-bright, #d95338);
}

.chat-close-btn, .resume-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.chat-close-btn:hover, .resume-close-btn:hover {
  color: var(--terracotta-bright, #d95338);
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.5;
}
.bot-msg {
  background: rgba(255, 255, 255, 0.08);
  align-self: flex-start;
}
.user-msg {
  background: var(--terracotta);
  color: #fff;
  align-self: flex-end;
}

.chat-quick-prompts {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
}

.quick-prompt-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.chat-input-form {
  padding: 12px;
  display: flex;
  gap: 8px;
}

#chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: #fff;
  font-size: 0.85rem;
}

.chat-send-btn {
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.project-modal-window {
  width: min(580px, 92vw);
  padding: 28px;
}

.project-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.project-modal-body p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.tech-stack-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--terracotta-bright);
}

.resume-modal-window {
  width: min(760px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.resume-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resume-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.resume-modal-body {
  padding: 28px;
  overflow-y: auto;
}

.resume-content-box h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--terracotta-bright);
}

.role-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-line {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.divider {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

.job-item {
  margin-bottom: 14px;
}

.job-item h4 {
  font-size: 0.92rem;
  font-weight: 700;
}

.job-item p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Mobile UI/UX Optimization Design System
   ========================================================================== */

@media (max-width: 900px) {
  .hero-content-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .hero-col-left {
    align-items: center;
    text-align: center;
  }
  
  .hero-col-right {
    justify-content: center;
    width: 100%;
  }

  .compact-right-bio {
    max-width: 100%;
    margin: 0;
  }

  .services-two-cards-container {
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }
  
  .table-box-card {
    max-width: 100%;
    min-height: auto;
  }
  
  .projects-mini-grid {
    grid-template-columns: 1fr;
  }

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

  .freelance-services-grid {
    grid-template-columns: 1fr;
  }

  .tech-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tech-categories-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .side-badge {
    display: none;
  }

  .container {
    width: calc(100% - 32px);
  }

  .story-section {
    padding: 70px 0;
    min-height: auto;
  }

  /* Reset horizontal slide transforms on mobile to avoid overflow */
  .pop-right, .pop-left {
    transform: translateY(30px);
  }

  .pop-card {
    padding: 24px 20px;
    max-width: 100%;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  }

  /* Mobile Glass Navbar */
  .glass-navbar {
    top: 12px;
    width: calc(100% - 24px);
    padding: 10px 18px;
  }

  .brand-name {
    font-size: 0.88rem;
  }
  
  .brand-sub {
    font-size: 0.6rem;
  }

  .glass-nav-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .nav-cta-btn {
    padding: 6px 14px;
    font-size: 0.78rem;
  }

  .nav-menu {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    background: rgba(14, 13, 11, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-terracotta);
    border-radius: var(--radius-lg);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    display: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 6px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
  }

  .nav-toggle-btn {
    display: flex;
  }

  /* Hero Mobile Typography & CTAs */
  .hero-main-title {
    font-size: clamp(1.6rem, 6.5vw, 2.4rem);
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .hero-tagline {
    font-size: 0.92rem;
    margin-bottom: 22px;
  }

  .hero-action-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .btn-editorial {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.88rem;
  }

  .hero-bottom-name-container {
    margin-top: 36px;
  }

  .hero-big-name {
    font-size: clamp(1.8rem, 7.5vw, 2.8rem);
    letter-spacing: 2px;
  }

  .hero-sub-tagline {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  /* Form & Touch Target Mobile Adjustments */
  .form-inputs input, .form-inputs textarea {
    font-size: 16px; /* Prevents auto-zoom on iOS */
    padding: 14px 16px;
  }

  /* Floating Chatbot Mobile Full Sheet */
  .glass-chatbot-btn {
    bottom: 16px;
    right: 16px;
    padding: 10px 18px;
    font-size: 0.82rem;
  }

  .chatbot-floating-container {
    bottom: 12px;
    right: 12px;
    left: 12px;
    top: 12px;
    width: auto;
    height: auto;
  }

  .chatbot-window {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
  }

  /* Modals Mobile Optimization */
  .resume-modal-overlay, .project-modal-overlay {
    padding: 12px;
  }

  .resume-modal-window, .project-modal-window {
    width: 100%;
    max-height: 90vh;
    padding: 18px;
  }

  .resume-modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .resume-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .pop-card {
    padding: 20px 14px;
  }

  .card-title {
    font-size: 1.5rem;
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat-num {
    font-size: 1.3rem;
  }

  .stat-lbl {
    font-size: 0.65rem;
  }

  .proj-img-wrap {
    width: 58px;
    height: 46px;
  }

  .proj-meta h3 {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   LEGAL, PRIVACY POLICY & COOKIES STYLING
   ========================================================================== */
.legal-container {
  position: relative;
  z-index: 10;
  max-width: 920px;
  margin: 140px auto 60px auto;
  padding: 0 24px;
}

.legal-card {
  padding: 48px;
  background: var(--bg-card, rgba(22, 20, 18, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg, 24px);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.legal-title {
  font-family: var(--font-display, 'Cinzel', sans-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  margin: 12px 0 6px 0;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--text-dim, #8c857b);
  margin-bottom: 36px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--terracotta-bright, #e85d3b);
  margin-bottom: 12px;
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted, #c8c2ba);
  margin-bottom: 12px;
}

.legal-section ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-section li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted, #c8c2ba);
  margin-bottom: 6px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  overflow: hidden;
}

.legal-table th, .legal-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-table th {
  background: rgba(217, 83, 56, 0.15);
  color: #fff;
  font-weight: 700;
}

.legal-table td {
  color: #c8c2ba;
}

.privacy-contact-box {
  background: rgba(217, 83, 56, 0.08);
  border-left: 4px solid var(--terracotta-bright, #e85d3b);
  padding: 16px 20px;
  border-radius: 6px;
  margin-top: 12px;
}

.privacy-contact-box a {
  color: var(--terracotta-bright, #e85d3b);
  font-weight: 600;
  text-decoration: none;
}

.legal-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Top Back Navigation Link for Legal Pages */
.legal-top-nav {
  margin-bottom: 24px;
}

.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 20, 18, 0.85);
  border: 1px solid rgba(217, 83, 56, 0.4);
  color: var(--terracotta-bright, #e85d3b);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-back-link:hover {
  background: var(--terracotta-bright, #e85d3b);
  color: #ffffff;
  transform: translateX(-4px);
  border-color: var(--terracotta-bright, #e85d3b);
  box-shadow: 0 6px 20px rgba(217, 83, 56, 0.4);
}

/* Single-Line Premium Privacy Consent Checkbox */
.form-consent-group {
  margin: 14px 0 10px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  transition: border-color 0.2s ease;
}

.form-consent-group:hover {
  border-color: var(--terracotta-bright, #e85d3b);
}

.consent-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  color: var(--text-muted, #c8c2ba) !important;
  cursor: pointer !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.form-inputs input.consent-checkbox,
.consent-checkbox {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  accent-color: var(--terracotta-bright, #e85d3b) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.custom-tick-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 5px !important;
  background: rgba(217, 83, 56, 0.18) !important;
  color: var(--terracotta-bright, #e85d3b) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(217, 83, 56, 0.45) !important;
}

.consent-text {
  flex: 1 !important;
  font-size: 0.82rem !important;
  color: var(--text-muted, #c8c2ba) !important;
  line-height: 1.35 !important;
  white-space: normal !important;
}

.form-privacy-notice {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim, #88827c);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.form-privacy-notice a {
  color: var(--terracotta-bright, #d95338);
  text-decoration: none;
}

.form-privacy-notice a:hover {
  text-decoration: underline;
}

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

.footer-legal-links a {
  color: var(--text-dim, #a09a94);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: var(--terracotta-bright, #d95338);
}

