/*
   Tinchu Philip Portfolio
   Theme: Cinematic Dark (Black, White, Orange Accent)
*/

:root {
  /* Core Colors */
  --bg-body: #000000;
  --bg-light: #0a0a0a;
  /* Very dark gray for contrast sections */
  --bg-card: #111111;

  --text-main: #ffffff;
  --text-muted: #b0b0b0;
  --text-dark: #000000;
  /* For buttons or light backgrounds */

  --primary: #FF940C;
  /* The requested Orange */
  --primary-hover: #ffaa3d;
  /* Lighter orange for specific interactions */
  --primary-gradient: linear-gradient(135deg, #FFBD59 0%, #FF940C 50%, #E36400 100%);
  /* New Gradient version of Primary */

  --border-color: #333333;

  /* Typography */
  --font-serif: 'Playfair Display', serif;
  /* Global Sans Font changed to Montserrat as requested */
  --font-sans: 'Montserrat', sans-serif;
  /* Hero specific Sans Font to preserve original look */
  --font-hero-sans: 'Inter', sans-serif;

  /* Spacing */
  --container-width: 1140px;
  --section-padding: 100px 0;
  --header-height: 80px;
}

/* Hero Section Font Preservation */
.hero-subtitle,
.hero-description,
.hero .btn {
  font-family: var(--font-hero-sans) !important;
}

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

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

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

.section-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-subtitle {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
  /* Fallback */
  margin-bottom: 2rem;
  display: block;
}

span.highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding);
}

.bg-light {
  background-color: var(--bg-light);
}

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

/* Components */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-image: var(--primary-gradient);
  color: #000;
  /* Black text on orange provides better contrast/visibility */
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #fff;
  border-color: #fff;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(255, 148, 12, 0.4);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-main);
  text-decoration: underline;
  padding: 14px 20px;
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  /* Dark transparent background */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.nav-list {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s ease;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-image: var(--primary-gradient);
  transition: width 0.3s ease;
}

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

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  height: 100vh;
  padding-top: var(--header-height);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-body);
}

/* Video Background */
.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-video-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  /* Overlay to make text readable */
  z-index: 1;
}

.hero-video-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%) scale(1.5);
  /* Scale to hide controls/bars slightly */
  pointer-events: none;
  /* Prevent interaction with video background */
  min-width: 177.77vh;
  /* 16:9 Aspect Ratio maintenance */
  min-height: 56.25vw;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
  /* text above video overlay */
}

.hero-subtitle {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-title {
  font-size: clamp(3.5rem, 6vw, 5rem);
  margin-bottom: 2rem;
  color: var(--text-main);
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #ffffff;
}

.hero-description {
  font-size: 1.25rem;
  color: #cccccc;
  margin-bottom: 3rem;
  max-width: 600px;
  font-weight: 300;
}

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

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border-color);
}

.about-image {
  width: 100%;
  aspect-ratio: 1/1;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: all 0.5s ease;
}

.about-image:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.about-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.about-bio strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.skill-item {
  background: var(--bg-card);
  padding: 40px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.skill-item h3 {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.skill-item p {
  font-size: 0.9rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.skill-line {
  width: 40px;
  height: 2px;
  background-color: var(--border-color);
  margin-bottom: 1rem;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.skill-item:hover .skill-line {
  width: 60px;
  background-image: var(--primary-gradient);
  background-color: transparent;
}

.skill-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.project-card {
  background: var(--primary-card-bg, #111111);
  /* Card bg just in case */
  border: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.project-card:hover {
  border-color: var(--primary);
}

.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
  overflow: hidden;
}

.placeholder-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  background-color: #1a1a1a;
  transition: transform 0.6s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.view-project-btn {
  background-image: var(--primary-gradient);
  color: #000;
  padding: 12px 24px;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.view-project-btn:hover {
  background: #fff;
  color: #000;
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Services */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
  /* Small gap for border effect */
  background-color: var(--border-color);
  /* Lines between items */
  border: 1px solid var(--border-color);
  margin-top: 60px;
}

.service-item {
  text-align: center;
  padding: 50px 30px;
  background-color: var(--bg-body);
  transition: background-color 0.3s ease;
}

.service-item:hover {
  background-color: var(--bg-light);
}

.service-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1;
  opacity: 0.8;
}

.service-item h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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


/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
}

.contact-content p {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

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

.detail-item {
  margin-bottom: 1.5rem;
}

.detail-item .label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.detail-item .value {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-main);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

/* Footer */
.footer {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-body);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Submission Popup */
.form-popup {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  /* Dark backdrop */
  backdrop-filter: blur(5px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.form-popup.show {
  display: flex;
  opacity: 1;
}

.popup-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.8);
  transition: transform 0.4s ease;
}

.form-popup.show .popup-content {
  transform: scale(1);
}

.popup-icon {
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
  margin-bottom: 20px;
}

.popup-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.popup-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 25px;
}

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

  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }

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

  .mobile-toggle {
    display: block;
    color: #fff;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: #000;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .nav.active {
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .nav-link {
    font-size: 1.2rem;
    display: block;
    padding: 10px 0;
  }
}

/* Background Animated Shapes */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  transition: transform 0.1s linear;
  /* Smooth parallax */
}

/* Dynamic sizes and positions */
.shape-1 {
  width: 250px;
  height: 250px;
  border: 4px solid var(--primary);
  background: transparent;
  opacity: 0.2;
  top: -5%;
  left: -50px;
}

.shape-2 {
  width: 150px;
  height: 150px;
  background: var(--primary);
  opacity: 0.1;
  top: 35%;
  right: -50px;
}

.shape-3 {
  width: 400px;
  height: 400px;
  border: 2px solid #ffffff;
  background: transparent;
  opacity: 0.1;
  bottom: -15%;
  left: -100px;
}

.shape-4 {
  width: 200px;
  height: 200px;
  border: 6px solid #E36400;
  background: transparent;
  opacity: 0.15;
  top: 65%;
  right: -40px;
}

.shape-5 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  opacity: 0.1;
  top: 25%;
  left: -120px;
}