/* Global Stylesheet for the personal portfolio */

/* Color Palette */
:root {
  --bg-color: #121212; /* Charcoal black (background) */
  --text-color: #B0B0B0; /* Lighter grey (primary text) */
  --secondary-text-color: #888888; /* Medium gray (secondary text) */
  --border-color: #444444; /* Dark gray (borders and dividers) */
  --accent-color: #888888; /* Soft gray (accents like links) */
  --highlight-color: #76ABAE; /* Teal (minimal usage for highlights) */
}

/* Reset Body and HTML */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* General resets */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-left: 60px;
  padding-right: 60px; /* Balance for right sidebar */
  position: relative;
}

/* Navigation bar */
header.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

header.navbar .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--highlight-color);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--secondary-text-color);
  font-weight: 500;
  padding-bottom: 0.25rem;
  text-decoration: none;
}

nav a:hover,
nav a.active {
  color: var(--text-color);
  border-bottom: 2px solid var(--highlight-color);
}

/* Main Social Links - All pages, right side, vertically centered */
.social-links {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 999;
}

.social-logo {
  width: 22px;
  height: auto;
  transition: transform 0.3s ease;
  opacity: 0.8;
}

.social-logo:hover {
  transform: scale(1.3);
  opacity: 1;
}

/* FORCE Gallery-page specific Instagram icon to the right side, vertically centered */
.gallery a[href*="instagram"],
.gallery a img[alt*="instagram" i],
.gallery img[src*="instagram"],
.gallery .instagram,
.gallery .ig,
.gallery .insta,
.gallery .instagram-icon,
.gallery .instagram-link,
.gallery .instagram-button,
.gallery .social-instagram,
.gallery div[class*="instagram"],
.gallery iframe[src*="instagram"] {
  position: fixed !important;
  top: 10% !important;
  right: 200px !important; /* Position it right */
  transform: translateY(-50%) !important; /* Center vertically */
  z-index: 999 !important;
  width: 20px !important; /* Slightly larger for visibility */
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* If it's a container with multiple elements, stack vertically below main icons */
.gallery a[href*="instagram"] {
  margin-top: 50px !important; /* Space it below the main social links if needed */
}

/* About Section Styling */
#about {
  margin: 12rem 0 6rem;
  padding: 2rem 0;
  width: 100%;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  flex-wrap: wrap;
  padding: 0 2rem;
}

.about-image {
  flex: 0 0 auto;
  text-align: center;
}

.about-img {
  width: 250px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.about-text {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.about-text h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-me {
  font-size: 1.0rem;
  color: var(--highlight-color);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  body {
    padding-left: 0;
    padding-right: 0;
  }

  .social-links,
  .gallery a[href*="instagram"],
  .gallery img[src*="instagram"] {
    right: 10px !important;
  }

  .social-logo {
    width: 20px;
  }

  #about {
    margin: 8rem 0 4rem;
    padding: 1rem;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding: 0;
  }

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

  .about-img {
    width: 280px;
  }
}

@media (min-width: 1200px) {
  .about-container {
    gap: 4rem;
  }
}

/* Gallery for photography - Improved centering */
.gallery {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0 2rem;
}

.gallery-item {
  margin: 40px auto;
  max-width: 900px;
  padding: 0;
}

.gallery-item img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto; /* Ensures the image is centered */
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-item p {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-top: 10px;
}

/* Projects Page Styling */
.project-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dotted var(--border-color);
}

.project-item .project-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.project-item .project-date {
  float: right;
  color: var(--secondary-text-color);
  font-size: 0.85rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--secondary-text-color);
}

/* Fix blue links in projects */
.project-item a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-item a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

.project-item .project-title a {
  color: inherit;
  font-weight: 600;
}

.project-item .project-title a:hover {
  color: var(--highlight-color);
}

/* Books & Movies Page Styling */
.media-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.media-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dotted var(--border-color);
}

.media-item img {
  width: 100%;
  height: auto;
  max-width: 300px;
  margin: 0 auto;
}

.media-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.media-item span.type {
  font-weight: bold;
  margin-right: 0.5rem;
  color: var(--highlight-color);
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 1rem 2rem;
  background-color: var(--bg-color);
  font-size: 0.9rem;
  color: var(--secondary-text-color);
  width: 100%;
  margin-top: auto;
}

footer a {
  color: var(--highlight-color);
}

/* Blinking Cursor Animation */
.logo__cursor {
  display: inline-block;
  width: 3px;
  height: 1.4em;
  background-color: var(--highlight-color);
  margin-left: 4px;
  margin-bottom: 0.1em;
  vertical-align: middle;
  animation: blink-caret 1s step-end infinite;
  border-radius: 1px;
  opacity: 1;
}

@keyframes blink-caret {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

header.navbar .brand:hover .logo__cursor {
  background-color: #ffffff;
}
