/* TTG Studios Main Stylesheet */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #533483 100%);
  color: #ffffff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23ffffff" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  z-index: -1;
  pointer-events: none;
}

/* Navigation */
nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 3rem);
  max-width: 1200px;
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 1rem 2rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

nav:hover {
  background: rgba(15, 15, 35, 0.95);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
  transition: all 0.3s ease;
  filter: brightness(1.1);
}

.logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.nav-menu {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 0;
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 30px;
  height: 30px;
  justify-content: space-between;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

body.light-mode .hamburger span {
  background: #1a1a1a;
}

/* Theme Toggle Switch */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  --background: #7877c6;
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  transition: .5s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  border-radius: 50%;
  left: 10%;
  bottom: 15%;
  box-shadow: inset 8px -4px 0px 0px #fff000;
  background: var(--background);
  transition: .5s;
}

input:checked + .slider {
  background-color: #a8a8f0;
}

input:checked + .slider:before {
  transform: translateX(100%);
  box-shadow: inset 15px -4px 0px 15px #fff000;
}

nav a {
  color: #e5e5e5;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7877c6, #a8a8f0);
  transition: width 0.3s ease;
}

nav a:hover, nav a.active {
  color: #ffffff;
}

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

/* Main Content */
main {
  padding-top: 120px;
  min-height: calc(100vh - 120px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: inline-block;
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff, #a8a8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: #ffffff;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #a8a8f0;
  letter-spacing: 0.3px;
}

p {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  color: #e5e5e5;
}

a {
  color: #a8a8f0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* Content Sections */
.content-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.portfolio-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.portfolio-item-content {
  padding: 1rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: #fff;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #a8a8f0;
  background: rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.btn {
  background: linear-gradient(135deg, #7877c6, #a8a8f0);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(120, 119, 198, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(120, 119, 198, 0.4);
}

/* Footer */
footer {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

footer p {
  font-size: 0.9rem;
  margin: 0;
  color: #a0a0a0;
}

/* Light Mode Styles */
body.light-mode {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 25%, #dee2e6 50%, #ced4da 75%, #adb5bd 100%);
  color: #1a1a1a;
}

body.light-mode::before {
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 193, 7, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 75% 75%, rgba(0, 123, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(108, 117, 125, 0.1) 0%, transparent 50%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
}

body.light-mode::after {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23000000" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

body.light-mode nav {
  background: rgba(248, 249, 250, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode nav:hover {
  background: rgba(248, 249, 250, 0.95);
}



body.light-mode nav a {
  color: #4a4a4a;
}

body.light-mode nav a:hover,
body.light-mode nav a.active {
  color: #1a1a1a;
}

body.light-mode .slider {
  --background: #4a4a4a;
}

body.light-mode input:checked + .slider {
  background-color: #7877c6;
}

body.light-mode h1 {
  background: linear-gradient(135deg, #1a1a1a, #7877c6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode h2 {
  color: #1a1a1a;
}

body.light-mode h3 {
  color: #7877c6;
}

body.light-mode p {
  color: #4a4a4a;
}

body.light-mode a {
  color: #7877c6;
}

body.light-mode a:hover {
  color: #1a1a1a;
}

body.light-mode .hero-content {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .content-section {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .service-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .service-card:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

body.light-mode .portfolio-item {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .portfolio-item:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
  border-color: #7877c6;
  background: rgba(255, 255, 255, 0.9);
}

body.light-mode .form-group input::placeholder,
body.light-mode .form-group textarea::placeholder {
  color: rgba(26, 26, 26, 0.6);
}

body.light-mode footer {
  background: rgba(248, 249, 250, 0.9);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode footer p {
  color: #6a6a6a;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 1.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  nav {
    top: 1rem;
    width: calc(100% - 2rem);
    padding: 0.8rem 1.5rem;
    border-radius: 16px;
  }
  
  .logo {
    height: 35px;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li a {
    font-size: 1.5rem;
    font-weight: 500;
  }
  
  body.light-mode .nav-menu {
    background: rgba(248, 249, 250, 0.98);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero-content {
    padding: 2rem;
    max-width: 90%;
  }
  
  .container {
    padding: 1rem;
  }
  
  .content-section {
    padding: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 640px) {
  nav {
    padding: 0.8rem 1rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  nav a {
    font-size: 0.9rem;
  }
  
  .switch {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .content-section {
    padding: 1.5rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  nav {
    top: 0.5rem;
    width: calc(100% - 1rem);
    padding: 0.8rem 1rem;
    border-radius: 12px;
  }
  
  .logo {
    height: 30px;
  }
  
  .hamburger {
    width: 25px;
    height: 25px;
  }
  
  .nav-menu li a {
    font-size: 1.3rem;
  }
  
  h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.1rem;
  }
  
  p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  
  .hero {
    padding: 1.5rem 0;
  }
  
  .hero-content {
    padding: 1.2rem;
    max-width: 95%;
  }
  
  .container {
    padding: 0.8rem;
  }
  
  .content-section {
    padding: 1.2rem;
  }
  
  .service-card {
    padding: 1.2rem;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
  }
  
  main {
    padding-top: 120px;
  }
}

@media (max-width: 360px) {
  nav ul {
    gap: 0.5rem;
  }
  
  nav a {
    font-size: 0.8rem;
  }
  
  h1 {
    font-size: 1.6rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .content-section {
    padding: 1rem;
  }
  
  .service-card {
    padding: 1rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover {
    transform: none;
  }
  
  .portfolio-item:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  nav a:hover::after {
    width: 0;
  }
  
  .slider:hover {
    transform: none;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}