/* Google Fonts: Space Grotesk (futuristic sans) */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand Colors - Dark Mode Default */
  --primary: #c98471;        /* Warm Terracotta */
  --primary-hover: #db9c8a;
  --primary-light: rgba(201, 132, 113, 0.15);
  
  --bg-main: #0c0d0f;        /* Near black/slate */
  --bg-card: #15171b;        /* Soft dark gray */
  --bg-nav: rgba(12, 13, 15, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(201, 132, 113, 0.5);
  
  --text-main: #e2e4e9;      /* Crisp light gray */
  --text-muted: #8e95a5;     /* Soft slate */
  --text-inverse: #0c0d0f;
  
  /* Shared Tokens */
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Bahnschrift', 'Segoe UI', sans-serif;
  --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --container-max: 1280px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
}

/* Light Theme Variables */
body.light-theme {
  --bg-main: #faf8f5;        /* Warm alabaster */
  --bg-card: #ffffff;        /* Pure white */
  --bg-nav: rgba(250, 248, 245, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(201, 132, 113, 0.6);
  
  --text-main: #1c1e22;      /* Off-black */
  --text-muted: #6e7582;     /* Medium warm gray */
  --text-inverse: #faf8f5;
  
  --shadow: 0 10px 30px -10px rgba(181, 124, 107, 0.15);
  --shadow-lg: 0 20px 40px -15px rgba(181, 124, 107, 0.25);
}

/* Dramatic 3D Logo Intro Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #08090b;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  overflow: hidden;
}

/* 3D Wireframe Grid Floor Background */
.preloader-bg-grid {
  position: absolute;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background-image: 
    linear-gradient(to right, rgba(201, 132, 113, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 132, 113, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: rotateX(68deg) translateZ(-150px);
  animation: grid3DMove 20s linear infinite;
  pointer-events: none;
}

@keyframes grid3DMove {
  0% { transform: rotateX(68deg) translateZ(-150px) translateY(0); }
  100% { transform: rotateX(68deg) translateZ(-150px) translateY(60px); }
}

.preloader::before {
  content: '';
  position: absolute;
  width: 160%;
  height: 160%;
  background-image: radial-gradient(circle at 50% 50%, rgba(201, 132, 113, 0.25) 0%, transparent 60%);
  animation: pulseGlow3D 3.5s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes pulseGlow3D {
  0% { transform: scale(0.85); opacity: 0.3; }
  100% { transform: scale(1.25); opacity: 0.8; }
}

/* 3D Shutter Curtains */
.preloader-curtain {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background-color: #08090b;
  z-index: 1;
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader-curtain-top {
  top: 0;
  transform-origin: top;
  border-bottom: 1px solid rgba(201, 132, 113, 0.3);
}

.preloader-curtain-bottom {
  bottom: 0;
  transform-origin: bottom;
  border-top: 1px solid rgba(201, 132, 113, 0.3);
}

.preloader.preloader-done .preloader-curtain-top {
  transform: translateY(-100%);
}

.preloader.preloader-done .preloader-curtain-bottom {
  transform: translateY(100%);
}

.preloader.preloader-done .preloader-content {
  opacity: 0;
  transform: scale(0.9) translateZ(-100px);
  transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.preloader-done {
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s 0.9s;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  text-align: center;
  transform-style: preserve-3d;
  animation: floatContent3D 6s ease-in-out infinite alternate;
}

@keyframes floatContent3D {
  0% { transform: rotateX(4deg) rotateY(-3deg) translateZ(0); }
  100% { transform: rotateX(-4deg) rotateY(3deg) translateZ(30px); }
}

/* Enlarged Radial Progress Ring - No Overlap with Logo */
.preloader-logo-wrapper {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.2rem;
  transform-style: preserve-3d;
}

.preloader-radial-svg {
  position: absolute;
  width: 210px;
  height: 210px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 12px rgba(201, 132, 113, 0.95)) drop-shadow(0 0 25px rgba(201, 132, 113, 0.65));
  will-change: transform, filter;
}

.preloader-radial-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 4;
}

.preloader-radial-progress {
  fill: none;
  stroke: #c98471;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 553;
  stroke-dashoffset: 553;
  transition: stroke-dashoffset 0.08s linear;
  filter: drop-shadow(0 0 8px #c98471);
}

/* Rotating Decorative Outer & Inner Rings */
.preloader-ring-outer {
  position: absolute;
  width: 226px;
  height: 226px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 132, 113, 0.4);
  animation: spinClockwise 12s linear infinite;
}

.preloader-ring-inner {
  position: absolute;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.2);
  border-bottom-color: rgba(201, 132, 113, 0.3);
  animation: spinCounter 8s linear infinite;
}

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

@keyframes spinCounter {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* Logo Floating Nicely Inside Radial Circle */
.preloader-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(201, 132, 113, 0.75));
  transform: translateZ(40px);
  animation: logoBreath3D 3s ease-in-out infinite alternate;
}

@keyframes logoBreath3D {
  0% { transform: translateZ(25px) scale(0.96); }
  100% { transform: translateZ(50px) scale(1.06); }
}

.preloader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  transform: translateZ(30px);
}

.preloader-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(201, 132, 113, 0.6), 0 0 40px rgba(255, 255, 255, 0.2);
}

.preloader-sub {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: #8e95a5;
  text-transform: uppercase;
}

.preloader-counter {
  font-size: 1.25rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #c98471;
  transform: translateZ(45px);
  text-shadow: 0 0 15px rgba(201, 132, 113, 0.7);
}

/* Preloader Hidden State */
.preloader.preloader-done {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  /* Blueprint dotted grid background */
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Custom Cursor Styling */
.custom-cursor {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10000;
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  display: none;
}

.custom-cursor-follower {
  width: 32px;
  height: 32px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
  display: none;
}

@media (min-width: 1025px) {
  body.has-custom-cursor, 
  body.has-custom-cursor a, 
  body.has-custom-cursor button, 
  body.has-custom-cursor .portfolio-card, 
  body.has-custom-cursor .accordion-trigger {
    cursor: none !important;
  }
  
  body.has-custom-cursor input, 
  body.has-custom-cursor textarea, 
  body.has-custom-cursor select {
    cursor: text !important;
  }

  .custom-cursor, .custom-cursor-follower {
    display: block;
  }
}

.custom-cursor.hovered {
  width: 12px;
  height: 12px;
  background-color: #ffffff;
}

.custom-cursor-follower.hovered {
  width: 52px;
  height: 52px;
  border-color: var(--primary-hover);
  background-color: var(--primary-light);
}

/* Glowing Ambient Orbs */
.glow-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 132, 113, 0.08) 0%, rgba(201, 132, 113, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body.light-theme .glow-orb {
  background: radial-gradient(circle, rgba(201, 132, 113, 0.04) 0%, rgba(201, 132, 113, 0) 70%);
}

.glow-orb-1 {
  top: 15%;
  left: -200px;
  animation: floatOrb 25s infinite alternate ease-in-out;
}

.glow-orb-2 {
  bottom: 25%;
  right: -200px;
  animation: floatOrb 30s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-30px, 50px) scale(0.9); }
}

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

::selection {
  background: var(--primary);
  color: var(--text-inverse);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-main);
}

.font-serif {
  font-family: var(--font-serif);
  font-weight: 700 !important;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

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

/* Grid & Layout Utilities */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  gap: 2rem;
}

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

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 1.25rem; }
}

section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

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

/* Scroll Reveal Tokens */
.reveal {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
  transform: translateY(50px);
}

.reveal-scale {
  transform: scale(0.96);
}

.reveal.active-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

header.scrolled {
  background-color: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 6rem;
  transition: var(--transition);
}

header.scrolled .nav-container {
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
}

.logo-img,
.logo svg {
  height: 2.4rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: var(--transition);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

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

.logo-text span:first-child {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.logo-text span:last-child {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

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

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  padding: 0.5rem 0;
  color: var(--text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Button & UI elements */
.btn-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-main);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.btn-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

/* Language Toggle Button */
.btn-lang {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-lang:hover,
.btn-lang.active {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}


/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background-color: var(--text-main);
  position: absolute;
  left: 0.5rem;
  transition: var(--transition);
}

.hamburger span:nth-child(1) { top: 0.8rem; }
.hamburger span:nth-child(2) { top: 1.2rem; }
.hamburger span:nth-child(3) { top: 1.6rem; }

.hamburger.active span:nth-child(1) {
  transform: translateY(0.4rem) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-0.4rem) rotate(-45deg);
}

@media (max-width: 900px) {
  .hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem;
    gap: 2rem;
    transition: var(--transition);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.active {
    right: 0;
  }
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(201, 132, 113, 0.4);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--text-inverse);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(201, 132, 113, 0.3);
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  animation: kenBurns 35s infinite alternate ease-in-out;
}

body.light-theme .hero-slide {
  opacity: 0.45;
}

@keyframes kenBurns {
  0% { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1%, -0.5%); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(12,13,15,0.4) 0%, rgba(12,13,15,0.7) 100%);
  z-index: 2;
}

body.light-theme .hero-overlay {
  background: linear-gradient(180deg, rgba(250,248,245,0.4) 0%, rgba(250,248,245,0.75) 100%);
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: auto; /* Active so particles react to mouse hover */
}

.hero .container {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.hero-sub {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
  max-width: 900px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.hero-title strong {
  font-weight: 500;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 3.5rem;
  font-weight: 300;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

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

@media (max-width: 576px) {
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* About Section */
.section-meta {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 3.5rem;
  line-height: 1.15;
}

.about-intro {
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.about-details {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* Area of Expertise Grid */
.expertise-section {
  position: relative;
  background-image: linear-gradient(180deg, rgba(12, 13, 15, 0.82) 0%, rgba(12, 13, 15, 0.90) 100%), url('assets/images/expertise_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body.light-theme .expertise-section {
  background-image: linear-gradient(180deg, rgba(250, 248, 245, 0.86) 0%, rgba(250, 248, 245, 0.93) 100%), url('assets/images/expertise_bg.png');
}

.expertise-card {
  padding: 2.5rem;
  border: 1px solid var(--border);
  background-color: rgba(18, 20, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

body.light-theme .expertise-card {
  background-color: rgba(255, 255, 255, 0.85);
}

.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.expertise-card:hover::before {
  transform: scaleX(1);
}

.expertise-card:hover {
  border-color: var(--primary);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.expertise-icon {
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.expertise-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: currentColor;
}

.expertise-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.expertise-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.expertise-list li {
  position: relative;
  padding-left: 1.25rem;
}

.expertise-list li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Department Tabs & Portfolio */
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.portfolio-header .section-title {
  margin-bottom: 0;
}

.filter-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  list-style: none;
}

.filter-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.7rem 1.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: 4px;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
  box-shadow: 0 4px 15px -3px rgba(201, 132, 113, 0.4);
}

/* Portfolio Masonry Grid with 3D Perspective */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  perspective: 1200px;
}

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

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

.portfolio-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  height: 380px;
  cursor: pointer;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.1s ease;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.portfolio-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

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

.portfolio-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.2rem;
  background: linear-gradient(360deg, rgba(12, 13, 15, 0.95) 0%, rgba(12, 13, 15, 0.65) 60%, transparent 100%);
  color: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 65%;
  transition: var(--transition);
  transform: translateZ(30px);
  pointer-events: none;
}

body.light-theme .portfolio-content {
  background: linear-gradient(360deg, rgba(250, 248, 245, 0.98) 0%, rgba(250, 248, 245, 0.7) 60%, transparent 100%);
  color: var(--text-main);
}

.portfolio-dept {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 0.5rem;
}

.portfolio-name {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.portfolio-meta-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  max-height: 0;
  overflow: hidden;
}

.portfolio-card:hover .portfolio-meta-summary {
  opacity: 1;
  transform: translateY(0);
  max-height: 3.5rem;
  margin-top: 0.5rem;
}

/* Highlight sweeping overlay for dynamic shine */
.portfolio-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 100%);
  transform: skewX(-25deg);
  transition: var(--transition);
  z-index: 3;
  pointer-events: none;
}

.portfolio-card:hover::after {
  animation: shineSweep 1.2s ease-in-out;
}

@keyframes shineSweep {
  100% { left: 125%; }
}

/* Our Team */
#team {
  position: relative;
  background-image: linear-gradient(180deg, rgba(12, 13, 15, 0.85) 0%, rgba(12, 13, 15, 0.92) 100%), url('assets/images/team_bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body.light-theme #team {
  background-image: linear-gradient(180deg, rgba(250, 248, 245, 0.88) 0%, rgba(250, 248, 245, 0.94) 100%), url('assets/images/team_bg.jpg');
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

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

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

.team-card {
  background-color: rgba(18, 20, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

body.light-theme .team-card {
  background-color: rgba(255, 255, 255, 0.90);
}

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

.team-avatar-container {
  height: 340px;
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.team-avatar-container svg {
  width: 5rem;
  height: 5rem;
  opacity: 0.25;
}

.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: var(--transition);
}

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

.team-info {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.team-role {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.team-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-experience {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Secondary Team Expandable Section */
.team-other-sections {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

.accordion-item {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 1.8rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.accordion-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: var(--transition-fast);
}

.accordion-trigger:hover .accordion-title {
  color: var(--primary);
}

.accordion-icon {
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
  transition: var(--transition);
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  background-color: var(--text-main);
  position: absolute;
  transition: var(--transition);
}

.accordion-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.accordion-icon::after {
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-item.active .accordion-icon::after {
  opacity: 0;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-inner {
  padding-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 3rem;
}

@media (max-width: 768px) {
  .people-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.person-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.5rem;
  align-items: baseline;
}

.person-name {
  font-weight: 500;
  color: var(--text-main);
}

.person-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
}

/* News & Insights Section */
.news-section {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.news-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.news-img {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.news-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: rgba(12, 13, 15, 0.85);
  backdrop-filter: blur(6px);
  color: var(--primary);
  border: 1px solid var(--primary);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}

.news-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.news-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.news-card:hover .news-card-title {
  color: var(--primary);
}

.news-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Legal Standing Section */
.legal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.legal-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.legal-card {
  padding: 2rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.legal-card:hover {
  transform: translateX(8px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.legal-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Contact & Footer */
.contact-section {
  padding-bottom: 4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
}

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

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1.5rem;
}

.contact-info-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 1.8rem;
  height: 1.8rem;
  fill: currentColor;
}

.contact-info-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-info-val {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Contact Form */
.contact-form-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem;
  position: relative;
  z-index: 20;
  cursor: auto !important;
}

.contact-form-container label {
  cursor: pointer !important;
}

.contact-form-container input,
.contact-form-container textarea {
  cursor: text !important;
}

@media (max-width: 576px) {
  .contact-form-container {
    padding: 1.5rem;
  }
}

.contact-form {
  position: relative;
  z-index: 30;
}

.form-group {
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 40;
}

.form-label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-main);
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
  box-sizing: border-box;
  display: block;
  position: relative;
  z-index: 50;
  pointer-events: auto !important;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.9rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(201, 132, 113, 0.06);
  box-shadow: 0 0 15px rgba(201, 132, 113, 0.25);
}

.contact-form textarea.form-control {
  height: 130px;
  resize: vertical;
}

.form-feedback {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.form-feedback.error {
  display: block;
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Footer bottom */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background-color: var(--bg-main);
}

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

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

.footer-socials {
  display: flex;
  gap: 1.5rem;
}

.footer-socials a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-socials a:hover {
  color: var(--primary);
}

/* Portfolio Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(12, 13, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 2rem;
}

body.light-theme .modal {
  background-color: rgba(250, 248, 245, 0.97);
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(30px);
  transition: var(--transition);
}

.modal.active .modal-wrapper {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
  transform: rotate(90deg);
}

.modal-close svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.modal-hero {
  height: 400px;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

@media (max-width: 768px) {
  .modal-hero {
    height: 250px;
  }
}

.modal-body {
  padding: 3rem;
}

@media (max-width: 576px) {
  .modal-body {
    padding: 1.5rem;
  }
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

/* Modal Gallery Thumbnails */
.modal-gallery {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.modal-gallery-thumb {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--border);
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.modal-gallery-thumb:hover,
.modal-gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary);
  transform: scale(1.05);
}


@media (max-width: 768px) {
  .modal-meta-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.modal-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.modal-dept {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  display: block;
}

.modal-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.modal-table {
  border-collapse: collapse;
  width: 100%;
}

.modal-table td {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.modal-table td:first-child {
  font-weight: 600;
  color: var(--text-main);
  width: 40%;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.modal-table td:last-child {
  color: var(--text-muted);
}

/* Image Copyright & Anti-Download Protection */
img, 
.project-card-img, 
.modal-hero, 
.modal-gallery-thumb, 
.news-img, 
.team-avatar, 
.expertise-card,
.preloader-logo {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
}

/* Shield Overlay on Project Images */
.project-card-img::after,
.news-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
}

/* Modal hero shield: only active when modal is visible */
.modal.active .modal-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
}

/* Toast Copyright Notice */
.copyright-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: rgba(12, 13, 15, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #c98471;
  color: #ffffff;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.05em;
  z-index: 999999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(201, 132, 113, 0.4);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.copyright-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
