:root {
  --bg-dark: #050505;
  --card-dark: #0e0e0e;
  --text-white: #ffffff;
  --text-gray: #a1a1aa;
  --accent-green: #008631; /* Tailwind Green-700 */
  --accent-shadow-rgb: 0, 100, 37;
  --accent-green-bright: #22c55e;
  --font-main: "Inter", sans-serif;
}

.site-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
  border: 2px solid var(--accent-green);
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left h1 {
  margin-bottom: 0; /* Override any default margin */
  line-height: 1; /* Ensure line height doesn't add extra space */
}

.light-theme {
  --bg-dark: #f0f2f5;
  --card-dark: #ffffff;
  --text-white: #111111;
  --text-gray: #555555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-gray);
  transition:
    background-color 0.3s,
    color 0.3s;
  overflow-x: hidden;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Utilities */
.text-white {
  color: var(--text-white);
}
.green {
  color: var(--accent-green);
  font-weight: bold;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}
ul {
  list-style: none;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.main-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-gray);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Hero Card */
.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card-dark);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(var(--accent-shadow-rgb), 0.5);
}

.hero-image-container {
  position: relative;
  min-height: 400px;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.code-tag {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 20px;
  min-height: 1.5em; /* Prevent layout shift */
}

.cursor {
  display: inline-block;
  width: 2px;
  background-color: var(--accent-green);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.profile-header h2 {
  font-size: 2.5rem;
  color: var(--text-white);
  margin-bottom: 10px;
}

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

.social-links i {
  font-size: 1.2rem;
  color: var(--text-gray);
}
.social-links i:hover {
  color: var(--text-white);
}

.summary-text {
  line-height: 1.6;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 15px;
}

.btn {
  padding: 10px 25px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

.primary-btn {
  background: transparent;
  border: 1px solid var(--accent-green);
  color: var(--text-white);
}

.primary-btn:hover {
  background: var(--accent-green);
  color: #000;
}

.secondary-btn {
  background: transparent;
  border: 1px solid #333;
  color: var(--text-white);
}

.secondary-btn:hover {
  border-color: var(--text-white);
}

/* Section Headers */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-heading {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-gray);
}

.section-header-row .section-heading {
  margin-bottom: 0;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  background: var(--card-dark);
  padding: 40px;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(var(--accent-shadow-rgb), 0.3);
}

.about-text-card p {
  margin-bottom: 30px;
  line-height: 1.6;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-item i {
  color: var(--text-white);
  margin-top: 3px;
}

.info-item .label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-white);
  display: block;
}

.info-item .value {
  font-size: 0.9rem;
}

.about-image-card img {
  width: 100%;
  border-radius: 20px;
  transform: rotate(3deg);
  border: 5px solid var(--accent-green);
  box-shadow:
    10px 10px 30px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(21, 128, 61, 0.6);
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--card-dark);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(var(--accent-shadow-rgb), 0.2);
}

.stat-card i {
  color: var(--accent-green);
  font-size: 2rem;
  margin-bottom: 10px;
}

.stat-card h3 {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: var(--text-gray);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-white);
}

/* Skills Section */
.skills-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.skill-column h3 {
  font-size: 1.2rem;
  color: var(--text-white);
  margin-bottom: 20px;
}

.skill-item {
  margin-bottom: 15px;
}

.skill-name {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: 600;
}

.skill-dashes {
  display: flex;
  gap: 4px;
}

.dash {
  height: 8px;
  flex-grow: 1;
  border-radius: 2px;
}

.dash.on {
  background-color: var(--accent-green);
}
.dash.off {
  background-color: #333;
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 5px var(--accent-green);
    opacity: 1;
  }
  50% {
    box-shadow:
      0 0 15px var(--accent-green),
      0 0 5px var(--text-white);
    opacity: 0.8;
  }
  100% {
    box-shadow: 0 0 5px var(--accent-green);
    opacity: 1;
  }
}

.dash.glow {
  animation: glow-pulse 1.5s infinite ease-in-out;
  background-color: var(--accent-green-bright); /* Slightly brighter */
}

/* Universal Section Spacing */
.section {
  margin-bottom: 60px;
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.education-item {
  background: var(--card-dark);
  padding: 35px; /* Increased from 25px */
  border-radius: 15px;
  border: 1px solid #333;
  position: relative;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.education-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
}

.education-item .date-pill {
  margin-bottom: 20px; /* Increased from 10px */
}

.education-item h3 {
  margin-top: 15px; /* Added spacing above title */
  margin-bottom: 15px; /* Added spacing below title */
}

.education-item p {
  margin-bottom: 12px;
}

.education-item p:last-child {
  margin-bottom: 0px;
}

/* Experience Section */
.timeline-wrapper {
  position: relative;
  padding-left: 20px;
  border-left: 1px solid #333;
  max-width: 100%; /* Widened as requested */
  margin: 0 auto;
  z-index: 2; /* Ensure content is above spotlight */
}

.timeline-item {
  position: relative;
  margin-bottom: 25px; /* Reduced from 50px */
  padding-left: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Experience Tile - Global Spotlight */
.experience-tile {
  position: relative;
  background: var(--bg-dark); /* Merges with page background */
  padding: 25px 25px 10px 25px; /* Reduced from 40px all around; tightened bottom padding */
  border-radius: 20px;
  border: 1px solid #333; /* Reset to subtle border, or keep transparent if merging */
  overflow: hidden; /* For spotlight */
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.experience-tile:hover {
  border-color: var(--accent-green);
}

.experience-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    800px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(22, 163, 74, 0.15),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1; /* Above bg, below content? Content is static z-index? */
}

.experience-tile:hover::before {
  opacity: 1;
}

.timeline-marker {
  position: absolute;
  left: -26px; /* Adjust based on border width and marker size */
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--card-dark);
  border: 2px solid var(--accent-green);
  border-radius: 50%;
  z-index: 2; /* Needs to be above everything */
}

.date-pill {
    display: inline-block;
    width: fit-content;
    background: var(--card-dark); /* Theme aware */
    border: 1px solid var(--accent-green);
    color: var(--text-white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 15px; /* Spacing between the pill and the title */
    margin-bottom: 0;
}

.institution {
    font-size: 1.1rem; /* Adjusting size to fit the line */
    color: var(--accent-green);
    font-weight: 700;
}

.institution::after {
  content: " | ";
  color: var(--text-gray);
  margin: 0 5px;
}

.timeline-content h3 {
    font-size: 1.1rem; /* Better balance with the institution text */
    color: var(--text-white);
    font-weight: 700;
    margin-bottom: 0; /* Remove bottom margin to align correctly */
    display: inline;
}

.timeline-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-gray); /* Theme aware */
  margin-bottom: 10px;
}

.experience-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  outline: none;
  transition: color 0.3s;
}

.experience-summary::-webkit-details-marker {
  display: none;
}

.experience-summary::marker {
  display: none;
  content: "";
}

.experience-summary .summary-info {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* allow wrapping on small screens if necessary */
    gap: 10px; /* space between items */
}

/* Adjust margins/padding for inline layout */
.education-item .date-pill,
.experience-summary .date-pill {
    margin-bottom: 0; 
}

.experience-summary .institution {
    font-size: 1.1rem; /* Slightly smaller to fit in one line */
}

.experience-summary h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* We still want the institution to have the pipe separator when in a row, 
   but it might need adjustment if wrapped. The existing ::after handles it okay for now. */

.experience-summary .expand-icon {
  color: var(--accent-green);
  transition: transform 0.3s ease;
  padding-top: 5px; /* Align with text */
  margin-left: 15px;
}

/* Expand All Button Highlight Effects */
.expand-all-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-green);
  box-shadow: 0 0 5px rgba(0, 255, 127, 0.2);
  animation: pulse-glow 3s infinite ease-in-out;
  transition: all 0.3s ease;
}

.expand-all-btn:hover {
  background: var(--accent-green);
  color: var(--bg-dark);
  box-shadow: 0 0 15px rgba(0, 255, 127, 0.5);
  transform: translateY(-2px);
  animation: none; /* Stop pulse on hover for focus */
}

.expand-all-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shimmer 4s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 255, 127, 0.2);
    border-color: rgba(0, 255, 127, 0.5);
  }
  50% {
    box-shadow: 0 0 12px rgba(0, 255, 127, 0.4);
    border-color: rgba(0, 255, 127, 1);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 255, 127, 0.2);
    border-color: rgba(0, 255, 127, 0.5);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-150%) rotate(45deg); }
  100% { transform: translateX(150%) rotate(45deg); }
}

.experience-details {
  padding-top: 5px;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-content ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-top: 10px;
}

.timeline-content li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-gray); /* Theme aware */
  margin-bottom: 8px;
}

/* Portfolio Carousel */
.carousel-nav {
  display: flex;
  gap: 10px;
}

.carousel-nav .btn {
  padding: 8px 12px;
  font-size: 1rem;
}

.carousel-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 60px;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
  gap: 30px;
}

.carousel-item {
  flex: 0 0 calc((100% - 60px) / 3); /* Showing 3 items. 2 gaps of 30px -> 60px */
  background: var(--card-dark);
  border-radius: 15px;
  overflow: hidden;
  height: 250px;
  position: relative;
  border: 1px solid #333;
  transition: transform 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
}

@media (max-width: 991px) {
  .carousel-item {
    flex: 0 0 calc((100% - 30px) / 2); /* 2 items visible */
  }
}

@media (max-width: 768px) {
  .carousel-item {
    flex: 0 0 100%; /* 1 item visible */
  }
}

.image-space {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: #444;
  font-weight: 600;
}

/* Contact Section - Dashboard Style */
.contact-section {
  position: relative;
  border-radius: 20px;
  margin-bottom: 40px;
}

/* New tile style matching About Me */
.contact-tile {
  background: var(--card-dark);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(var(--accent-shadow-rgb), 0.3);
  border: 1px solid #333; /* Consistent with other cards */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-title-centered {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--text-white);
  max-width: 600px;
  line-height: 1.5;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  width: 100%;
  /* max-width: 900px; remove max-width to let it fill the tile if needed, or keep it */
}

.contact-card {
  background: var(--bg-dark);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid var(--text-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
  text-decoration: none;
  color: var(--text-white);
  text-align: center;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-green);
}

.contact-icon-box {
  width: 60px;
  height: 60px;
  background: var(--card-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--text-gray);
  margin-bottom: 5px;
}

.contact-icon-box i {
  color: var(--accent-green);
  font-size: 1.2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--text-gray);
  margin-bottom: 2px;
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}

/* Responsive for contact grid */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.styled-form .form-group {
  margin-bottom: 20px;
}

.styled-form input,
.styled-form textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--text-white);
  font-size: 0.9rem;
}

.styled-form input:focus,
.styled-form textarea:focus {
  outline: none;
  border-color: var(--accent-green);
  background: rgba(0, 0, 0, 0.5);
}

.styled-form button {
  width: 100%;
  padding: 12px;
  background: var(--text-white);
  color: #000;
  border: none;
  font-weight: 700;
  margin-top: 10px;
}

.styled-form button:hover {
  background: var(--accent-green);
}

/* Mobile Responsive Adjustments */
/* Mobile Responsive Adjustments */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image-container {
    min-height: 300px;
  }

  .hero-content {
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
  }

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

  .about-image-card {
    order: -1; /* Image first on mobile */
    max-width: 300px;
    margin: 0 auto;
  }

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

  .skills-wrapper {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .app-container {
    padding: 15px;
  }

  .hero-image-container {
    min-height: 250px;
  }

  .profile-header h2 {
    font-size: 2rem;
  }

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

  .stats-grid {
    grid-template-columns: 1fr 1fr; /* 2x2 Grid */
  }

  /* Timeline Mobile Tweak */
  .experience-tile {
    padding: 25px 20px;
  }

  .timeline-wrapper {
    padding-left: 15px;
  }

  .timeline-item {
    padding-left: 20px;
    padding-right: 0;
  }

  /* Adjust marker to stay on line */
  .timeline-marker {
    left: -22px;
  }

  .contact-tile {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr; /* 1 Column for very small screens */
  }

  .section-heading {
    font-size: 1.75rem;
  }
}

/* Image Modal Styles */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(10, 11, 30, 0.95);
  backdrop-filter: blur(8px);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  border-radius: 15px;
  border: 1px solid rgba(0, 255, 127, 0.3);
  box-shadow: 0 0 30px rgba(0, 255, 127, 0.2);
  animation: zoomIn 0.4s ease-out;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 20px 0;
  font-family: 'Outfit', sans-serif;
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent-green);
  text-decoration: none;
  transform: scale(1.1);
}

/* Carousel Image Click Support */
.clickable-img {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.clickable-img:hover {
  transform: scale(1.02);
}

@keyframes zoomIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media only screen and (max-width: 700px) {
  .modal-content {
    width: 90%;
  }
  .close-modal {
    right: 20px;
    top: 15px;
    font-size: 30px;
  }
}
