/* --- Theme Variables (Refined Colors) --- */
:root {
  --color-bg-day: #f8f9fa; /* Lighter white */
  --color-bg-dark: #1f2937; /* Modern dark gray (Slate) */
  --color-bg-ocean: #e3f2fd; /* Lighter ocean blue */

  --color-text-day: #343a40;
  --color-text-dark: #f0f3f6;
  --color-text-ocean: #0d47a1;

  --color-accent-day: #007bff; /* Primary Blue */
  --color-accent-dark: #6699ff; /* Brighter accent for dark mode */
  --color-accent-ocean: #29b6f6; /* Cyan accent */

  /* New: Subtle contrast color for elements like background behind bars */
  --color-light-bg: #e9ecef;
}

/* --- Base Styles --- */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: var(--color-bg-day);
  color: var(--color-text-day);
  transition: background-color 0.5s, color 0.5s;
}

/* --- Theme Classes --- */
body.dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
}
body.ocean {
  background-color: var(--color-bg-ocean);
  color: var(--color-text-ocean);
}


.splash-content {
  padding: 20px;
  max-width: 90%;
}

#splashGreeting {
  font-size: 3.5rem;
  margin-bottom: 5px;
  color: var(--color-accent-dark);
  animation: pulse 2s infinite;
}

.tagline {
  font-size: 1.5rem;
  margin-bottom: 40px;
  font-weight: 300;
  letter-spacing: 1px;
}

.splash-button {
  background-color: var(--color-accent-day); 
  color: white;
  border: none;
  padding: 15px 35px;
  border-radius: 50px;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s, box-shadow 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.splash-button:hover {
  background-color: #388e3c;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.6);
}

.splash-note {
  margin-top: 30px;
  font-size: 0.9rem;
  color: #999;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}


/* --- Layout --- */
.container {
  max-width: 950px;
  margin: 30px auto;
  /* Adjust container background for dark mode */
  background: var(--color-bg-day); 
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1); /* Slightly deeper shadow */
  padding-bottom: 24px;
  transition: background-color 0.5s, box-shadow 0.5s;
}
body.dark .container {
    background: #2b3a4d; /* Container background in dark mode */
    box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}


header {
  text-align: center;
  padding: 32px 16px 16px 16px;
}

section {
  margin-top: 32px;
  padding: 0 24px;
}

/* --- Theme Switch --- */
.theme-switch {
  position: fixed;
  top: 10px; right: 10px;
  background: var(--color-accent-day);
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  z-index: 105;
  transition: background 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.theme-switch i {
    margin-right: 5px;
}
body.dark .theme-switch { background: var(--color-accent-dark);}
body.ocean .theme-switch { background: var(--color-accent-ocean);}
.theme-switch:hover {
  opacity: 0.8;
}

/* --- Professionalized Profile Pic --- */
.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent-day);
  padding: 5px; /* Creates a gap between image and ring */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.1);
}

/* Subtler, high-tech glow instead of breathing */
.profile-pic:hover {
  box-shadow: 0 0 25px var(--color-accent-day);
  transform: scale(1.05);
}

/* Popout remains for the interactive flex */
.profile-pic.popout {
  transform: translateX(-50%) scale(2.2);
  position: fixed;
  top: 15vh;
  left: 50%;
  z-index: 110;
  border: 4px solid var(--color-accent-day);
  background: var(--color-bg-day);
}

body.dark .profile-pic.popout { border-color: var(--color-accent-dark); }
body.ocean .profile-pic.popout { border-color: var(--color-accent-ocean); }

h1 {
  color: var(--color-accent-day);
  margin-bottom: 8px;
  font-size: 2.5rem;
  transition: color 0.5s;
}
body.dark h1 { color: var(--color-accent-dark); }
body.ocean h1 { color: var(--color-accent-ocean); }

h1.clickable {
  cursor: pointer;
}

.about {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.4;
  color: var(--color-text-day);
  transition: color 0.5s;
}
body.dark .about { color: var(--color-text-dark); }
body.ocean .about { color: var(--color-text-ocean); }

/* --- Section Headings --- */
h2 {
  border-bottom: 2px solid var(--color-accent-day);
  color: var(--color-accent-day);
  padding-bottom: 6px;
  margin-bottom: 20px;
  transition: border-color 0.5s, color 0.5s;
}
h2 i {
    margin-right: 8px;
}
body.dark h2 { border-color: var(--color-accent-dark); color: var(--color-accent-dark); }
body.ocean h2 { border-color: var(--color-accent-ocean); color: var(--color-accent-ocean); }

/* --- Skills Bar (Enhanced) --- */
.skills-bar {
  margin-bottom: 18px;
}
.skills-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 1.1rem;
}
.bar-bg {
  background: var(--color-light-bg); /* Use the subtle background color */
  border-radius: 18px;
  height: 20px;
  
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); /* Inner shadow for depth */
}
.bar {
  background: var(--color-accent-day);
  height: 20px;
  border-radius: 18px 0 0 18px;
  transition: width 0.7s ease, background-color 0.5s;
  /* Subtle gradient for modern look */
  background-image: linear-gradient(to right, 
    var(--color-accent-day), 
    color-mix(in srgb, var(--color-accent-day) 80%, white 20%)); 
}
body.dark .bar { 
  background: var(--color-accent-dark); 
  background-image: linear-gradient(to right, 
    var(--color-accent-dark), 
    color-mix(in srgb, var(--color-accent-dark) 80%, black 20%));
}
body.ocean .bar { 
  background: var(--color-accent-ocean); 
  background-image: linear-gradient(to right, 
    var(--color-accent-ocean), 
    color-mix(in srgb, var(--color-accent-ocean) 80%, white 20%));
}

/* --- Activities --- */
.activities-list {
  list-style-type: disc;
  padding-left: 18px;
  font-size: 1.05rem;
  color: var(--color-text-day);
  transition: color 0.5s;
}
body.dark .activities-list { color: var(--color-text-dark); }
body.ocean .activities-list { color: var(--color-text-ocean); }

/* --- Downloads & Links / Contact Button --- */
.downloads a, #contactBtn {
  text-decoration: none;
  background-color: var(--color-accent-day);
  color: white;
  padding: 8px 22px;
  border-radius: 7px;
  margin-right: 14px;
  margin-bottom: 14px;
  font-weight: 600;
  display: inline-block;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.downloads a i, #contactBtn i { /* Style for icons inside download links and contact button */
    margin-right: 6px;
}
.downloads a:hover, #contactBtn:hover {
  background-color: #0056b3; /* Darker shade on hover */
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
/* Contact button specific styling */
#contactBtn {
  background-color: var(--color-accent-day);
  margin-right: 0;
}
#contactBtn:hover {
  background-color: #388e3c;
}

body.dark .downloads a { background-color: var(--color-accent-dark); }
body.dark .downloads a:hover { background-color: #4c77d1; }
body.ocean .downloads a { background-color: var(--color-accent-ocean); }
body.ocean .downloads a:hover { background-color: #0097a7; }

/* --- Gallery --- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.gallery img {
  width: 160px;
  height: 160px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 36px rgba(50,70,180,0.26), 0 3px 18px rgba(0,0,0,0.09);
  background: #fcfdff;
  border: 3px solid #c1d0fa;
  transition: 
    transform 0.2s cubic-bezier(.43,.36,.27,1),
    box-shadow 0.18s,
    border-color 0.18s,
    filter 0.2s;
  margin: 10px;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.13) translateY(-16px) rotate(-3.2deg);
  box-shadow: 0 28px 64px rgba(40, 168, 240, 0.42), 0 6px 22px rgba(0,0,0,0.17);
  border-color: #1e8cec;
  z-index: 3;
  filter: brightness(1.13) saturate(1.12) drop-shadow(0 0 12px #8ec9ff);
}
.gallery img.enlarged {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  z-index: 200;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  border-radius: 12px;
  transition: transform 0.3s ease;
  max-width: 90vw; /* restrict width */
  max-height: 90vh; /* restrict height */
  object-fit: contain;
  background: white;
}


/* --- Collapsible Projects --- */
button.collapsible {
  background-color: color-mix(in srgb, var(--color-accent-day) 10%, white 90%); /* Use color-mix for subtle background */
  cursor: pointer;
  padding: 15px 22px;
  width: 100%;
  border: none;
  border-radius: 12px;
  text-align: left;
  outline: none;
  font-size: 1.15rem;
  margin-bottom: 14px;
  font-weight: 700;
  color: var(--color-accent-day);
  transition: background-color 0.3s ease, color 0.5s, box-shadow 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
button.collapsible i {
    margin-right: 8px;
}
button.collapsible:hover {
  background-color: color-mix(in srgb, var(--color-accent-day) 20%, white 80%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
body.dark button.collapsible {
  color: var(--color-accent-dark);
  background-color: #273a4d; /* Darker background blend */
}
body.dark button.collapsible:hover { background-color: #384d66; }
body.ocean button.collapsible {
  color: var(--color-accent-ocean);
  background-color: color-mix(in srgb, var(--color-accent-ocean) 10%, white 90%);
}
body.ocean button.collapsible:hover { background-color: color-mix(in srgb, var(--color-accent-ocean) 20%, white 80%); }

.content {
  display: none;
  background: var(--color-light-bg);
  border-radius: 0 0 12px 12px;
  padding: 18px 22px;
  font-size: 1rem;
  color: var(--color-text-day);
  white-space: pre-wrap;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.content .project-link { /* Style for the view project link inside content */
    margin-top: 10px;
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
}
body.dark .content { background: #162034; color: var(--color-text-dark); }
body.ocean .content { background: color-mix(in srgb, var(--color-bg-ocean) 80%, white 20%); color: var(--color-text-ocean); }

/* --- Code blocks (if used) --- */
pre.code-sample {
  background-color: #2c3d77;
  color: #f1f6f9;
  padding: 16px 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: Consolas, Monaco, monospace;
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 12px;
  user-select: text;
  box-shadow: inset 2px 2px 6px rgba(0,0,0,0.4);
}
body.dark pre.code-sample {
  background: #1a2649;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 24px 0;
  background-color: var(--color-light-bg);
  border-radius: 0 0 16px 16px;
  font-size: 1rem;
  color: var(--color-text-day);
  transition: color 0.5s, background-color 0.5s;
}
body.dark footer { background-color: #2b3a4d; color: var(--color-text-dark); }
body.ocean footer { background-color: #dbf2ff; color: var(--color-text-ocean); }


/* --- Modals --- */
.modal, .modal2, .contact-modal {
  display: none;
  position: fixed;
  z-index: 111;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  overflow: auto;
  background-color: rgba(0,0,0,0.45);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}
.modal-content, .modal2-content, .contact-modal-content {
  background: #ffffff;
  margin: auto;
  border-radius: 16px;
  padding: 24px 28px 28px 28px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  max-width: 450px;
  color: #333;
  width: 100%; /* Ensure width works correctly inside the flex container */
  max-height: 90vh;
  overflow-y: auto;
}

body.dark .modal-content, body.dark .modal2-content, body.dark .contact-modal-content {
  background: #2c324a;
  color: var(--color-text-dark);
}
body.ocean .modal-content, body.ocean .modal2-content, body.ocean .contact-modal-content {
  background: #d8eaff;
  color: var(--color-text-ocean);
}
.modal-content p {
  margin: 0 0 20px 0;
  font-size: 1.1rem;
}
.modal-content img, .modal2-content img {
  width: 120px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 9px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
.modal-content img:hover, .modal2-content img:hover {
  transform: scale(1.08);
}
/* Back Button */
.back-btn {
  background: none;
  border: none;
  color: var(--color-accent-day);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 24px;
  transition: color 0.3s;
}
body.dark .back-btn { color: var(--color-accent-dark); }
body.ocean .back-btn { color: var(--color-accent-ocean); }
.back-btn:hover {
  color: #666;
}

/* --- Strength Section (Image Toggle) --- */
#strengthSection {
  position: relative;
  padding: 24px;
  border-radius: 14px;
  margin: 32px 24px;
  background-size: cover;
  background-position: center;
  color: white;
  cursor: pointer;
  transition: background-image 0.7s ease;
  min-height: 100px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#strengthSection h2 {
    color: inherit;
    border-color: transparent;
    border-bottom: 2px solid currentColor;
}
#strengthSection.default {
  background: var(--color-bg-day);
  color: var(--color-text-day);
  cursor: pointer;
  box-shadow: none;
}
body.dark #strengthSection.default {
  background: #2b3a4d; /* Matches container in dark mode */
  color: var(--color-text-dark);
}


#strengthContent {
  display: none;
  margin-top: 18px;
  font-size: 1.1rem;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.6); /* Slightly darker overlay for better text contrast */
  padding: 18px;
  border-radius: 12px;
  max-width: 730px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

#closeStrengthContent {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 20px;
  border: none;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  color: #0a5b36;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#closeStrengthContent:hover {
  background-color: white;
}

/* --- Gallery Image Enlargement --- */
.gallery img.enlarged {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
  z-index: 200;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
  border-radius: 12px;
  transition: transform 0.3s ease;
  max-width: 90vw; /* restrict width */
  max-height: 90vh; /* restrict height */
  object-fit: contain;
  background: white;
}

/* --- Contact Form Styles (Kept simple for Email Modal) --- */
.email-modal-content a {
    text-decoration: none;
    background-color: var(--color-accent-day);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}
.email-modal-content a:hover {
    background-color: #0056b3;
}
body.dark .email-modal-content a {
    background-color: var(--color-accent-dark);
}
body.dark .email-modal-content a:hover {
    background-color: #4c77d1;
}

/* ------------------------------------------------------------------- */
/* --- RESPONSIVENESS OPTIMIZATION (min-width: 600px for tablet/desktop) --- */
/* ------------------------------------------------------------------- */
@media (min-width: 600px) {
    .container {
        margin: 40px auto;
        padding-bottom: 40px;
    }
    
    header {
        padding-top: 50px;
    }

    /* Separate skills and activities/finance into two columns on wider screens */
    .container > section:nth-of-type(1) {
        /* This is Skills */
        padding: 0 40px;
    }
    .container > section:nth-of-type(2) {
        /* This is Strengths & Activities */
        padding: 0 40px;
  }
    .container > section:nth-of-type(2) {
        /* This is Strengths & Activities */
        padding: 0 40px;
    }
    .container > section:nth-of-type(3) {
        /* This is Strength Training */
        padding: 0 40px;
        margin-left: 40px;
        margin-right: 40px;
    }
    .container > section:nth-of-type(4) {
        /* This is Downloads & Links */
        padding: 0 40px;
    }
    .container > section:nth-of-type(5) {
        /* This is Gallery */
        padding: 0 40px;
    }
    .container > section:nth-of-type(6) {
        /* This is Finance Calculator */
        padding: 0 40px;
    }
    .container > section:nth-of-type(7) {
        /* This is Projects & Algorithms */
        padding: 0 40px;
    }

    /* Since we can't easily wrap with a new div, we adjust margin/padding and use section order */
    .container > section:nth-of-type(1), /* Skills */
    .container > section:nth-of-type(2), /* Strengths & Activities */
    .container > section:nth-of-type(3), /* Strength Training */
    .container > section:nth-of-type(6) { /* Finance Calculator */
        /* Remove padding for grid alignment */
        padding-left: 0;
        padding-right: 0;
    }

    /* Creating the layout structure for the top content */
    .container > section:nth-of-type(1) { /* Skills */
        grid-column: 1 / 2;
    }
    .container > section:nth-of-type(2) { /* Strengths & Activities */
        grid-column: 2 / 3;
        margin-top: 0;
    }

    /* Grouping Strength Training and Finance Calculator for visual balance */
    .container > section:nth-of-type(3) { /* Strength Training */
        grid-column: 1 / 2;
        margin-left: 0;
        margin-right: 0;
    }
    .container > section:nth-of-type(6) { /* Finance Calculator */
        grid-column: 2 / 3;
        margin-top: 0;
    }

    /*Downloads and Gallery remain full width but with padded content*/
    .container > section:nth-of-type(4),
    .container > section:nth-of-type(5),
    .container > section:nth-of-type(7) {
        grid-column: 1 / -1;
    }
    
    /* Increase gap for gallery on wider screens */
    .gallery {
        gap: 25px;
    }
    
    .gallery img {
        width: 180px;
        height: 180px;
    }
    
    

    /* Re-enabling padding for non-grid sections */
    .container > section {
        padding: 0 40px;
    }
}

/* Tech Stack Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 6px;
  color: white;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Specific Colors for languages */
.badge.python { background-color: #3776AB; } /* Python Blue */
.badge.html { background-color: #E34F26; }   /* HTML Orange */
.badge.js { background-color: #F7DF1E; color: black; } /* JS Yellow */
.badge.css { background-color: #1572B6; }    /* CSS Blue */
.badge.renpy { background-color: #FF7F50; }  /* Coral */

/* --- Scroll Reveal Animation --- */
.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- Supreme Glassmorphism Upgrade --- */
.container {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark .container {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hardened Button Style */
button.collapsible {
    border-radius: 1.5rem !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

button.collapsible:hover {
    transform: translateX(10px);
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Custom badge for Streamlit/Python apps */
.badge.streamlit {
    background-color: #ff4b4b;
}

/* Hover effect for the Utility Link */
.downloads a[style*="background-color: #ff4b4b"]:hover {
    background-color: #d32f2f !important;
    box-shadow: 0 4px 15px rgba(255, 75, 75, 0.4);
}


/* --- New Project Grid System --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border-color: var(--color-accent-day);
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-accent-day);
}
.project-title i { margin-right: 8px; }

.project-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 15px;
  opacity: 0.9;
}

.tech-stack {
  margin-bottom: 15px;
}

/* --- Tech Ecosystem Grid --- */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 15px;
  margin-bottom: 40px;
}

.tool-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px 10px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tool-card i {
  font-size: 2rem;
  color: var(--color-accent-day);
  transition: color 0.3s, transform 0.3s;
}

.tool-card span {
  font-weight: 600;
  font-size: 0.9rem;
}

.tool-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  border-color: var(--color-accent-day);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tool-card:hover i {
  transform: scale(1.2);
}


/* --- Masonry Art Gallery (Pinterest Style) --- */
.gallery-masonry {
  column-count: 2; /* Default to 2 columns */
  column-gap: 20px;
}

.gallery-masonry img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px; /* Space between items vertically */
  break-inside: avoid; /* Prevents images from getting cut */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: zoom-in;
  border: none; /* Removed the heavy border for a cleaner look */
  background: transparent;
}

.gallery-masonry img:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Make it 3 columns on larger screens */
@media (min-width: 768px) {
  .gallery-masonry {
    column-count: 3;
  }
}

/* Keep the enlarged style you already have */
.gallery-masonry img.enlarged {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(1); /* Reset scale */
  max-height: 90vh;
  max-width: 90vw;
  z-index: 1000;
  box-shadow: 0 0 0 100vw rgba(0,0,0,0.8); /* Darken background */
  width: auto;
  margin: 0;
  cursor: zoom-out;
}

/* --- Trophy Case (Achievements) --- */
.trophy-case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.trophy-card {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px;
  transition: transform 0.2s ease, background 0.2s;
}

.trophy-card:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateX(5px);
}

/* Icon Styles */
.trophy-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 15px;
  flex-shrink: 0; /* Prevents squishing */
}

.trophy-icon.gold { background: #fff8e1; color: #ffc107; }
.trophy-icon.fire { background: #fbe9e7; color: #ff5722; }
.trophy-icon.blue { background: #e3f2fd; color: #2196f3; }

/* Text Styles */
.trophy-info h4 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-accent-day);
}

.trophy-info .highlight {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #666;
  margin-bottom: 4px;
}

.trophy-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #777;
  line-height: 1.3;
}

/* Dark Mode Adjustments */
body.dark .trophy-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
body.dark .trophy-card:hover { background: rgba(255, 255, 255, 0.1); }
body.dark .trophy-info .highlight { color: #bbb; }
body.dark .trophy-info p { color: #aaa; }
body.dark .trophy-icon.gold { background: rgba(255, 193, 7, 0.2); }
body.dark .trophy-icon.fire { background: rgba(255, 87, 34, 0.2); }
body.dark .trophy-icon.blue { background: rgba(33, 150, 243, 0.2); }

/* --- The Skill Arsenal (Bonus Section) --- */
.arsenal-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left; /* Aligns tags nicely */
}

.arsenal-category {
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.05);
}

.category-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent-day);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Individual Tech Tags */
.tech-tag {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  color: #444;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: default;
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  background: var(--color-accent-day);
  color: white;
}

/* Specific Colors for instant recognition */
.tech-tag.python:hover { background: #3776AB; }
.tech-tag.cpp:hover { background: #00599C; }
.tech-tag.js:hover { background: #F7DF1E; color: black; }
.tech-tag.php:hover { background: #777BB4; }
.tech-tag.git:hover { background: #F05032; }
.tech-tag.life:hover { background: #4caf50; } /* Mint green for life stats */

/* Dark Mode Adjustments */
body.dark .arsenal-category {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
}
body.dark .tech-tag {
  background: rgba(255,255,255,0.1);
  color: #ddd;
}
body.dark .tech-tag:hover {
  color: white;
}

/* Flower Hover Effect */
#flowerImg:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* --- Modal Profile Header --- */
.modal-profile-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-profile-header h2 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  background: -webkit-linear-gradient(45deg, var(--color-accent-day), #4caf50);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-badge {
  display: inline-block;
  background: rgba(0,0,0,0.05);
  color: #555;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.bio-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #666;
  max-width: 90%;
  margin: 0 auto;
}

.bio-text strong {
  color: var(--color-accent-day);
}

/* --- Focus Grid (Skills) --- */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 25px;
}

.focus-card {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 12px;
  transition: transform 0.2s;
}

.focus-card:hover {
  transform: translateY(-3px);
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.focus-icon {
  width: 40px;
  height: 40px;
  background: var(--color-light-bg);
  color: var(--color-accent-day);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 12px;
}

.focus-info {
  display: flex;
  flex-direction: column;
}

.focus-info strong { font-size: 0.95rem; color: #333; }
.focus-info span { font-size: 0.8rem; color: #777; }

/* --- Interest Pills --- */
.interests-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.interest-pill {
  background: white;
  border: 1px solid #eee;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.interest-pill i { color: #ff6b6b; } /* Aesthetic red/pink for hearts/hobbies */

.interest-pill:hover {
  background: #fff0f0;
  border-color: #ffc9c9;
  transform: scale(1.05);
}

/* --- Social Action Bar --- */
.social-actions {
  display: flex;
  gap: 15px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: filter 0.2s, transform 0.2s;
  color: white;
}

.social-btn.email { background-color: #ea4335; box-shadow: 0 4px 10px rgba(234, 67, 53, 0.3); }
.social-btn.github { background-color: #333; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }

.social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* --- Dark Mode Adjustments for Modal --- */
body.dark .modal-profile-header h2 { -webkit-text-fill-color: var(--color-text-dark); }
body.dark .status-badge { background: rgba(255,255,255,0.1); color: #ddd; }
body.dark .bio-text { color: #aaa; }
body.dark .focus-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
body.dark .focus-info strong { color: #eee; }
body.dark .focus-info span { color: #bbb; }
body.dark .focus-icon { background: rgba(255,255,255,0.1); }
body.dark .interest-pill { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: #ccc; }
body.dark .interest-pill:hover { background: rgba(255,255,255,0.15); }


/* --- Easter Egg Trigger (The Tiny Flower) --- */
#sysConfigIcon:hover {
  opacity: 1 !important; /* Glows up when found */
  transform: rotate(180deg) scale(1.5); /* Spins and grows slightly */
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.6); /* Subtle pink glow */
}

/* --- Secret Modal Styling --- */
/* Ensure the modal content is centered and clean */
#sysConfigModal .modal2-content {
  background: white;
  border: 1px solid rgba(0,0,0,0.1);
  max-width: 350px; /* Keep it compact like a Polaroid */
}

body.dark #sysConfigModal .modal2-content {
  background: #1a1a2e;
  border-color: #333;
}

/* --- SUPREME SPLASH SCREEN STYLES --- */
#splashScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
  background: #0f0c29; /* Fallback */
}

/* Animated Gradient Background */
.splash-bg {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #000000);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  z-index: 1;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Glass Card */
.splash-glass-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 50px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 90%;
}

/* Loading Ring */
.loader-ring {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top: 4px solid var(--color-accent-day); /* Uses your variable */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Glitch Text Effect */
.glitch-text {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
}

/* Subtitle */
.splash-sub {
  color: #aaa;
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Cyber Button */
.cyber-btn {
  position: relative;
  padding: 15px 40px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: 0.3s;
  margin-top: 20px;
}

.cyber-btn:hover {
  background: white;
  color: black;
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

.cyber-btn:active {
  transform: scale(0.95);
}

/* --- New Skills Grid (Tech Proficiency) --- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}
/* Two columns on larger screens */
@media (min-width: 700px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

.skill-tech-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 15px 20px;
  border-radius: 12px;
  transition: transform 0.2s;
}

.skill-tech-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.skill-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--color-text-day);
}

.skill-icon {
  color: var(--color-accent-day);
  font-size: 1.1rem;
}

.skill-percent {
  font-family: monospace;
  font-weight: 700;
  color: var(--color-accent-day);
  background: rgba(0,0,0,0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.skill-track {
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent-day), #4caf50);
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Core Disciplines Grid (Activities) --- */
.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.discipline-card {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.5); /* Glassy look */
  border: 1px solid rgba(0,0,0,0.05);
  padding: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.discipline-card:hover {
  transform: translateY(-3px) translateX(3px);
  box-shadow: -5px 5px 15px rgba(0,0,0,0.1);
  background: white;
  border-color: var(--color-accent-day);
}

.disc-icon {
  width: 50px;
  height: 50px;
  background: var(--color-light-bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--color-accent-day);
  margin-right: 15px;
  flex-shrink: 0;
}

.disc-content h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 700;
}

.disc-content p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

/* Dark Mode Adjustments */
body.dark .skill-tech-card { background: rgba(255,255,255,0.02); }
body.dark .skill-name-row { color: #eee; }
body.dark .skill-track { background: rgba(255,255,255,0.1); }
body.dark .discipline-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.05); }
body.dark .discipline-card:hover { background: rgba(255,255,255,0.08); }
body.dark .disc-icon { background: rgba(255,255,255,0.1); }
body.dark .disc-content h4 { color: #eee; }
body.dark .disc-content p { color: #aaa; }
/* --- Digital Assets Grid --- */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.asset-card {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.asset-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
  border-color: var(--color-accent-day);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Icon Box */
.asset-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--color-accent-day);
  margin-right: 15px;
}
.asset-icon.github { color: #f0f6fc; background: #21262d; }
.asset-icon.csv { color: #4caf50; background: rgba(76, 175, 80, 0.1); }
.asset-icon.web {color: #00bcd4;background: rgba(0, 188, 212, 0.1);}
/* Text Details */
.asset-details {
  flex: 1; /* Pushes arrow to the right */
  display: flex;
  flex-direction: column;
}

.asset-details strong {
  font-size: 1rem;
  color: var(--color-text-day);
  margin-bottom: 2px;
}

.asset-details span {
  font-size: 0.8rem;
  color: #777;
}

/* Arrow/Action Icon */
.asset-arrow {
  color: #aaa;
  transition: transform 0.3s;
}

.asset-card:hover .asset-arrow {
  color: var(--color-accent-day);
  transform: translateX(3px); /* Subtle nudge */
}

/* Special Style for Primary Card (Resume) */
.asset-card.primary {
  background: linear-gradient(135deg, rgba(var(--color-accent-day), 0.1), transparent);
  border-color: var(--color-accent-day);
}

/* Dark Mode Adjustments */
body.dark .asset-details strong { color: #eee; }
body.dark .asset-details span { color: #aaa; }
body.dark .asset-card { background: rgba(255,255,255,0.02); }
body.dark .asset-card:hover { background: rgba(255,255,255,0.06); }

/* --- Knowledge Vault & Utility Grid --- */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr; /* Stacked lists look better in modals */
  gap: 10px;
  margin-bottom: 25px;
}

/* Two columns on wider screens */
@media (min-width: 600px) {
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.resource-card {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.resource-card:hover {
  background: white;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--color-accent-day);
}

/* Icon Styles */
.res-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-right: 12px;
  color: white;
  flex-shrink: 0;
}

/* Specific Colors */
.res-icon.purple { background: #9c27b0; }
.res-icon.teal { background: #009688; }
.res-icon.orange { background: #ff9800; }
.res-icon.deep-purple { background: #673ab7; }
.res-icon.red { background: #f44336; }

/* Text Details */
.res-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.res-info strong {
  color: var(--color-text-day);
  font-size: 0.95rem;
  font-weight: 600;
}

.res-info span {
  color: #888;
  font-size: 0.75rem;
}

/* Arrow */
.res-arrow {
  color: #ccc;
  font-size: 0.9rem;
  transition: transform 0.2s, color 0.2s;
}

.resource-card:hover .res-arrow {
  color: var(--color-accent-day);
  transform: translateX(2px);
}

/* Dark Mode Support */
body.dark .resource-card { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
body.dark .resource-card:hover { background: rgba(255,255,255,0.1); }
body.dark .res-info strong { color: #eee; }
body.dark .res-info span { color: #aaa; }