/* --- SDE Dark Theme --- */
:root {
  --bg: #000000;
  --card: #020212;
  --muted: #7a6b78;
  --accent: #e36c94;
  --accent2: #d9b6ff;
  --text: #fffeff;
  --shadow: 0 8px 24px rgba(2, 1, 6, 0.08);
  --radius: 10px;
  --maxwidth: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
}

.container {
  width: calc(100% - 48px);
  max-width: var(--maxwidth);
  margin: 0 auto;
  padding: 40px 0;
}

/* --- Simplified Transparent Header --- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 60;
  padding: 24px 10px;
}
.header-inner {
  width: calc(100% - 48px);
  max-width: var(--maxwidth);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 280;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 10px;
  margin-left: 12px;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }

/* --- Hero with Circle Reveal --- */
.hero-circle-reveal {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--text); 
  cursor: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide-before .content h1 {
  font-family: "Playfair Display", serif;
}

.slide-reveal .content h1 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  text-align: center;
}
.slide-before {
  background-image: url();
  z-index: 1;
}
.slide-reveal {
  background-color: var(--accent);
  background-image: url();
  background-blend-mode: luminosity;
  z-index: 2;
  clip-path: circle(0px at 50% 50%);
}
.slide-reveal h1, .slide-reveal .hero-sub, .slide-reveal .skills li, .slide-reveal .highlight {
  color: #111;
}
.slide-reveal .btn-primary {
  background: #111;
  color: white;
}
.content {
  max-width: 700px;
  padding: 10px;
}
.content h1 {
  font-size: clamp(3.75rem, 5vw, 3.5rem);
  font-weight: 200;
  line-height: 1.1;
  margin: 0 0 16px 0;
}
.hero-sub { 
  color: var(--muted); 
  margin: 0 0 24px 0; 
  max-width: 480px; 
  margin-left:auto; 
  margin-right:auto;
  font-family: 'Montserrat';
  font-size: 13px;
  font-weight: 700;
}

.hero-actions { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.btn {
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.btn:hover { transform: scale(1.05); }
.btn-primary {
  background: var(--accent);
  color: #111;
}
.skills { display: flex; justify-content: center; gap: 10px; list-style: none; padding: 0; margin: 0; }
.skills li { background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }

/* --- Sections & Titles --- */
.section-title {
  font-family: "Playfair Display", serif;
  font-size: 32px;
  margin-bottom: 32px;
  text-align: left;
}

/* --- Projects Carousel & Cards (Revisited) --- */
.projects-carousel {
  position: relative;
}

.grid {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 24px;
  gap: 24px;
  
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.grid::-webkit-scrollbar {
  display: none;
}

.card {
  flex: 0 0 calc(25% - 16px);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  /* Use a transparent border by default, accent on hover */
  border: 1.5px solid transparent; 
  transition: transform 0.3s ease, border-color 0.3s ease;
  aspect-ratio: 5 / 5;
  box-shadow: 0 4px 15px #020212(0,0,0,0.1); /* Subtle shadow for depth */
}

.card:hover {
  transform: translateY(1px); /* Slightly more pronounced lift */
  border-color: var(--accent); /* Pink border on hover */
}

.card-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex; /* Ensure content fills the wrapper */
  align-items: center;
  justify-content: center;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* This makes the image cover the entire area */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 24px;
  background: rgba(17, 17, 17, 0.85); /* Slightly darker overlay for better text contrast */
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column; /* Stack body content vertically */
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.card:hover .card-overlay {
  opacity: 1;
  pointer-events: auto;
}

.card:hover .card-image {
  opacity: 0.1;
  transform: scale(1.05);
}

.card-body {
    padding: 0; /* Remove default padding here as overlay handles it */
    width: 100%; /* Ensure body takes full width within overlay */
}

.card h3 { 
  margin: 0 0 8px 0; 
  font-size: 20px; /* Slightly larger heading for clarity */
  line-height: 1.2;
}
.card .muted { 
  font-family: "Montserrat";
  font-size: 15px; 
  margin: 0 0 16px; 
  color: rgba(255, 255, 255, 0.7); /* Lighter muted text on overlay */
}
.link { 
  color: var(--accent); 
  text-decoration: none; 
  font-weight: 600; 
  display: inline-block; /* Ensure link behaves correctly */
  margin-top: 10px;
}

.carousel-nav {
  display: flex;
  gap: 10px;
  position: absolute;
  top: -65px;
  right: 0;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid #2a2a2a;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-btn:hover {
  background-color: #2a2a2a;
  border-color: var(--accent);
}

/* --- Project Detail Overlay --- */
.project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.overlay-content {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid #2a2a2a;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow); /* Add shadow to overlay content */
}

.project-overlay.is-visible .overlay-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}
.close-btn:hover {
  color: var(--text);
}

#overlay-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: var(--radius);
  margin-bottom: 0px;
}

#overlay-title {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  margin-bottom: 1px;
}

.overlay-details p {
  color: var(--muted);
  line-height: 1.7;
}

.tech-stack {
  margin: 24px 0;
}

.tech-stack strong {
  display: block;
  margin-bottom: 10px;
}

#overlay-tech-stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#overlay-tech-stack li {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 14px;
}

#overlay-link {
  display: inline-block;
  margin-top: 16px;
}

/* --- Experience Section --- */
.experience-section {
  padding-top: 10px; /* Adjust padding to fit naturally after projects */
  padding-bottom: 10px;
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the timeline items */
  max-width: 800px; /* Constrain width for better readability */
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Lighter separator */
  transition: background-color 0.3s ease;
  cursor: pointer;
  background-color: transparent !important;
  /* Add a border to the bottom of each item */
  border-bottom: 1px solid #2a2a2a; 
  padding: 20px 0; /* Add some vertical padding */
}

.timeline-item:last-child {
  border-bottom: none; /* No border for the last item */
}

.timeline-item:hover {
  background-color: rgba(255, 255, 255, 0.05); /* Subtle hover highlight */
}

.timeline-year {
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--muted); /* Muted color for the year */
  min-width: 120px; /* Fixed width for year column */
  text-align: right;
  padding-right: 40px; /* Space between year and content */
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.timeline-item:hover .timeline-year {
  color: var(--text); /* Year becomes white on hover */
}

.timeline-content {
  flex-grow: 1;
  text-align: left;
}

.timeline-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.timeline-content p {
  font-size: 16px;
  color: var(--muted);
  margin: 4px 0 0 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
  .experience-timeline {
    padding: 0 20px;
  }
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 0;
  }
  .timeline-year {
    text-align: left;
    padding-right: 0;
    margin-bottom: 8px;
    font-size: 20px;
  }
  .timeline-content h3 {
    font-size: 20px;
  }
  .timeline-content p {
    font-size: 15px;
  }
}

/* --- Experience Section Hover Reveal --- */
.timeline-item {
  /* Override the previous simple hover effect */
  background-color: transparent !important;
  cursor: none; /* Use the custom cursor from the effect */
}

.timeline-reveal-area {
  flex-grow: 1;
  position: relative;
  overflow: hidden; /* This is crucial for the mask effect */
  border-radius: var(--radius);
}

.timeline-content {
  padding: 24px;
  width: 100%;
  height: 100%;
}

.timeline-reveal-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  
  /* The circle effect */
  background-color: var(--accent);
  color: #111;
  
  display: flex;
  align-items: center;
  
  /* Hide it by default with a clip-path mask */
  clip-path: circle(0px at 50% 50%);
  z-index: 2; /* Ensure it appears on top */
}

.timeline-reveal-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.timeline-reveal-content li {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.timeline-reveal-content li:last-child {
  margin-bottom: 0;
}

/* --- Contact Form --- */
#contact {
    text-align: center;
}
.contact-form { max-width: 600px; margin: 0 auto; }
.field-row { display: flex; gap: 12px; margin-bottom: 12px; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #2a2a2a;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus { border-color: var(--accent); }
.form-actions { display: flex; justify-content: center; margin-top: 12px; }
.form-msg { margin-top: 12px; color: var(--muted); text-align: center;}

/* --- Footer --- */
.site-footer {
  padding: 10px 0;
  border-top: 1px solid #2a2a2a;
  text-align: center;
}
.site-footer p { margin: 0; color: var(--muted); }

/* --- Background Effects --- */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800"><filter id="a"><feTurbulence type="fractalNoise" baseFrequency=".5" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23a)"/></svg>');
  opacity: 0.08;
  z-index: -1;
  pointer-events: none;
}


/* --- Media Queries --- */
@media (max-width: 900px) {
  .card {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  .content h1 { font-size: 10vw; }
}

@media (max-width: 600px) {
  .card {
    flex: 0 0 85%;
  }
  .experience-timeline {
    padding: 0 20px;
  }
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 0;
  }
  .timeline-year {
    text-align: left;
    padding-right: 0;
    margin-bottom: 8px;
    font-size: 20px;
  }
  .timeline-content h3 {
    font-size: 20px;
  }
  .timeline-content p {
    font-size: 15px;
  }
}

/* --- About Section --- */
.about-section {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 3fr; /* Image column is smaller than text column */
  gap: 50px;
  align-items: center;
  max-width: 900px; /* Constrain the width for better readability */
  margin: 0 auto;
}

.about-image img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 1 / 1; /* Makes the image a perfect square */
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.about-content p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments for about section */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr; /* Stack columns on smaller screens */
    text-align: center;
  }
  .about-image {
    margin-bottom: 30px;
  }
}

/* --- Full Page Section Styling --- */
.full-page-section {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* This vertically centers the content */
}

/* Adjust container padding within full-page sections */
.full-page-section.container {
  padding-top: 60px; /* Add space for the header */
  padding-bottom: 60px;
}

/* --- Showreel Section --- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}