/* Main styles for the website */
/* Using Google Fonts instead of local font file */

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

body {
  font-family: 'Inter', sans-serif;
  background-color: black;
  color: #f3f4f6;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout */
.container {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: 56rem;
  padding: 4rem 1rem 2rem;
  position: relative;
  z-index: 10;
}

/* Header */
.hero {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.hero-content {
  max-width: 65%;
  font-weight: 600;
  line-height: 2.25rem;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.hero h2 {
  font-size: 1.75rem;
  color: #b0b0b0;
}

.logo-container {
  position: relative;
  display: inline-flex;
  height: 7rem;
  width: 7rem;
  align-items: center;
  justify-content: center;
}

.logo-img {
  z-index: 10;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  object-fit: cover;
}

.logo-pulse {
  position: absolute;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  background-color: #111827;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Mobile optimization for hero section */
@media (max-width: 767px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .hero-content {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.5rem 2rem; /* Reduced vertical gap */
  width: 100%;
}

/* Section container and title styling */
.section-container {
  position: relative;
  margin-bottom: 0.75rem;
  margin-top: 0.75rem; /* Reduced margin-top for less spacing */
}

/* Post Section */
.section {
  background-color: black;
  border-radius: 0.75rem;
  padding: 1.5rem 0.75rem 0.75rem; /* Increased top padding */
  overflow: hidden;
  position: relative;
  border: 2px solid #111827;
  max-height: 20rem;
}

.projects-section {
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}

.projects-section::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.activities-section {
  min-height: auto;
  max-height: 20rem;
  padding: 1.5rem 0.75rem 0.75rem 0.5rem;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}

.activities-section::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Section title styling */
.section-title {
  position: absolute;
  top: -0.7rem;
  left: 1.5rem;
  background-color: black; /* Changed to match page background */
  padding: 0.2rem 1.2rem;
  border-radius: 2rem; /* More rounded but smaller */
  font-weight: 600;
  color: #9ca3af; /* Softer color for better match */
  font-size: 0.8rem; /* Smaller font size */
  text-decoration: none;
  border: 2px solid #111827; /* Same as the container border */
  z-index: 30;
  display: inline-block;
}

.posts-list,
.projects-list {
  list-style-type: none; /* Remove bullets from list */
}

.post-link,
.project-link {
  color: #9ca3af;
  background-color: black;
  border: 2px solid black;
  display: flex;
  align-items: center;
  padding: 0.625rem;
  border-radius: 0.375rem;
  transition: all 0.15s;
  width: 100%;
}

.post-link:hover,
.project-link:hover {
  color: #6b7280;
  background-color: #0c0c0c;
}

.post-content,
.project-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-icon,
.project-icon {
  position: relative;
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  z-index: 2;
}

.project-icon:before {
  content: '';
  position: absolute;
  width: 1.8rem;
  height: 1.8rem;
  background: black;
  border: 2px solid #111827;
  border-radius: 0.25rem;
  z-index: -1;
}

.project-icon svg {
  width: 14px;
  height: 14px;
  color: #9ca3af;
}

.post-details,
.project-details {
  flex: 1;
  min-width: 0;
}

.post-title,
.project-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e5e7eb;
  font-size: 0.9rem;
  margin: 0;
}

.project-description {
  color: #6b7280;
  font-size: 0.75rem;
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.post-date,
.project-date {
  margin-left: 1rem;
  font-weight: 400;
  font-size: 0.875rem;
}

.post-divider,
.project-divider {
  border: 1px solid #111827;
  margin-bottom: 0;
}

/* Activity Section */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.spinner {
  animation: spin 1s linear infinite;
  border-radius: 9999px;
  height: 1rem;
  width: 1rem;
  border-bottom: 2px solid #9ca3af;
  margin: 0 auto;
}

/* Full Page Loader */
.full-page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* Adjust positioning of the spinner in the loader */
.full-page-loader .custom-spinner {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

/* Hide the loader when page is ready */
.loaded .full-page-loader {
  opacity: 0;
  visibility: hidden;
}

/* Custom spinner from UIVerse.io by satyamchaudharydev */
.custom-spinner {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.custom-spinner span {
  position: absolute;
  top: 50%;
  left: var(--left);
  width: 35px;
  height: 7px;
  background: #ffff;
  animation: dominos 1s ease infinite;
  box-shadow: 2px 2px 3px 0px black;
}

.custom-spinner span:nth-child(1) {
  --left: 40px;
  animation-delay: 0.125s;
}

.custom-spinner span:nth-child(2) {
  --left: 30px;
  animation-delay: 0.3s;
}

.custom-spinner span:nth-child(3) {
  left: 20px;
  animation-delay: 0.425s;
}

.custom-spinner span:nth-child(4) {
  animation-delay: 0.54s;
  left: 10px;
}

.custom-spinner span:nth-child(5) {
  animation-delay: 0.665s;
  left: 0px;
}

.custom-spinner span:nth-child(6) {
  animation-delay: 0.79s;
  left: -10px;
}

.custom-spinner span:nth-child(7) {
  animation-delay: 0.915s;
  left: -20px;
}

.custom-spinner span:nth-child(8) {
  left: -30px;
}

/* Dominos animation for the custom spinner */
@keyframes dominos {
  50% {
    opacity: 0.7;
  }

  75% {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
  }

  80% {
    opacity: 1;
  }
}

/* Keep the original spin animation for other potential uses */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status Sections */
.status-section {
  max-height: 6rem;
  min-height: 6rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 2px solid #111827;
  background-color: black;
  padding: 1rem 1rem; /* Increased vertical padding */
  position: relative;
  display: flex;
  align-items: center;
}

.status-content {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 0;
  margin: auto 0; /* Center vertically */
}

.status-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 1.25rem;
  border-radius: 0.375rem;
  padding: 0.25rem 0; /* Add a bit of vertical padding inside */
}

.status-icon {
  position: relative;
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-icon svg {
  height: 1.75rem;
  width: 1.75rem;
  color: #9ca3af;
}

.status-details {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0.2rem 0;
}

.status-title {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  text-align: left;
}

.status-description {
  color: #4b5563;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: left;
}

/* Activity Section Styles - Timeline Based */
.activities-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  position: relative;
}

/* Timeline vertical line */
.activities-list:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1.1rem;
  width: 2px;
  background: #111827;
  z-index: 1;
}

.activity-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.6rem;
}

/* Hide the last divider */
.activity-item:last-child .activity-divider {
  display: none;
}

.activity-content {
  color: #9ca3af;
  background-color: black;
  border: 1px solid #111827;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  padding-right: 4.5rem; /* Add padding on the right to make room for the date */
  border-radius: 0.375rem;
  transition: all 0.15s;
  width: 100%;
  position: relative; /* Make it a positioning context for the date */
}

.activity-content:hover {
  color: #6b7280;
  background-color: #0c0c0c;
}

.activity-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.activity-icon:before {
  content: '';
  position: absolute;
  width: 1.8rem;
  height: 1.8rem;
  background: black;
  border: 2px solid #111827;
  border-radius: 0.25rem;
  z-index: -1;
}

.activity-icon svg {
  width: 14px;
  height: 14px;
  color: #9ca3af;
}

.activity-details {
  flex: 1;
  min-width: 0;
  padding-left: 0.2rem;
}

.activity-title {
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.2;
}

.activity-description {
  color: #6b7280;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.2;
}

.activity-time {
  color: #4b5563;
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.8;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
}

.activity-divider {
  display: none; /* Hide standard dividers since we're using the timeline */
}

/* Footer */
footer {
  margin: 0 auto;
  max-width: 56rem;
}

.footer-content {
  margin: 0 auto;
  max-width: 60rem;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.social-link {
  color: #9ca3af;
  background-color: black;
  border: 2px solid #111827;
  border-radius: 0.375rem;
  padding: 0.5rem;
  height: 2.5rem;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.social-link:hover {
  color: #6b7280;
  background-color: #111827;
  border-color: #1f2937;
}

.social-link svg {
  height: 1rem;
  width: 1rem;
}

.copyright {
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Responsive */
@media (min-width: 640px) {
  .hero {
    flex-direction: row;
  }
  
  main {
    padding: 4rem 1.5rem 2rem;
  }
  
  .mobile-time {
    display: none;
  }
  
  .desktop-time {
    display: block;
  }
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
  
  .posts-section-container,
  .projects-section-container {
    grid-column: span 6 / span 6;
  }
  
  .activities-section-container {
    grid-column: span 4 / span 4;
  }
  
  /* Ensure both sections have the same height */
  .posts-section, .projects-section, .activities-section {
    height: 20rem;
  }
  
  .status-section-container {
    grid-column: span 5 / span 5;
    margin-bottom: 0.5rem;
    margin-top: 0;
  }
  
  .footer-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .social-links {
    order: 2;
    margin-bottom: 0;
  }
  
  .copyright {
    order: 1;
    margin-top: 0;
  }
  
  .logo-container {
    height: 8rem;
    width: 8rem;
  }
}

@media (min-width: 1024px) {
  main {
    padding: 4rem 2rem 2rem;
  }
}
