/*
============================================================
 STYLES.CSS (DARK NAVY THEME)
============================================================
- Centralized color palette using CSS Variables.
- Theme changed to a modern dark navy blue.
- New accent color (Vibrant Cyan) for better contrast.
- Improved maintainability and organization.
============================================================
*/

/* ---------- CSS VARIABLES (DARK NAVY THEME) ---------- */
:root {
  /* Backgrounds & Text */
  --bg-main: #0a192f; /* Dark Navy */
  --bg-secondary: #112240; /* Lighter Navy for cards/sections */
  --text-primary: #ccd6f6; /* Light, soft white for headings */
  --text-secondary: #8892b0; /* Lighter gray for body text */
  --text-muted: #a8b2d1; /* Muted light gray */
  --text-on-accent: #0a192f; /* Dark Navy for text on light accent color */

  /* Accent Colors */
  --accent-color: #64ffda; /* Vibrant Cyan/Teal */
  --accent-color-hover: #52d1b8; /* Slightly darker cyan */
  
  /* RGB values for transparent backgrounds */
  --bg-main-rgb: 10, 25, 47;
  --bg-secondary-rgb: 17, 34, 64;
  --text-primary-rgb: 204, 214, 246;
  --accent-rgb: 100, 255, 218;
}

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-main);
}

/* ---------- GLOBAL LAYOUT ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

section,
footer {
  padding-block: 5rem;
}

/* ---------- COMMON ELEMENTS ---------- */
h1, h2, h3 {
  line-height: 1.2;
  color: var(--text-primary);
}

h2 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  font-size: 2rem;
  font-weight: 600;
}

.accent {
  color: var(--accent-color);
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: .75rem 1.5rem;
  background: var(--accent-color);
  color: var(--text-on-accent);
  font-weight: 600;
  border-radius: .5rem;
  text-decoration: none;
  transition: transform .2s, background .2s;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--accent-color-hover);
}

.btn-outline {
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: .5rem 1rem;
  border-radius: .4rem;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.btn-outline:hover {
  background: var(--accent-color);
  color: var(--text-on-accent);
}

/* ---------- NAV ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(8px);
  background: rgba(var(--bg-main-rgb), .8);
  border-bottom: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

/* ---------- HERO (Rearranged) ---------- */
.hero {
  min-height: 90vh;
  display: flex; /* Changed from column to row layout */
  flex-wrap: wrap; /* Allows items to wrap on smaller screens */
  align-items: center; /* Vertically aligns text and image */
  justify-content: space-around; /* Adds space between text and image */
  gap: 2rem;
  padding-top: 5rem;
}

.hero-text {
  text-align: left; /* Aligns hero text to the left */
  flex: 1; /* Allows text to take up available space */
  min-width: 300px; /* Ensures text doesn't get too squished */
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
}

.hero .subtitle {
  margin-top: 1rem;
  font-size: 1.25rem;
}

.profile-container {
  text-align: center;
  flex-shrink: 0;
}

.profile-frame {
  position: relative;
  width: 300px; /* Adjusted size */
  height: 300px; /* Adjusted size */
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  border: 6px solid var(--accent-color); /* Updated from green */
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.open-to-work {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-on-accent); /* Updated text color */
  text-transform: uppercase;
  background-color: var(--accent-color); /* Updated from green */
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

/* ---------- ABOUT (Enhanced) ---------- */
.about {
  text-align: center;
}

.about h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 3rem;
}

.about h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.about-text {
  max-width: 850px; /* Widened for better flow */
  margin: 0 auto;
  text-align: left;
}

.about-text p {
  margin-bottom: 1.5rem;
}

/* Drop cap for the first paragraph */
.about-text p:first-of-type::first-letter {
  font-size: 5rem; /* Increased from 4rem */
  font-weight: 600;
  float: left;
  line-height: 1;
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  color: var(--accent-color);
}


/* ---------- SKILLS ---------- */
.skill {
  margin-bottom: 2rem;
}

.skill span {
  display: block;
  margin-bottom: .35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(var(--text-primary-rgb), 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress {
  width: 0;
  height: 100%;
  background: var(--accent-color);
  border-radius: 4px;
  transition: width 1.2s ease;
}

/* ---------- TOOLS SECTION ---------- */
#tools .section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tools-wrapper {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.tools-list {
  display: flex;
  gap: 2rem;
  padding-block: 1rem;
}

.tools-wrapper[data-animated="true"] .tools-list {
  width: max-content;
  flex-wrap: nowrap;
  animation: scroll 40s linear infinite;
}

.tools-wrapper:hover .tools-list {
  animation-play-state: paused;
}

.tool {
  background: var(--bg-secondary);
  border-radius: .6rem;
  padding: 1.5rem;
  width: 280px;
  min-width: 280px;
  text-align: center;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.tool:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 30px rgba(0,0,0,0.2);
}

.tool-icon svg {
  width: 40px;
  height: 40px;
  fill: var(--accent-color);
  margin-bottom: 1rem;
}

.tool p {
  flex-grow: 1;
}

@keyframes scroll {
  to {
    transform: translate(calc(-50% - 1rem));
  }
}

/* ---------- EDUCATION ---------- */
.edu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 1rem 0;
  gap: 2rem;
}

.edu-item.reverse {
  flex-direction: row-reverse;
}

.edu-text {
  flex: 1;
  text-align: justify;
}

.edu-school {
  margin: 0.2rem 0 0.6rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.edu-details {
  list-style: disc inside;
  padding-left: 0.2rem;
  margin-top: 1rem;
}

.edu-details li {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.edu-image {
  flex-shrink: 0;
  width: 384px;
  height: 288px;
  overflow: hidden;
  border-radius: 20px;
}

.edu-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- EXPERIENCE (PROJECTS) ---------- */
.project-card {
  background: var(--bg-secondary);
  border-radius: .6rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 4rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card .gallery-wrapper img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.project-card h3 {
  padding: 1rem 1rem 0;
}

.project-card .project-date {
  padding: 0 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.project-card .project-details {
  padding: 1rem;
  list-style: square inside;
}

.project-card .tools {
  padding: 0 1rem 1rem;
  flex: 1;
}

/* ---------- IMAGE GALLERIES (SHARED) ---------- */
.gallery-wrapper {
  position: relative;
}

.gallery-img {
  cursor: pointer;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(var(--bg-main-rgb), .45);
  color: var(--text-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .25s;
  z-index: 5;
}

.gallery-nav:hover {
  background: rgba(var(--bg-main-rgb), .65);
}

.gallery-nav.prev {
  left: 0.6rem;
}

.gallery-nav.next {
  right: 0.6rem;
}

/* ---------- CERTIFICATIONS & LICENSES ---------- */
.certification-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.certification-text {
  flex: 1;
  margin-right: 1.5rem;
}

.certification-institution,
.certification-date {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.certification-image {
  width: 150px;
  height: 100px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
}

.certification-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.certification-image img:hover {
  transform: scale(1.05);
}

.license-highlight {
  position: relative;
  overflow: hidden;
  border: none;
}

.license-highlight::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 10px;
  background: linear-gradient(45deg,
    var(--accent-color) 0%,
    rgba(var(--accent-rgb), 0.4) 25%,
    var(--accent-color) 50%,
    rgba(var(--accent-rgb), 0.4) 75%,
    var(--accent-color) 100%);
  background-size: 300% 300%;
  z-index: 1;
  animation: glitter-rotate 4s linear infinite;
}

.license-highlight > .certification-item {
  position: relative;
  z-index: 2;
}

@keyframes glitter-rotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.more-certifications {
  margin-top: 2rem;
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
}

/* ---------- IMAGE EXPANSION MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--bg-main-rgb), 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
}

.modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: default;
}

/* ---------- BLOG PREVIEW SECTION ---------- */
.experience-blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem; /* Increased from 2rem to add more space */
}

.experience-post {
  background-color: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.experience-post:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-text-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-text-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-text-content p {
  text-align: justify;
  flex-grow: 1;
}

/* ---------- RECENT WORK ---------- */
.work-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.work-item {
  position: relative;
  overflow: hidden;
  border-radius: .6rem;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-in-out;
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(var(--bg-main-rgb), 0.85); /* Darker overlay for better contrast */
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.work-info {
  padding: 1rem;
  transform: translateY(10px);
  transition: transform 0.4s ease-in-out;
}

.work-category {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-color);
  color: var(--text-on-accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
}

.work-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.work-overlay .btn-outline {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.work-overlay .btn-outline:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--text-on-accent);
}

.work-item:hover .work-overlay {
  opacity: 1;
}

.work-item:hover img {
  transform: scale(1.05);
}

.work-item:hover .work-info {
  transform: translateY(0);
}

/* ---------- CONTACT ---------- */
.contact form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact input,
.contact textarea {
  padding: .75rem 1rem;
  border: 1px solid rgba(var(--text-primary-rgb), 0.2);
  border-radius: .4rem;
  font-size: .9rem;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

.contact-socials {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2.2rem;
}

.contact-socials a {
  font-size: 1.6rem;
  color: var(--accent-color);
  transition: transform .2s, color .2s;
}

.contact-socials a:hover {
  transform: scale(1.15);
  color: var(--accent-color-hover);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-secondary);
  text-align: center;
  font-size: .875rem;
  padding-block: 3rem;
  border-top: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

/*
============================================================
 BLOG & PROJECT PAGE STYLES
============================================================
*/

/* --- Blog Page Header & Navbar (NEW) --- */
.navbar {
  background-color: var(--bg-secondary);
  padding: 1rem 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.navbar .logo a {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
}

.navbar .logo a:hover {
  color: var(--accent-color);
}

.blog-main-container {
  max-width: 1200px;
  margin: 3rem auto;
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 0 2rem;
}

.blog-content {
  flex: 0 1 70%;
}

.blog-header {
  position: relative;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background-color: var(--bg-secondary);
}

.featured-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.featured-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--bg-main-rgb), 0.8) 0%, rgba(var(--bg-main-rgb), 0.2) 100%);
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-text-overlay {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 800px;
}

.blog-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.blog-header .blog-date {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-top: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-text {
  max-width: 75ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.blog-text p {
  margin-bottom: 1.5rem;
}

.blog-text strong {
    color: var(--accent-color);
}

.blog-text p:first-of-type::first-letter {
  font-size: 4rem;
  font-weight: 600;
  float: left;
  line-height: 1;
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  color: var(--accent-color);
}

.sidebar {
  flex: 0 1 30%;
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  align-self: flex-start;
  position: sticky;
  top: 2rem;
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.author-box {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.author-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  margin-bottom: 0.75rem;
}

.author-box h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.author-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.sidebar h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li a {
  display: block;
  padding: 0.75rem;
  border-radius: 5px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
  color: var(--accent-color);
}

.sidebar ul li a:hover {
  background-color: var(--accent-color);
  color: var(--text-on-accent);
}

.blog-footer {
  text-align: center;
  margin-top: 3rem;
}

/* Added style for the back button */
.back-button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background-color: var(--accent-color);
  color: var(--text-on-accent);
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s ease;
}

.back-button:hover {
  background-color: var(--accent-color-hover);
  transform: translateY(-3px);
}

.site-footer {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

/* --- Project Page Specific --- */
.project-divider {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, transparent, rgba(var(--text-primary-rgb), 0.1), transparent);
  margin-block: 4rem;
}

/* --- Interactive Image Slider --- */
.comparison-slider {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: .6rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.after-image {
  display: block;
  width: 100%;
  height: auto;
}

.before-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  overflow: hidden;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: ew-resize;
  z-index: 10;
}

.handle-line {
  flex-grow: 1;
  width: 3px;
  background: var(--text-primary);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.handle-circle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--text-primary);
  color: var(--bg-secondary);
  border-radius: 50%;
  padding: 0.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.image-label {
  position: absolute;
  top: 1rem;
  padding: 0.4rem 0.8rem;
  background-color: rgba(var(--bg-main-rgb), 0.7);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: .4rem;
  z-index: 5;
  pointer-events: none;
}

.before-label { left: 1rem; }
.after-label { right: 1rem; }

/* --- Video Comparison --- */
.video-comparison {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.video-container {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: .6rem;
  text-align: center;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.video-container video {
  border-radius: .4rem;
  max-width: 100%;
}

.video-caption {
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ---------- RESPONSIVE OVERRIDES (MOBILE) ---------- */
@media (max-width: 768px) {
  section, footer {
    padding-block: 4rem;
  }

  h2 { font-size: 1.8rem; }

  /* --- Nav --- */
  .nav-links {
    position: absolute;
    right: 0;
    top: 64px;
    flex-direction: column;
    align-items: center;
    width: 60%;
    background: var(--bg-main);
    padding: 2rem 0;
    display: none;
    border-left: 1px solid rgba(var(--text-primary-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--text-primary-rgb), 0.1);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  /* --- About --- */
  .about-content {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .about-content .profile-frame {
    width: 250px;
    height: 250px;
  }
  .about-text {
    text-align: center;
  }

  /* --- Education --- */
  .edu-item, .edu-item.reverse {
    flex-direction: column;
  }
  .edu-image {
    width: 100%;
    height: auto;
  }

  /* --- Certifications --- */
  .certification-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .certification-text {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  /* --- Blog Page --- */
  .blog-main-container {
    flex-direction: column;
  }
  .sidebar {
    position: static;
  }
}

/* --- NEW INTERACTIVE STYLES --- */

/* Animated Resume Button */
.resume-btn {
  overflow: hidden;
  position: relative;
  transition: background 0.3s ease, color 0.3s ease, padding-right 0.3s ease;
}

.resume-btn .btn-icon {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  opacity: 0;
  transition: right 0.3s ease, opacity 0.3s ease;
}

.resume-btn:hover {
  padding-right: 40px;
}

.resume-btn:hover .btn-icon {
  right: 15px;
  opacity: 1;
}

/* Entrance Animation for Sections */
section[id] {
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  opacity: 0;
  transform: translateY(20px);
}

section[id].visible {
  opacity: 1;
  transform: translateY(0);
}

/*
============================================================
 T-SHIRT PROJECT PAGE STYLES (Adapted for Dark Theme)
============================================================
*/

/* ---------- PROJECT HERO SECTION (REFINED) ---------- */
.project-hero {
  height: auto;
  padding: 8rem 2rem 4rem;
  text-align: center;
  background-color: transparent;
}

.hero-content .hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -2px;
}

.hero-content .hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ---------- PROJECT INTRO SECTION (REFINED) ---------- */
.project-intro {
  padding-block: 4rem 8rem;
  text-align: center;
}

.project-intro p {
  max-width: 650px;
  margin: 0 auto 1.5rem; /* Add margin between paragraphs */
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 300;
}


/* ---------- ENHANCED GALLERY SHOWCASE (UNIFORM & PROFESSIONAL) ---------- */
.gallery-showcase {
  padding: 4rem 2rem;
}

/* An elegant 3-column grid for a balanced 9-item layout */
.tshirt-gallery-enhanced {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.tshirt-card-enhanced {
  background: var(--bg-secondary);
  border-radius: .6rem;
  overflow: hidden;
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.tshirt-card-enhanced:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.tshirt-card-enhanced .image-wrapper {
  aspect-ratio: 1 / 1.2;
  overflow: hidden;
  position: relative; /* Required for watermark positioning */
}

/* --- Watermark Style --- */
.tshirt-card-enhanced .image-wrapper::after {
  content: '© Geoneil Saguin';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.1; /* Subtle watermark */
  transform: rotate(-30deg) scale(1.2);
  pointer-events: none; /* Allows clicks to pass through */
  text-transform: uppercase;
  letter-spacing: 1px;
}


.tshirt-card-enhanced img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tshirt-card-enhanced:hover img {
  transform: scale(1.05);
}

.card-info {
  padding: 1.25rem;
  text-align: center;
  border-top: 1px solid rgba(var(--text-primary-rgb), 0.1);
}

.card-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}


/* ---------- IMAGE MODAL (FOR CLICK-TO-ENLARGE) ---------- */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(var(--bg-main-rgb), 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.image-modal.visible {
  opacity: 1;
}

.image-modal .modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  border-radius: .6rem;
  overflow: hidden;
}

/* --- Watermark for Enlarged Modal Image --- */
.image-modal .modal-content::after {
  content: '© Geoneil Saguin';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3vw; /* Responsive font size */
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.1;
  transform: rotate(-30deg) scale(1.5);
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.image-modal img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: .6rem;
}

.close-modal {
  position: absolute;
  top: 1rem;  
  right: 1rem;
  width: 3rem;
  height: 3rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid rgba(var(--text-primary-rgb), 0.1);
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 10;
}

.close-modal:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


/* Responsive adjustments */
@media (max-width: 992px) { /* For standard tablets */
    .tshirt-gallery-enhanced {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) { /* For mobile phones */
  .tshirt-gallery-enhanced {
    grid-template-columns: 1fr;
  }
  .close-modal {
    top: 1rem;
    right: 1rem;
  }
  .image-modal .modal-content {
    max-width: 95vw;
  }
}
