:root {
    /* Theme Variables */
    --primary: #FFFFFF;
    --primary-rgb: 255, 255, 255;
    --secondary: #B3B3B3;
    --accent: #007BFF;
    --bg: #121212;
    --surface: #1E1E1E;
    --text: #FFFFFF;
    --text-secondary: #B3B3B3;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --glass-bg: rgba(30, 30, 30, 0.65);
    --glass-border: rgba(224, 224, 224, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
    --font-weight-medium: 500;
}

html {
    height: 100%;
    background-color: var(--primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    font-weight: 400;
    line-height: 1.6;
}

header {
    background: var(--gradient);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 Q50,80 0,100 Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.3;
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-illustration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Add illustration here, e.g., background-image: url('path/to/illustration.svg'); */
    background-color: rgba(0,0,0,0.1);
    z-index: -1;
    opacity: 0.5;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;

    /* Core Liquid Glass styling for the image itself - content will be distorted */
    background: rgba(0,0,0,0.01); /* Minimal background, image is the content */
    border-radius: 50%;

    /* Remove direct border and box-shadow as they will be handled by ::before */
    /* border: 1.5px solid rgba(255,255,255,0.35); */
    /* box-shadow: 0 4px 32px 0 rgba(0,0,0,0.10),
                0 1.5px 5px 0 rgba(255,255,255,0.15) inset; */

    filter: url(#liquid-displacement) blur(0.5px);

    opacity: 0; /* Initial state for reveal animation */
    transition: opacity 1s ease-out, filter 1s ease-out;

    position: relative;
    overflow: hidden; /* Still needed to clip ::after shine if it's larger */
    z-index: 1; /* Image content layer */
    /* This class is no longer directly on the image shown, but on the old static one. */
    /* The new carousel images will have their own styles. */
}

/* Carousel Styles */
.carousel-viewport {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px auto; /* Centered, with margin below for dots */
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.2),
        0 0 8px rgba(255, 255, 255, 0.2);
    position: relative; /* For absolute positioning of strip if ever needed, though flex is used now */
}

/* Subtle rotating border effect */
.carousel-viewport::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        rgba(122, 114, 240, 0.3),
        rgba(255, 255, 255, 0.3),
        transparent
    );
    z-index: -1;
    animation: profileRotate 6s linear infinite;
}

/* Subtle inner highlight */
.carousel-viewport::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.03) 30%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 2;
}

.carousel-strip {
    display: flex;
    width: 540px; /* 3 images * 180px width */
    height: 180px;
    transition: transform 0.5s ease-in-out;
}

.carousel-image {
    width: 180px;
    height: 180px;
    display: block; /* Remove any extra space if inline */
}

.profile-photo-style {
    object-fit: cover; /* For the actual profile photo */
}

.qr-style {
    object-fit: contain; /* For qrs to prevent distortion */
}

/* Styles for the image indicator dots */
.image-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-top: 15px; Now handled by carousel-viewport margin-bottom */
    margin-bottom: 15px; /* Space between dots and the H1 title */
}

.indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4); /* Semi-transparent white for inactive dots */
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator-dot.active {
    background-color: white; /* Solid white for the active dot */
}

/* ::before is now used for the clean edge/border overlay */
.profile-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit; /* Match the parent image's circle */

    border: 1.5px solid rgba(255, 255, 255, 0.45); /* Sharper, more visible border */
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.25) inset, /* Inner highlight for edge */
                0 1px 2px 0 rgba(255,255,255,0.3) inset; /* Softer inner bevel for 3D edge */
                /* Optional: Add back a subtle outer shadow if the glass edge itself should cast one */
                /* 0 2px 10px rgba(0,0,0,0.1); */

    z-index: 2; /* On top of the distorted image content */
    pointer-events: none; /* Does not interfere with image itself */
}

.profile-image::after {
  content: "";
  position: absolute;
  top: -50%; /* Start position of the large gradient */
  left: -50%;
  width: 200%; /* Make gradient large enough to move across */
  height: 200%;
  background: radial-gradient(circle at 50% 50%, /* Centered radial for a circular shine */
                               rgba(255,255,255,0.30) 0%, /* Central, slightly stronger white */
                               rgba(255,255,255,0.20) 15%, /* Mid-point of shine */
                               transparent 50%); /* Fade out more broadly */
  pointer-events: none;
  animation: shine 4s infinite linear;
  border-radius: 50%;
  opacity: 0.8;
  z-index: 3; /* Ensure shine is on top of image and edge overlay */
}

@keyframes shine {
  0% {
    transform: translate(-25%, -25%) rotate(0deg); /* Start off-center */
  }
  50% {
    transform: translate(25%, 25%) rotate(10deg); /* Move across to other side */
  }
  100% {
    transform: translate(-25%, -25%) rotate(0deg); /* Return to start */
  }
}

/* New class for the gradient text on name */
.name-gradient-effect {
    -webkit-text-fill-color: transparent;
    background: radial-gradient(circle at 0 0, #099ef1 0%, #6863f8 18.82%, #d84ffa 32.6%, #f058c5 52.83%, #ff4f90 68.03%, #ff6558 87.66%, #ff891f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: var(--font-weight-medium, 700);
}

h1 {
    font-size: 4rem; /* Stays the same */
    margin-top: 2.5rem; /* Added to increase space above H1 */
    margin-bottom: 1rem;
    font-weight: var(--font-weight-medium); /* New */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2); /* Will be hidden by gradient, but kept for structure */
    line-height: 1.03; /* New */
    letter-spacing: -1px; /* New */
    /* animation: fadeInDown 1s ease-out; -- Removed, H1 reveal now handled by .reveal class */
    /* Initial state for Focus Pull / Depth animation */
    opacity: 0;
    filter: blur(4px);
    transform: scale(0.95) translateY(10px); /* Start slightly small, blurred, and down */
    transition: opacity 0.8s ease-out, filter 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    /* For name hover effect, H1 needs to establish a containing block for ::before/::after if it's not already 'block' or 'inline-block' */
    /* H1 is block by default, so position:relative is enough for pseudo-elements */
    position: relative;
    display: inline-block; /* To make ::before/::after width relative to content block, not full line */
    padding-top: 5px; /* Space for ::before */
    padding-bottom: 5px; /* Space for ::after */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Darker shadow for light text on dark bg */
}

.name-hover-effect::after,
.name-hover-effect::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--accent), #00ffff); /* Adapt accent color */
  left: 0;
  transform: scaleX(0);
  transition: transform 0.4s ease-out;
}

.name-hover-effect::after {
  bottom: 0; /* Adjusted from -5px to be closer to text, considering padding */
  transform-origin: right;
}

.name-hover-effect::before {
  top: 0; /* Adjusted from -5px */
  transform-origin: left;
}

.name-hover-effect:hover::after,
.name-hover-effect:hover::before {
  transform: scaleX(1);
}


header p { /* This targets the tagline specifically if it's the only p in header content */
    font-size: 1.5rem;
    margin-bottom: 2rem;
    /* animation: fadeInUp 1s ease-out 0.3s both; -- Removed, will be triggered by JS */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out; /* Delay removed, JS controls sequence */
    color: rgba(255,255,255,0.85); /* Lighter for dark theme header */
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: rgba(255,255,255,0.7);
}

main {
    max-width: 1200px; /* Reverted from 1440px */
    margin: 0 auto;
    padding: 50px 20px;
}

section {
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
    position: relative;
    overflow: hidden;
    z-index: 0; /* Base z-index for sections that are glass panels */
    background: var(--glass-bg); /* Dark theme background */
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow:
        0 10px 35px var(--glass-shadow),
        inset 0 1px 0.5px rgba(255, 255, 255, 0.15),
        inset 0 -0.5px 3px rgba(0, 0, 0, 0.2),
        0 0 0 0.5px var(--glass-border),
        0 0 20px rgba(122, 114, 240, 0.3),
        0 0 40px rgba(122, 114, 240, 0.2);
    padding: 35px; /* Default padding, can be overridden by specific section if needed */
    /* Noise texture for subtle grain, applied to all glass panels */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
}

/* Specific padding for certain sections if different from default .glass-panel padding */
section#experience, section#tech-stack {
    padding: 30px;
}
section#connect {
    padding: 40px;
    margin-top: 40px; /* Retain specific margin if needed */
}

section::before { /* Main highlight/sheen */
    content: '';
    position: absolute;
    top: -30%; left: -40%; width: 160%; height: 160%;
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.15) 0%, /* Dimmer highlight for dark mode */
        rgba(255,255,255,0.05) 50%,
        transparent 68%);
    transform: rotate(15deg);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1; /* Behind content */
}

section::after { /* Top reflection */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 35%;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.1) 0%, /* Dimmer reflection */
        rgba(255,255,255,0.03) 50%,
        rgba(255,255,255,0) 100%);
    border-radius: 20px 20px 0 0; /* Match parent's top border-radius */
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: screen;
    z-index: -1; /* Behind content */
}

/* Ensure text within .glass-panel has good contrast and stacking context */
section h2,
section p,
section > div, /* For containers like .tech-stack-layout-container */
section > ul, /* For lists directly under panel, e.g. contact links */
section .experience-card, /* Ensure cards within panels are also stacked correctly */
section .education-card,
section .social-links {
    position: relative;
    z-index: 1; /* Content should be above pseudo-elements */
}

/* Dark theme adjustments for text within .glass-panel */
section h2 {
    color: var(--secondary);
    text-shadow: var(--text-shadow);
}
section p {
    color: var(--text);
    text-shadow: var(--text-shadow);
}


/* REMOVE Individual Section Glass Styles - now using .glass-panel class */


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

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text); /* Generic paragraph color */
    text-shadow: var(--text-shadow);
}

/* Improve readability for long text blocks */
main section > p { /* Keep this rule for general paragraphs in sections */
    max-width: 70ch;
}
.experience-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.education-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.experience-card > p {
    max-width: 70ch; /* Already has this */
    color: var(--text); /* Ensure it's specifically set if needed */
    text-shadow: var(--text-shadow);
}


ul {
    list-style: none;
}

li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 0;
    font-size: 1.1rem;
    color: var(--text); /* Default list item text color */
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Focus indicator for accessibility */
a:focus,
.scroll-indicator:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px; /* Slight rounding for the focus outline */
}


/* Specific focus for round social links to maintain their shape */
.social-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 3px; /* Slightly more offset for circles */
    /* The border-radius is already 50% on .social-link, so it should maintain its shape */
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important; /* For animations that repeat */
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important; /* Overrides smooth scrolling */
    }

    .profile-image, h1, header p, .scroll-indicator, .shape, section, .experience-card, .tech-item, .social-link::before {
        animation: none !important; /* Turn off animations */
        transition: none !important; /* Turn off transitions */
    }

    .experience-card:hover, .tech-item:hover {
        transform: none !important; /* Disable hover transforms */
    }

    .social-link:hover i {
        transform: none !important; /* Disable hover transforms on icons */
    }

    section { /* Ensure sections are visible if scroll animations are off */
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Video Loading Spinner */
#video-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--primary);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Video Background Styling */
#heroVideoBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -10;
    opacity: 0;
    display: block;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

#heroVideoBackground.active-video-bg {
    opacity: 1;
}

body.body-transparent-for-video {
    background-color: transparent !important;
}

header {
    background: transparent;
}

/* Education Section Styles */

.education-details {
    flex-grow: 1;
}

.education-details h3 {
    font-size: 1.25rem;
    color: var(--secondary);
    text-shadow: var(--text-shadow);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.education-details .education-institution,
.education-details .education-location {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

.education-details .education-years {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.6rem;
    display: block;
}

.education-details .education-achievement {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.expanding-contact-area {
    background-color: rgba(var(--surface-rgb, 44, 44, 44), 0.75); /* Using a more specific dark surface color */
    backdrop-filter: blur(20px) saturate(160%); /* Adjusted blur/saturate for dark glass */
    border-color: rgba(224, 224, 224, 0.15); /* Lighter border for contrast */
    box-shadow: 0 2px 8px rgba(0,0,0, 0.25), /* Slightly softer near shadow */
                0 15px 45px rgba(0,0,0, 0.3); /* Adjusted ambient shadow */
}

.expanding-contact-area::before {
    background: rgba(var(--surface-rgb, 50, 50, 50), 0.15); /* Darker surface layer */
    box-shadow:
        inset 1px 1px 2px rgba(255,255,255,0.1), /* More subtle top-left highlight */
        inset -1px -1px 3px rgba(0,0,0,0.3), /* Darker bottom-right shadow */
        inset 0 0 15px rgba(0,0,0,0.1); /* Subtle inner glow */
    background-image: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, transparent 55%); /* Dimmer sheen */
}

.expanding-contact-area ul li a {
    background: rgba(var(--surface-rgb, 60, 60, 60), 0.8); /* Darker item background */
    border-color: rgba(224,224,224,0.25); /* Slightly more visible border for items */
    box-shadow:
        0 4px 12px rgba(0,0,0,0.2), /* Adjusted shadow for items */
        inset 0 0.5px 0 rgba(255,255,255,0.12),
        inset 0 -0.5px 1.5px rgba(0,0,0,0.25),
        0 0 0 0.5px rgba(224,224,224,0.18);
    color: var(--primary);
    text-shadow: var(--text-shadow);
}

.expanding-contact-area ul li a::before { /* Highlight for contact links */
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.04) 50%, transparent 68%); /* Dimmer highlight */
    opacity: 0.4;
}

.expanding-contact-area ul li a::after { /* Top reflection for contact links */
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0) 100%); /* Dimmer reflection */
    mix-blend-mode: screen; /* Screen often better for light on dark */
    opacity: 0.75;
}

.expanding-contact-area ul li a:hover {
    background: rgba(var(--surface-rgb, 70, 70, 70), 0.85);
    border-color: rgba(224,224,224,0.35);
    box-shadow:
        0 6px 18px rgba(0,0,0,0.25),
        inset 0 0.5px 0 rgba(255,255,255,0.15),
        inset 0 -0.5px 2px rgba(0,0,0,0.3),
        0 0 0 0.5px rgba(224,224,224,0.25);
    color: var(--accent); /* Use accent for hover state */
}

.expanding-contact-area ul li a:hover::before {
    opacity: 0.55; /* Slightly more prominent on hover */
}

.expanding-contact-area ul li a:active {
    background: rgba(var(--surface-rgb, 55, 55, 55), 0.8);
    box-shadow:
        0 2px 8px rgba(0,0,0,0.3),
        inset 0 0.5px 1px rgba(0,0,0,0.35),
        inset 0 -0.5px 0px rgba(255,255,255,0.1);
}

.expanding-contact-area ul li a:focus,
.expanding-contact-area ul li a:focus-visible {
    box-shadow: /* Base dark style shadow */
        0 4px 12px rgba(0,0,0,0.2),
        inset 0 0.5px 0 rgba(255,255,255,0.12),
        inset 0 -0.5px 1.5px rgba(0,0,0,0.25),
        0 0 0 0.5px rgba(224,224,224,0.18),
        /* Dark Focus rings */
        0 0 0 2px var(--bg), /* Use dark-bg for inner ring to contrast with item */
        0 0 0 4px var(--primary); /* Use dark-primary for outer ring */
}

.tech-item {
    background: var(--surface);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.tech-item:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.tech-item i {
    color: var(--primary);
}

footer {
    background: rgba(var(--bg, 30,30,30), 0.7); /* Darker footer base */
    border-top-color: rgba(224,224,224,0.1); /* Lighter top border */
    color: var(--text);
    text-shadow: var(--text-shadow);
    box-shadow:
        0 -8px 24px rgba(0,0,0,0.35),
        inset 0 1px 0px rgba(224,224,224,0.08),
        inset 0 -0.5px 2px rgba(0,0,0,0.4);
}
footer::before { /* Footer Sheen */
    background: radial-gradient(circle at center,
        rgba(224,224,224,0.08) 0%,
        rgba(224,224,224,0.01) 50%,
        transparent 70%);
    opacity: 0.3;
}
footer::after { /* Footer Reflection */
    background: linear-gradient(to bottom,
        rgba(224,224,224,0.06) 0%,
        rgba(224,224,224,0.01) 50%,
        transparent 100%);
    mix-blend-mode: screen;
    opacity: 0.4;
}

.shape-1 {
    background: var(--accent);
}
.shape-2 {
    background: var(--primary);
}
.shape-3 {
    background: rgba(224, 224, 224, 0.8); /* Lighter grey for the white shape */
}

.accordion-header {
    background: rgba(var(--surface-rgb, 50,50,50), 0.7);
    border-color: rgba(224,224,224,0.2);
    box-shadow:
        0 8px 24px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 4px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.15);
    color: var(--text);
    text-shadow: var(--text-shadow);
}
.accordion-header::before { /* Highlight */
    background: radial-gradient(circle at center, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.05) 50%, transparent 70%);
    opacity: 0.4;
}
.accordion-header::after { /* Reflection */
    background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    mix-blend-mode: screen;
}
.accordion-header:hover {
    background: rgba(var(--surface-rgb, 65,65,65), 0.75);
    box-shadow:
        0 12px 28px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -1px 4px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.2);
}
.accordion-header:hover::before {
    opacity: 0.5;
}
.accordion-header:active {
    background: rgba(var(--surface-rgb, 40,40,40), 0.7);
    box-shadow:
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 1px 2px rgba(0,0,0,0.2),
        inset 0 -1px 0 rgba(255,255,255,0.1);
}
.accordion-header.active {
    background-color: rgba(var(--primary-rgb), 0.25); /* More prominent active state */
    color: var(--text); /* Ensure text is light */
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 2px 10px rgba(var(--primary-rgb),0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.accordion-header.active:hover {
    background-color: rgba(var(--primary-rgb), 0.3);
    color: #fff; /* Brightest text for active hover */
}
.accordion-header.active .accordion-icon {
    color: var(--text); /* Match text color or use accent */
}
.accordion-header.active:hover .accordion-icon {
     color: #fff;
}
.accordion-header:focus,
.accordion-header:focus-visible {
    box-shadow: /* Base dark style shadow */
        0 8px 24px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 4px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.15),
        /* Dark Focus rings */
        0 0 0 2px var(--bg),
        0 0 0 4px var(--primary);
}

/* Old .tech-stack-detailed styles removed */

/* Styles for New Two-Column Tech Stack Layout */
.tech-stack-layout-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Equal width columns */
    gap: 30px;
    margin-top: 2rem;
    align-items: flex-start; /* Keep items aligned to the start of the grid area */
}


.accordion-header {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.accordion-item:last-child .accordion-header {
    margin-bottom: 0;
}

/* Hover and Active states will be added in a later step */
/* Focus state will also be added later */

.accordion-header h3 {
    /* Text color will be inherited from .accordion-header */
    /* text-shadow will be inherited */
    /* font-weight will be inherited */
    font-size: 1.05rem; /* Slightly smaller to accommodate padding and effects */
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.accordion-header h3 i {
    color: var(--primary); /* Keep icon color consistent for now */
    font-size: 1.2em;
    width: 22px; /* Adjusted width */
    text-align: center;
}

.accordion-icon {
    font-size: 1.1rem; /* Adjusted size */
    color: var(--primary); /* Keep icon color consistent for now */
    transition: transform 0.3s ease, color 0.3s ease; /* Added color transition */
}

/* Active state for icon color will be handled with .accordion-header.active later */
.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
    /* color will be set in .accordion-header.active .accordion-icon rule */
}

/* Hover & Active states for .accordion-header */
.accordion-header:hover {
    background: var(--accent);
    color: var(--bg);
}

.accordion-header:hover .accordion-icon,
.accordion-header:hover h3 i {
    color: var(--bg);
}

.accordion-header.active {
    background-color: var(--accent);
    color: var(--bg);
}

.accordion-header.active .accordion-icon {
    color: var(--bg);
}

.accordion-header:focus,
.accordion-header:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}


.accordion-header h3 {
    font-size: 1.1rem; /* Title size in accordion */
    color: var(--secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icon and text */
}
.accordion-header h3 i {
    color: var(--primary);
    font-size: 1.3em; /* Icon size relative to h3 */
    width: 25px; /* Fixed width for icon alignment */
    text-align: center;
}
.accordion-header h3 {
    color: var(--secondary);
}
.accordion-header h3 i {
    color: var(--primary);
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}
.accordion-icon {
    color: var(--primary);
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg); /* Rotates '+' to 'x' */
}
.accordion-header.active .accordion-icon {
    color: var(--text); /* Or --dark-accent if more emphasis needed */
}


/* Commenting out old card styles as they are replaced by accordion */
/*
.tech-card-grid { ... }
.tech-card { ... }
.tech-card:hover { ... }
.tech-card-icon { ... }
.tech-card h3 { ... }
.tech-details { ... }
.tech-card.active .tech-details { ... }
.tech-details ul { ... }
.tech-details li { ... }
.tech-details li::before { ... }
.tech-details li i.fa-solid.fa-dharmachakra { ... }
*/
/* Old .tech-card (from Plan v9) styles also removed as they were part of the commented block */


.tech-detail-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 25px;
    max-height: 450px;
    overflow-y: auto;
}

.tech-detail-content-wrapper {
    position: relative;
    z-index: 2; /* Above pseudo-elements of .tech-detail-card */
    transition: opacity 0.4s ease-in-out;
    min-height: 100px;
}

.tech-detail-content-wrapper.content-loading {
    opacity: 0.3;
    /* Could add a subtle scale down or blur too */
}
.tech-detail-content-wrapper.content-loading {
    opacity: 0.5; /* Adjust for dark theme visibility */
}

/* Optional: Add a title style if titles are dynamically added to the card */
.tech-detail-card h4 {
    font-size: 1.4rem; /* Title for the detail view */
    color: var(--secondary);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    text-align: left;
    text-shadow: 0 1px 1px rgba(255,255,255,0.7); /* Standard light text shadow for titles */
    position: relative; /* Ensure it's part of the stacking context if any other absolute elements are ever added inside content-wrapper */
    z-index: 1; /* Relative to siblings within content-wrapper if any */
}
.tech-detail-card h4 {
    color: var(--secondary);
    border-bottom-color: rgba(255,255,255,0.15);
    text-shadow: var(--text-shadow);
}

.tech-detail-card ul {
    list-style-type: disc; /* Use standard disc bullets */
    padding-left: 25px; /* Indent for bullets */
    margin-top: 0;
}
.tech-detail-card li {
    font-size: 0.9rem;
    line-height: 1.7; /* Slightly increased for better readability with bullets */
    color: var(--text);
    text-shadow: 0 0.5px 1px rgba(255,255,255,0.65); /* Standard light text shadow */

    /* Remove custom card-like styling */
    background-color: transparent;
    padding: 3px 0; /* Minimal vertical padding, no horizontal as text flows */
    border-radius: 0;
    margin-bottom: 8px; /* Adjust spacing between bullet items */
    border: none;
    /* padding-left will be handled by ul's padding and li's natural bullet position */
    position: relative; /* Ensure stacking context for text shadow if needed */
    z-index: 1;
}
.tech-detail-card li {
    color: var(--text);
    text-shadow: var(--text-shadow);
}

.tech-detail-card li::before {
    content: ""; /* Ensure no custom bullet from previous attempts */
    display: none; /* Hide any residual custom bullet styling */
}
.tech-detail-card li i.fa-solid.fa-dharmachakra { /* For Kubernetes icon */
    margin-right: 0.5em;
    color: var(--primary);
    /* font-size: 0.9em; -- inherit or adjust if needed */
    vertical-align: middle; /* Better alignment with text */
}
.tech-detail-card li i.fa-solid.fa-dharmachakra {
    color: var(--primary);
}

.tech-detail-placeholder {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 20px;
}
.tech-detail-placeholder {
    color: #777; /* Darker placeholder text for dark theme */
}


/* Responsive: Stack columns on smaller screens */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
    .tech-stack-layout-container {
        grid-template-columns: 1fr; /* Single column */
    }
    /* Hide the original tech detail card on mobile */
    #techDetailDisplayCard {
        display: none;
    }

    /* Styles for the dynamically injected mobile tech detail content */
    .mobile-tech-detail-content {
        padding: 15px;
        margin-top: 0px; /* Adjusted from 8px, as it's inside accordion item flow */
        border-top: 1px solid rgba(var(--primary-rgb), 0.2);
        background-color: rgba(var(--primary-rgb), 0.03); /* Subtle background */
        border-radius: 0 0 12px 12px; /* Match accordion header bottom if it's part of the item */
        animation: fadeInDetails 0.3s ease-in-out;
    }

    .mobile-tech-detail-content h4 {
        font-size: 1.2rem; /* Slightly smaller for mobile */
        color: var(--secondary);
        margin-top: 0;
        margin-bottom: 10px;
        padding-bottom: 5px;
        border-bottom: 1px solid rgba(var(--primary-rgb), 0.2);
    }

    .mobile-tech-detail-content ul {
        list-style-type: disc;
        padding-left: 20px;
        margin-top: 0;
    }

    .mobile-tech-detail-content li {
        font-size: 0.85rem;
        line-height: 1.6;
        color: var(--text);
        margin-bottom: 6px;
        background-color: transparent;
        padding: 2px 0;
        border: none;
    }
     .mobile-tech-detail-content li i.fa-solid.fa-dharmachakra {
        margin-right: 0.4em;
        color: var(--primary);
        vertical-align: middle;
    }


    .mobile-tech-detail-content {
        border-top-color: rgba(var(--primary-rgb), 0.3);
        background-color: rgba(var(--primary-rgb), 0.1);
    }
    .mobile-tech-detail-content h4 {
        color: var(--secondary);
        border-bottom-color: rgba(var(--primary-rgb), 0.3);
    }
    .mobile-tech-detail-content li {
        color: var(--text);
    }
    .mobile-tech-detail-content li i.fa-solid.fa-dharmachakra {
        color: var(--primary);
    }

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


/* Old Typewriter styles removed */

/* Styles for .header-connect-wrapper, #contactCardTrigger, #contactCard RESTORED/VERIFIED */
.header-connect-wrapper {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    display: inline-block; /* Keeps it inline but allows for some block properties if needed */
    /* position: relative; Not strictly needed here anymore unless for specific layering */
    margin-top: 1.5rem; /* Add some space above the button */
}
/* Header connect wrapper inherits all styles from parent selector */

/* Contact Trigger Button - Aqua Glass Style Adaptation */
.contact-trigger-button {
    position: relative;
    overflow: hidden;
    z-index: 2;

    background: rgba(230, 230, 230, 0.6); /* Using a light grey base with more opacity */
    backdrop-filter: blur(8px) saturate(100%); /* Reduced blur for a slightly more solid look */
    -webkit-backdrop-filter: blur(8px) saturate(100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1); /* Slightly darker border for definition */
    box-shadow:
        0 5px 18px rgba(var(--text), 0.2), /* More noticeable shadow */
        inset 0 1px 0px rgba(255, 255, 255, 0.5),
        inset 0 -0.5px 1px rgba(0, 0, 0, 0.15);
        /* Removed the extra thin outer stroke for this iteration */

    color: var(--primary);
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); /* Adjusted shadow for darker icon */

    transition: all 0.25s cubic-bezier(0.33, 1, 0.68, 1);
    cursor: pointer;

    padding: 12px 22px;
    font-size: 1.1rem;

    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contact-trigger-button {
    background: rgba(var(--surface-rgb, 50, 50, 50), 0.6); /* Darker, less transparent base */
    backdrop-filter: blur(12px) saturate(120%); /* Adjusted blur for dark glass */
    border-color: rgba(224, 224, 224, 0.2); /* Lighter border for contrast */
    box-shadow:
        0 6px 20px rgba(0,0,0, 0.3), /* More pronounced shadow for dark theme */
        inset 0 1px 0px rgba(255, 255, 255, 0.12), /* Softer inset highlight */
        inset 0 -0.5px 1.5px rgba(0,0,0,0.3); /* Darker inset shadow */
    color: var(--primary); /* Brighter text/icon color for dark theme */
    text-shadow: 0 1px 1px rgba(0,0,0,0.3); /* Darker text shadow */
}

.contact-trigger-button::before {
    background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.03) 50%, transparent 65%);
    opacity: 0.25;
}

.contact-trigger-button::after {
    background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 60%, rgba(255,255,255,0) 100%);
    mix-blend-mode: screen; /* Screen can look good for light effects on dark */
    opacity: 0.4;
}

.contact-trigger-button:hover {
    background: rgba(var(--surface-rgb, 70, 70, 70), 0.7); /* Lighter dark surface on hover */
    border-color: rgba(224, 224, 224, 0.35);
    box-shadow:
        0 12px 30px rgba(0,0,0, 0.35), /* Enhanced shadow on hover */
        inset 0 1px 0px rgba(255, 255, 255, 0.15),
        inset 0 -0.5px 2px rgba(0,0,0,0.35);
    color: var(--accent); /* Use accent color for hover text/icon */
}

.contact-trigger-button:hover::before {
    opacity: 0.35; /* Slightly more prominent highlight on hover */
}

.contact-trigger-button:active {
    background: rgba(var(--surface-rgb, 40, 40, 40), 0.65); /* Darker active state */
    box-shadow:
        0 4px 15px rgba(0,0,0,0.35),
        inset 0 0.5px 1.5px rgba(0,0,0,0.4), /* Stronger inset shadow */
        inset 0 -0.5px 0px rgba(255,255,255,0.1);
}

.contact-trigger-button:focus,
.contact-trigger-button:focus-visible {
    box-shadow:
        0 6px 20px rgba(0,0,0, 0.3),
        inset 0 1px 0px rgba(255, 255, 255, 0.12),
        inset 0 -0.5px 1.5px rgba(0,0,0,0.3),
        /* Dark Focus rings */
        0 0 0 2px var(--bg), /* Inner ring using dark background color */
        0 0 0 4px var(--primary); /* Outer ring using dark primary color */
}

.contact-trigger-button[aria-expanded="true"] {
    background: transparent;
    color: rgba(var(--text-rgb, 224, 224, 224), 0.7);
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.25);
    border-color: rgba(224, 224, 224, 0.25);
    box-shadow:
        inset 0 0.5px 0px rgba(255,255,255,0.12),
        0 1px 3px rgba(0,0,0,0.1);
    backdrop-filter: blur(8px) saturate(110%); /* Slightly different blur when open */
}

.contact-trigger-button[aria-expanded="true"]::before,
.contact-trigger-button[aria-expanded="true"]::after {
    opacity: 0;
}

.contact-trigger-button[aria-expanded="true"]:hover {
    background: rgba(var(--surface-rgb, 50, 50, 50), 0.25);
    border-color: rgba(224, 224, 224, 0.4);
    color: rgba(var(--text-rgb, 224, 224, 224), 0.9);
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.3);
    box-shadow:
        inset 0 0.5px 0px rgba(255,255,255,0.15),
        0 1px 5px rgba(0,0,0,0.12);
}

.contact-trigger-button i {
    font-size: 1.1em;
    transition: transform 0.3s ease-in-out, color 0.3s ease;
    color: inherit;
}

.contact-trigger-button::before {
    content: '';
    position: absolute;
    top: -60%; left: -70%; width: 220%; height: 220%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 50%, transparent 65%);
    transform: rotate(25deg);
    opacity: 0.4;
    transition: all 0.45s ease; /* Keep opacity transition for ::before */
    pointer-events: none;
    z-index: 0;
}

.contact-trigger-button::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 45%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.15) 60%, rgba(255,255,255,0) 100%);
    border-radius: 20px 20px 0 0; /* Match parent's updated border-radius */
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.7;
    transition: opacity 0.3s ease-out; /* Keep opacity transition for ::after */
    z-index: 0;
}

.contact-trigger-button:hover {
    background: rgba(255, 255, 255, 0.30);
    transform: translateY(-2px) scale(1.01);
    border-color: rgba(255,255,255,0.6);
    box-shadow:
        0 10px 28px rgba(var(--text), 0.25),
        inset 0 1px 0px rgba(255, 255, 255, 0.6),
        inset 0 -0.5px 2px rgba(0, 0, 0, 0.1),
        0 0 0 0.5px rgba(255, 255, 255, 0.45);
    color: #fff;
}

.contact-trigger-button:hover::before {
    left: 5%;
    opacity: 0.6;
}

.contact-trigger-button:active {
    transform: translateY(0px) scale(1);
    background: rgba(255, 255, 255, 0.18);
    box-shadow:
        0 3px 10px rgba(var(--text), 0.2),
        inset 0 0.5px 1px rgba(0, 0, 0, 0.2),
        inset 0 -0.5px 0px rgba(255, 255, 255, 0.25);
}

.contact-trigger-button:focus,
.contact-trigger-button:focus-visible {
    outline: none;
    box-shadow:
        0 7px 22px rgba(var(--text), 0.2),
        inset 0 1px 0px rgba(255, 255, 255, 0.5),
        inset 0 -0.5px 2px rgba(0, 0, 0, 0.15),
        0 0 0 0.5px rgba(255, 255, 255, 0.35),
        0 0 0 2px rgba(var(--primary-rgb),0.4),
        0 0 0 4px rgba(var(--bg),0.6);
}

/* 'Open' state for the Connect button - when contact area is expanded */
.contact-trigger-button[aria-expanded="true"] {
    background: transparent; /* Fully transparent background */
    background-image: none; /* Remove gradients */
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.15); /* Softer shadow for ghosted text */
    border-color: rgba(255, 255, 255, 0.20); /* Very subtle border */
    box-shadow:
        /* Minimal inset for a hint of edge, or none */
        inset 0 0.5px 0px rgba(255,255,255,0.1),
        /* No real outer shadow, or a very faint one to avoid complete disappearance */
        0 1px 3px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px) saturate(100%); /* Less blur, no extra saturation */
}

.contact-trigger-button[aria-expanded="true"]::before,
.contact-trigger-button[aria-expanded="true"]::after {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.contact-trigger-button[aria-expanded="true"]:hover {
    background: rgba(255, 255, 255, 0.1); /* Slightly more visible background on hover */
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0.5px 1px rgba(0,0,0,0.2);
    box-shadow:
        inset 0 0.5px 0px rgba(255,255,255,0.2),
        0 1px 4px rgba(0,0,0,0.08);
    /* Pseudo-elements remain hidden (opacity: 0) by default in open state, no specific hover change for them here */
}

.contact-trigger-button[aria-expanded="true"] i {
    transform: rotate(180deg);
}


/* Reusable Liquid Glass Style for Interactive Elements */
.liquid-glass-interactive {
    position: relative; /* For overflow and potential pseudo-elements */
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.30); /* Slightly more subtle border */
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    /* Enhanced inset shadow for mini-bevel, and slightly more defined outer shadow */
    box-shadow:
        inset 0.5px 0.5px 1px rgba(255,255,255,0.4), /* Brighter, sharper top-left inset */
        inset -0.5px -0.5px 1px rgba(0,0,0,0.1), /* Subtle bottom-right inset for definition */
        0 3px 10px rgba(var(--text), 0.08); /* Slightly more pronounced outer shadow */
    background-image:
        /* Sheen - slightly stronger */
        linear-gradient(120deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0) 75%),
        /* Base Color fill */
        linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
    cursor: pointer;
}

.liquid-glass-interactive:hover {
    background-color: rgba(255, 255, 255, 0.22);
    color: var(--secondary);
    transform: translateY(-1px) scale(1.01);
    /* Keep hover shadow enhancement consistent with new default state */
    box-shadow:
        inset 0.5px 0.5px 1px rgba(255,255,255,0.5), /* Brighter inset on hover */
        inset -0.5px -0.5px 1px rgba(0,0,0,0.15),
        0 4px 15px rgba(var(--primary-rgb), 0.12); /* Slightly stronger outer shadow */
}

.liquid-glass-interactive:focus,
.liquid-glass-interactive:focus-visible {
    outline: none;
    /* Maintain base shadows and add focus rings */
    box-shadow:
        inset 0.5px 0.5px 1px rgba(255,255,255,0.4),
        inset -0.5px -0.5px 1px rgba(0,0,0,0.1),
        0 3px 10px rgba(var(--text), 0.08), /* Base outer shadow */
        0 0 0 2px rgba(var(--bg),0.8), /* Clearer inner focus ring */
        0 0 0 4px var(--primary);
}


/* Expanding Contact Area - Advanced Liquid Glass Style */
.expanding-contact-area {
    position: relative; /* For pseudo-elements */
    /* Base color - more transparent as pseudo-elements will add opacity/effects */
    background-color: rgba(255, 255, 255, 0.20);
    /* Noise texture will be primary BG layer now, sheen/surface effects via pseudo-elements */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
    backdrop-filter: blur(25px) saturate(180%); /* Stronger backdrop effect */
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 20px; /* Slightly larger radius for a softer feel */
    padding: 25px; /* Apply padding directly, don't animate it */
    margin: 25px auto 0;
    max-width: 700px; /* Reverted from 840px */
    /* Enhanced outer shadow for more pronounced 3D effect */
    box-shadow: 0 2px 5px rgba(var(--text), 0.08), /* Nearer, sharper shadow for edge definition */
                0 20px 60px rgba(var(--primary-rgb), 0.22); /* Softer, larger, more prominent ambient shadow */
    /* Main border is very subtle, edge definition primarily by ::before */
    border: 1px solid rgba(255, 255, 255, 0.05); /* Even more subtle border */
    overflow: hidden;

    /* Default Hidden State Properties */
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    /* padding-top: 0;  Padding is now static */
    /* padding-bottom: 0; */

    /* Transitions for smooth expand/collapse - Removed padding from transition */
    transition: max-height 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.5s ease-in-out 0.1s,
                visibility 0s linear 0.7s; /* Delay visibility change until fully collapsed */

    z-index: 5;
    /* position: relative; was already set for pseudo-elements, also good for z-index */
}

/* Upgraded section#connect to full Aqua Glass panel style */
section#connect {
    position: relative;
    overflow: hidden;
    z-index: 0;

    background: var(--glass-bg);
    /* background-image will still be the noise SVG, that's fine */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E");
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 20px; /* Consistent radius */
    border: 1px solid var(--glass-border); /* Aqua border */
    box-shadow:
        0 10px 35px var(--glass-shadow),
        inset 0 1px 0.5px rgba(255, 255, 255, 0.15),
        inset 0 -0.5px 3px rgba(0, 0, 0, 0.2),
        0 0 0 0.5px var(--glass-border);

    padding: 40px;
    margin-top: 40px;
    margin-bottom: 80px;
}

section#connect::before { /* Main highlight/sheen */
    content: '';
    position: absolute;
    top: -30%; left: -40%; width: 160%; height: 160%;
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.05) 50%,
        transparent 68%);
    transform: rotate(15deg);
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

section#connect::after { /* Top reflection */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 35%;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.03) 50%,
        rgba(255,255,255,0) 100%);
    border-radius: 20px 20px 0 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.5;
    z-index: -1;
}

section#connect h2,
section#connect p,
section#connect .social-links { /* Ensure social links container is also above pseudo-elements */
    position: relative;
    z-index: 1;
    color: var(--text);
    /* text-shadow: 0 0.5px 1px rgba(255,255,255,0.6); Added for other sections, consider if needed here */
    /* Color var(--dark) is from the broader rule, will be overridden below for h2 */
}

section#connect h2 {
    color: var(--secondary); /* Ensure consistent color */
    text-shadow: var(--text-shadow); /* Standardized text shadow */
}
section#connect p {
    /* position and z-index inherited from broader rule `section#connect h2, section#connect p, ...` */
    /* color var(--dark) also inherited */
    text-shadow: var(--text-shadow); /* Standardized */
}
section#connect h2 {
    color: var(--secondary);
    text-shadow: var(--text-shadow);
}
section#connect p {
    color: var(--text);
    text-shadow: var(--text-shadow);
}


.expanding-contact-area.expanded {
    max-height: 500px; /* Adjust as needed based on content height + padding */
    opacity: 1;
    visibility: visible;
    transition-delay: 0s; /* Reset all delays when expanding */
    /* padding-top: 25px; Padding is now static */
    /* padding-bottom: 25px; */
}

.expanding-contact-area > ul {
    position: relative;
    z-index: 3; /* Ensure ul content is above ::before and ::after */
    /* The ul might need some margin if the parent's padding was removed,
       but since parent padding:25px is static, this should be fine. */
}

/* Aqua Glass style for links in .expandingContactArea */
.expanding-contact-area ul li a {
    position: relative;
    overflow: hidden;
    z-index: 1; /* Content on the panel, above panel's ::before */

    background: rgba(255, 255, 255, 0.40); /* Slightly more opaque base for items on glass */
    backdrop-filter: blur(8px) saturate(150%); /* Slightly less blur */
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    border-radius: 12px; /* Consistent with accordion headers if they also become 14px later */
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 5px 18px rgba(0, 30, 100, 0.12), /* Softer shadow for items on glass */
        inset 0 0.5px 0 rgba(255, 255, 255, 0.6),
        inset 0 -0.5px 2px rgba(0, 0, 0, 0.08),
        0 0 0 0.5px rgba(255, 255, 255, 0.35);

    color: var(--primary); /* Keep primary blue text */
    font-weight: 500; /* Adjusted from 600 for less emphasis */
    text-shadow: 0 0.5px 0.5px rgba(255, 255, 255, 0.7); /* Lighter text shadow */

    transition: all 0.25s cubic-bezier(0.33, 1, 0.68, 1);
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 8px; /* Slightly reduced gap */
    padding: 8px 14px; /* Adjusted padding for smaller items */
    font-size: 0.85rem;
    text-decoration: none;
    width: 100%;
    justify-content: center;
}

.expanding-contact-area ul li a::before { /* Highlight for contact links */
    content: '';
    position: absolute;
    top: -55%; left: -70%; width: 220%; height: 220%;
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.1) 50%, transparent 68%);
    transform: rotate(20deg);
    opacity: 0.5;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.expanding-contact-area ul li a::after { /* Top reflection for contact links */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    border-radius: 12px 12px 0 0;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.9;
    z-index: 0;
}

.expanding-contact-area ul li a:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 8px 22px rgba(0, 40, 120, 0.18),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.7),
        inset 0 -0.5px 2px rgba(0, 0, 0, 0.05),
        0 0 0 0.5px rgba(255, 255, 255, 0.45);
    color: var(--secondary); /* Darker blue on hover */
}

.expanding-contact-area ul li a:hover::before {
    left: 15%; /* Adjusted movement for smaller items */
    opacity: 0.7;
}

.expanding-contact-area ul li a:active {
    transform: translateY(0px) scale(1);
    background: rgba(255, 255, 255, 0.30);
    box-shadow:
        0 2px 8px rgba(0, 30, 100, 0.15),
        inset 0 0.5px 1px rgba(0,0,0,0.1),
        inset 0 -0.5px 0px rgba(255,255,255,0.3);
}

.expanding-contact-area ul li a:focus,
.expanding-contact-area ul li a:focus-visible {
    outline: none;
    box-shadow: /* Base style shadow */
        0 5px 18px rgba(0, 30, 100, 0.12),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.6),
        inset 0 -0.5px 2px rgba(0, 0, 0, 0.08),
        0 0 0 0.5px rgba(255, 255, 255, 0.35),
        /* Focus rings */
        0 0 0 2px var(--bg),
        0 0 0 4px var(--primary);
}


.expanding-contact-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;

    /* This layer provides the main "surface" color and enhanced edge reflections */
    background: rgba(255, 255, 255, 0.08); /* Slightly more transparent base for this layer */

    /* Enhanced inset shadows for thicker, more defined bevel */
    box-shadow:
        /* Top-left highlight (brighter, slightly larger) */
        inset 1px 1px 2px rgba(255,255,255,0.5),
        /* Bottom-right shadow (darker, slightly larger for depth) */
        inset -1px -1px 3px rgba(0,0,0,0.15),
        /* Optional: A softer inner glow to make the edge feel thicker and more rounded */
        inset 0 0 15px rgba(255,255,255,0.05);

    /* Adding back a subtle sheen gradient directly on this surface layer */
    background-image: linear-gradient(145deg, rgba(255,255,255,0.12) 0%, transparent 55%);

    /* This pseudo-element has its own backdrop-filter if we want layered blur, but often not needed if parent has strong one.
       If used, it needs to be less blurry than the parent to appear as a clearer top surface.
       For now, let it inherit the parent's backdrop-filter effect through transparency. */
    /* backdrop-filter: blur(5px); */

    z-index: 1; /* Behind content (ul), above main background */
    pointer-events: none; /* Allow clicks to pass through to content */
}

/* Optional: ::after for another layer of glare or more complex reflection, if needed */
/*
.expanding-contact-area::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px; // Slightly inset
    border-radius: calc(var(--border-radius) - 2px); // Adjust to inner radius
    background: linear-gradient(160deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 50%);
    z-index: 2;
    pointer-events: none;
}
*/
/* The following properties were redundant and moved to the top of the .expanding-contact-area rule:
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.5s ease-in-out 0.1s,
                visibility 0s linear 0.7s,
                padding-top 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                padding-bottom 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    z-index: 5;
*/
}

.expanding-contact-area.expanded {
    max-height: 500px; /* Adjust as needed based on content height */
    opacity: 1;
    visibility: visible;
    transition-delay: 0s, 0s, 0s, 0s, 0s; /* Reset delays when expanding */
    padding-top: 25px;
    padding-bottom: 25px;
}

.expanding-contact-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    /* Mobile-first: column layout */
    flex-direction: column;
    align-items: center; /* Center items in column layout */
    gap: 12px; /* Space between contact items in column */
}

/* Desktop layout: row */
@media (min-width: 768px) {
    .expanding-contact-area ul {
        flex-direction: row;
        flex-wrap: wrap; /* Allow wrapping if too many items */
        justify-content: center; /* Center items in the row */
        gap: 15px; /* Adjust gap for row layout if needed */
    }
}

.expanding-contact-area ul li {
    width: 100%; /* Make li take full width in column, for align-items:center on ul */
    max-width: 300px; /* Max width for items in column, can be adjusted */
}

@media (min-width: 768px) {
    .expanding-contact-area ul li {
        width: auto; /* Reset width for row layout */
        max-width: none; /* Reset max-width */
    }
}


.expanding-contact-area ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.65); /* More opaque than main area, for distinct element feel */
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 12px; /* Slightly softer radius for link items */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease, color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5); /* Clearer border for items on glass */
    box-shadow: 0 2px 5px rgba(var(--text), 0.08); /* Slightly more defined shadow for items */
}

.expanding-contact-area ul li a:hover {
    background-color: rgba(255, 255, 255, 0.85); /* Even more opaque on hover */
    transform: translateY(-2px); /* Keep subtle lift */
    box-shadow: 0 4px 10px rgba(var(--primary-rgb),0.12);
    color: var(--secondary);
}

.expanding-contact-area ul li a i {
    font-size: 1.2rem;
    /* Color is inherited */
}

.expanding-contact-area ul li a span {
    white-space: nowrap;
}

/* Old contact card styles to be removed or ensured they don't conflict */

/* Ensuring the old #contactCard styles do not interfere, though HTML is removed */
.contact-card { display: none !important; }


@media (prefers-reduced-motion: reduce) {
  /* Old .typewriter-active reduced motion rules removed */
  /* The h1 rule here is also now covered by its main definition and .reveal for reduced motion */
}

.reveal {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important; /* Ensure scale(1) and translateY(0) for final state */
    filter: blur(0px) !important;
}


.experience-card {
    position: relative;
    overflow: hidden;
    z-index: 1; /* Base for pseudo-elements */

    background: rgba(255, 255, 255, 0.28); /* Slightly less transparent than buttons */
    backdrop-filter: blur(14px) saturate(170%);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    border-radius: 16px; /* Consistent with other larger glass panels */
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 28px rgba(0, 40, 120, 0.18), /* Main outer shadow */
        inset 0 1px 0.5px rgba(255, 255, 255, 0.65), /* Top inset highlight */
        inset 0 -0.5px 3px rgba(0, 0, 0, 0.1),  /* Bottom inset shadow */
        0 0 0 1px rgba(255, 255, 255, 0.35), /* Outer stroke highlight */
        0 0 20px rgba(9, 105, 218, 0.25);

    color: var(--text);
    text-shadow: 0 0.5px 0.5px rgba(255,255,255,0.7);

    padding: 25px;
    margin-bottom: 25px;
    margin-top: 2rem; /* Added margin-top for spacing */
    width: 90%;
    margin-left: auto;
    margin-right: auto;

    /* Keep existing transform transition, but re-evaluate hover box-shadow and border */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    /* Removed border-left-color from transition */
    /* border-left: 4px solid var(--primary); REMOVED */
}

.experience-card::before { /* Highlight effect */
    content: '';
    position: absolute;
    top: -40%; left: -50%; width: 180%; height: 180%;
    background: radial-gradient(circle at center,
        rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.15) 50%, transparent 65%);
    transform: rotate(15deg);
    opacity: 0.5;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.experience-card::after { /* Top reflection */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.8;
    z-index: 0;
}

.experience-card:hover {
    /* The 3D tilt is a strong effect. Let's see how it combines. */
    /* We might need to simplify other hover changes if it's too much. */
    transform: perspective(1000px) translateY(-10px) rotateX(4deg) rotateY(-3deg) scale(1.03);

    /* Aqua Glass inspired hover changes */
    background: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 12px 32px rgba(0, 50, 150, 0.28), /* Enhanced outer shadow */
        inset 0 1px 0.5px rgba(255, 255, 255, 0.75),
        inset 0 -0.5px 3px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.45);
    /* border-left-color: var(--accent); REMOVED */
}

.experience-card:hover::before {
    left: 10%; /* Move highlight */
    opacity: 0.7;
}

/* Active state for experience cards is probably not needed unless they are clickable */


.experience-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary);
    text-shadow: 0 0.5px 1px rgba(255,255,255,0.7); /* Standard light text shadow */
}

.experience-card .role { /* Style for the new role span */
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary); /* Or a different color if preferred */
    margin-bottom: 5px; /* Space between role and date */
    text-shadow: 0 0.5px 1px rgba(255,255,255,0.6);
}
.experience-card .role {
    color: var(--primary);
    text-shadow: var(--text-shadow);
}

.experience-card .date {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
    text-shadow: 0 0.5px 1px rgba(255,255,255,0.7); /* Standard light text shadow */
}
.experience-card .date {
    color: var(--secondary); /* Or a lighter shade like var(--dark-text) */
    text-shadow: var(--text-shadow);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px; /* Adjust as needed */
}

.experience-header h3 {
    margin-bottom: 0; /* Remove default margin from h3 if it's now in a flex container */
}

.location-icon {
    font-size: 0.9rem;
    color: var(--secondary); /* Default color for light theme */
    display: flex;
    align-items: center;
    gap: 5px; /* Space between icon and text */
}
.location-icon i,
.inline-flag-svg,
.inline-flag-png {
    font-size: 1.1em; /* Relative to parent's font-size (for consistency if text is next to it) */
    height: 1em; /* Control height, relative to parent font size */
    width: auto; /* Maintain aspect ratio */
    vertical-align: middle; /* Align with text */
    margin-right: 0.3em; /* Space after flag */
}

/* PNG flag styling inherits from base flag styles */

/* If multiple flags are in the same location-icon span, adjust margins */
.location-icon .inline-flag-png + .inline-flag-png {
    margin-left: 0.1em; /* Small space between adjacent flags */
}


.location-icon {
    color: var(--secondary); /* Color for dark theme */
}


.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.tech-item {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.6),
        inset 0 -2px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 25px 12px rgba(255, 255, 255, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 20px 8px rgba(122, 114, 240, 0.3),
        0 0 30px rgba(130, 80, 223, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: pulse 4s ease-in-out infinite;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    z-index: 2;
}

.tech-item::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 16px;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0.3) 40%,
        rgba(255, 255, 255, 0.1) 70%,
        transparent 100%
    );
    z-index: -1;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 3px 0 rgba(255, 255, 255, 0.8),
        inset 0 -3px 0 rgba(255, 255, 255, 0.25),
        inset 0 0 35px 18px rgba(255, 255, 255, 0.12),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 0.15),
        0 0 40px rgba(255, 255, 255, 0.1),
        0 0 30px 12px rgba(122, 114, 240, 0.5),
        0 0 60px 20px rgba(122, 114, 240, 0.2),
        0 0 50px rgba(130, 80, 223, 0.6);
    transform: translateY(-3px) scale(1.02);
}

.tech-item:hover::after {
    opacity: 1;
    background: radial-gradient(
        circle at 25% 25%,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.5) 30%,
        rgba(255, 255, 255, 0.2) 60%,
        transparent 100%
    );
}

.tech-item i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
}

.tech-item:hover i {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.social-link {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    box-shadow: 0 5px 15px var(--glass-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
}

.social-link:hover,
.social-link:focus {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.social-link i {
    font-size: 1.2rem;
    color: var(--text);
    transition: all 0.3s ease;
}

.social-link:hover i,
.social-link:focus i {
    color: var(--bg);
}

@keyframes profileRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

footer {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 35px 30px;
    margin-top: 50px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2); /* Darker shadow for light text on blue */
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1); /* Adjusted shadow for blue footer */
    background: rgba(var(--bg, 30,30,30), 0.7); /* Darker footer base */
    backdrop-filter: blur(15px) saturate(120%);
    -webkit-backdrop-filter: blur(15px) saturate(120%);
    color: var(--text); /* Light text for dark theme */
    text-shadow: var(--text-shadow);
    border-top-color: rgba(224,224,224,0.1); /* Lighter top border for dark theme */
    box-shadow:
        0 -8px 24px rgba(0,0,0,0.35),
        inset 0 1px 0px rgba(224,224,224,0.08),
        inset 0 -0.5px 2px rgba(0,0,0,0.4);
}

footer::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center,
        rgba(224,224,224,0.08) 0%,
        rgba(224,224,224,0.01) 50%,
        transparent 70%);
    opacity: 0.3;
    transform: rotate(15deg);
    pointer-events: none;
    z-index: -1;
}
footer::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    background: linear-gradient(to bottom,
        rgba(224,224,224,0.06) 0%,
        rgba(224,224,224,0.01) 50%,
        transparent 100%);
    pointer-events: none;
    mix-blend-mode: screen; /* Screen blend mode for light on dark effect */
    opacity: 0.4;
    z-index: -1;
}


footer p {
    margin-bottom: 0;
    position: relative; /* Ensure text is above pseudo-elements */
    z-index: 1; /* Ensure p is above footer's pseudo-elements */
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    opacity: 0.1;
    border-radius: 50%;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: -100px;
    right: -100px;
    animation: float 15s infinite ease-in-out;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--primary);
    bottom: -50px;
    left: -50px;
    animation: float 12s infinite ease-in-out reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: white;
    top: 40%;
    left: 30%;
    animation: float 10s infinite ease-in-out 2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .social-links {
        flex-wrap: wrap;
    }
}
