/* Global Styles */
:root {
    /* New Professional Color Palette */
    --primary-heading: #4FD1FF;      /* Soft cyan for main headings */
    --secondary-heading: #38BDF8;    /* Muted blue for sub-headings */
    --body-text: #C9D1D9;            /* Light gray for paragraphs */
    --muted-text: #9CA3AF;           /* Softer gray for sub-text */
    --accent: #00C3FF;               /* Accent color for buttons and highlights */

    /* Map old variables to new ones for compatibility */
    --primary-color: var(--accent);
    --secondary-color: #6c757d;
    --accent-color: var(--accent);
    --text-color: var(--body-text);
    
    /* Retain structural and background variables */
    --dark-bg: #1a1a2e;
    --dark-bg-light: #2e3b55;
    --card-bg: #2a2a3e;
    --border-color: #444455;
    --hover-color: #0056b3;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --font-family-sans: 'Inter', sans-serif;
    --font-family-mono: 'Poppins', sans-serif;

    --color-card: 42, 42, 62; /* RGB for skills card */
    --translateZ: 100px;

    /* Section Backgrounds */
    --bg-gradient-a: radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.15) 0%, rgba(26, 26, 46, 0) 50%),
                     linear-gradient(180deg, #0b0c15 0%, #131325 50%, #0b0c15 100%);
    --bg-gradient-b: radial-gradient(circle at 50% 100%, rgba(120, 50, 255, 0.08) 0%, rgba(15, 16, 22, 0) 50%),
                     linear-gradient(180deg, #06060a 0%, #0d0e14 100%);
}

/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 85px; /* Offset for fixed header */
    font-size: 16px;
}

body.no-fouc {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 1;
    transition: opacity 0.5s ease;
}

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

a:hover {
    color: var(--hover-color);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1, .hero-name, h2, .section-title {
    color: var(--primary-heading);
}

h3, h4, h5, h6 {
    color: var(--secondary-heading);
}

h1:hover, h2:hover, .section-title:hover, .hero-name:hover {
  text-shadow: 0 0 8px rgba(79, 209, 255, 0.6); /* --primary-heading at 60% opacity */
}

p {
    margin-bottom: 1em;
    color: var(--body-text);
}

.section-subtitle,
.footer-tagline {
  color: var(--muted-text);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 25px; /* Reduced gap between heading and content */
    position: relative;
    padding-bottom: 0.5em;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-primary, .btn-secondary, .resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    height: auto;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #0b0f1a;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary, .resume-btn {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary:hover, .resume-btn:hover {
    background-color: var(--primary-color);
    color: #0b0f1a;
}

.ctf-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ctf-card img {
    height: 150px; /* Standardize height for all images in ctf-card */
    object-fit: contain; /* Ensure the entire image is visible */
    margin-bottom: 1rem; /* Existing margin */
}






.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: rgba(42, 42, 62, 0.6); /* Slightly transparent for glassmorphism */
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(68, 68, 85, 0.4); /* Subtle transparent border */
    backdrop-filter: blur(10px); /* Glassmorphism blur effect */
    overflow: hidden;
}

.card:hover {
    background-color: rgba(42, 42, 62, 0.8); /* Slightly less transparent on hover */
}

/* Tool Card Glassmorphism */
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #0000 /* Transparent base */
        radial-gradient(
          circle,
          rgba(46, 59, 85, 0.2) 0%, /* Lighter inside */
          rgba(46, 59, 85, 0.6) 80%, /* Darker outside */
          rgba(46, 59, 85, 0.9) 100%
        );
    border-radius: 8px;
    border: 1px solid rgba(68, 68, 85, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    width: 100px;
    text-align: center;
    backdrop-filter: blur(10px); /* Align with Core Skills blur */
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3); /* Enhanced shadow on hover */
    background-color: rgba(46, 59, 85, 0.8); /* Slightly less transparent on hover */
}

/* ==========================================
   NEW HEADER & NAVIGATION STYLES
   ========================================== */

header#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(15, 15, 25, 0.75); /* Dark semi-transparent */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(0, 212, 255, 0.1); /* Subtle bottom glow */
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-heading);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease; /* text-shadow removed */
}

.logo:hover {
    color: var(--accent); /* Apply accent color on hover */
    transform: translateY(-2px); /* Subtle lift */
    /* text-shadow removed */
}

/* Desktop Menu */
.nav-menu-desktop {
    display: flex;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    display: inline-block; /* Required for transform */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    text-shadow: none; /* Remove default glow */
    transform: translateY(-2px); /* Slight move up */
}

/* Underline Animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00d4ff;
    box-shadow: 0 0 8px #00d4ff;
    border-radius: 2px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu (Mobile) */
.hamburger-menu {
    display: flex; /* Changed from none */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 5001; /* Must be above the overlay (5000) */
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff; /* Set a visible color */
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Modal (Overlay + Box) */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 20, 0.85); /* Darker backdrop */
    backdrop-filter: blur(12px);
    z-index: 5000; /* Extremely high to be above everything */
    display: none; /* Hidden by default - critical fix */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* Allow scrolling through the overlay */
}

.mobile-menu-overlay.active {
    display: flex; /* Only show when active */
    opacity: 1;
}

.mobile-menu-box {
    background: rgba(15, 15, 25, 0.85); /* Darker, slightly more transparent */
    padding: 3rem 2rem; /* More vertical padding */
    border-radius: 30px; /* High-end rounded corners */
    
    /* Subtle gradient border effect using transparent border + box-shadow */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    
    /* Complex Shadow Stack for Depth & Glow */
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.7), /* Deep drop shadow */
        0 0 0 1px rgba(0, 212, 255, 0.1), /* Crisp cyan outline */
        0 0 30px rgba(0, 212, 255, 0.05), /* Soft outer blue glow */
        inset 0 0 20px rgba(0, 0, 0, 0.8); /* Inner depth */

    backdrop-filter: blur(25px); /* Stronger blur */
    -webkit-backdrop-filter: blur(25px);
    
    text-align: center;
    width: 85%;
    max-width: 320px;
    
    /* Initial State for Animation */
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: 
        opacity 0.4s ease,
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        
    pointer-events: auto;
}

.mobile-menu-overlay.active .mobile-menu-box {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.8rem; /* Increased spacing */
}

.mobile-nav-link {
    font-family: 'Poppins', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.3rem; /* Slightly larger */
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block; /* Changed to inline-block for centered underline */
    position: relative;
    padding-bottom: 4px;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #00d4ff;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    transform: scale(1.05); /* Subtle scale on active */
}

/* Centered Underline for Mobile */
.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #00d4ff;
    box-shadow: 0 0 8px #00d4ff;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after,
.mobile-nav-link.active::after {
    width: 70%; /* Underline covers 70% of the text width */
}

/* Media Queries */
@media (max-width: 768px) {
    .nav-menu-desktop {
        display: none;
    }

}

/* Hero Section */
.hero {
    min-height: auto;
    padding: 10rem 0 6rem 0; /* More top padding for fixed header offset */
    display: flex;
    align-items: center;
    text-align: center;
    background: var(--bg-gradient-a); /* Color A */
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* Soft separation */
    overflow: hidden; /* For particles or background animations if added */
}

/* Alternating Section Backgrounds */
section#about,
section#projects,
section#contact {
    background: var(--bg-gradient-b); /* Color B */
    position: relative;
    z-index: 5;
    box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.5); /* Inner depth */
}

section#skills,
section#certifications {
    background: var(--bg-gradient-a); /* Color A */
    position: relative;
    z-index: 5;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2); /* Top glow separation */
}

/* Light Bloom Effect */
section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

/* Ensure sections have spacing to show the separation */
section {
    padding: 6rem 0; /* Consistent spacing */
}

.about-section {
    padding: 70px 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-grid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

/* The wrapper acts as the main container for positioning and sizing */
.profile-photo-wrapper {
    width: 270px;
    height: 270px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    position: relative;
    flex-shrink: 0;
    
    /* Center the components inside it */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
}

/* This div creates the blurred, rotating gradient background (the "halo") */
.profile-photo-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    
    /* The specified continuous RGB gradient */
    background: conic-gradient(from 0deg, cyan, purple, red, green, cyan);
    
    /* A controlled blur creates the "neon halo" effect */
    filter: blur(10px);
    
    /* Animation for the rotating effect */
    animation: rotate 4s linear infinite;
    z-index: 1; /* Places the halo behind the photo */
    transition: all 0.4s ease;
}

/* The actual profile image, creating a sharp inner edge for the halo */
.profile-photo {
    position: relative; /* Positions it correctly within the flex container */
    z-index: 2; /* Sits on top of the gradient halo */

    /* Size the image to be slightly smaller than the halo, defining the ring's thickness */
    width: 90%;
    height: 90%;
    border-radius: 50%; /* Crops the photo to a perfect circle */
    object-fit: contain; /* Ensures the entire image is visible, no cropping */
    
    /* This background covers the center of the blur, creating a sharp ring effect */
    background-color: var(--dark-bg);
}

/* A simple 2D rotation for the halo */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

.hero-name {
    font-size: 3.8rem;
    margin-bottom: 0.5rem;
    
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.04em;
    
    /* Color is now handled by the generic h1, .hero-name rule */

    background: none;
    animation: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    
    /* Remove previous position/z-index properties as ::after is gone */
    position: static;
    z-index: auto;

    /* Removed default text-shadow. Hover effect is handled by generic h1:hover rule. */
}

.hero-title {
    font-size: 1.5rem;
    color: #c0c0c0; /* Reduced brightness */
    margin-bottom: 1rem;
    display: inline-block; /* Required for the cursor */
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}

.typing-wrapper {
    min-height: 40px;
    display: inline-block;
    text-align: left;
}

.hero-title::after {
    content: '|';
    display: inline-block;
    animation: blink 0.7s infinite;
    color: #00d4ff;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.hero-intro {
    max-width: 700px;
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
}

.social-uiverse {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-uiverse .parent {
    width: 50px;
    height: 50px;
    perspective: 1000px;
}

.social-uiverse .child {
    width: 100%;
    height: 100%;
    transition: all 0.5s;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(42, 42, 62, 0.6);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 0 0 2px #282828, 0 0 0 4px #1b1b1b;
}

.social-uiverse .child:hover {
    transform: translateZ(20px) rotateX(20deg);
    box-shadow: 0 0 0 2px #282828, 0 0 0 4px #1b1b1b, 0 0 40px -10px #00d4ff;
    color: #00d4ff;
}

.social-uiverse .child .tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.8);
    color: #00d4ff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.social-uiverse .child:hover .tooltip {
    opacity: 1;
    transform: translate(-50%, -5px);
}

.social-uiverse .child > i {
    transform: translateZ(20px);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}




/* About Section */
.about-section .two-column-layout {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 3rem;
    align-items: start;
    text-align: center; /* Default to center text */
}

.about-section .hero-summary-column {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    text-align: left; /* Align stats content to left */
    transition: all 0.3s ease; /* Smooth transition for the hover effect */
    overflow: hidden;
}

/* New rule for better paragraph readability */
.about-content p {
    max-width: 65ch; /* Optimal line length for readability */
    line-height: 1.7;
    margin-left: auto;  /* Center the text block if it's in a flex/grid container */
    margin-right: auto; /* that spans the full width. */
}

.about-text p {
    margin-bottom: 18px;
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.cyber-stats-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem; /* Reduced row gap, column gap */
    margin-top: 2rem;
    font-family: var(--font-family-mono);
}

.cyber-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cyber-stat-value {
    font-size: 2rem; /* Reduced size */
    font-weight: bold;
}

.cyber-stat-text {
    font-size: 0.8rem; /* Reduced size */
    color: var(--heading-color); /* Pure white for better visibility */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-neon-blue,
.cyber-neon-green,
.cyber-neon-gold,
.cyber-neon-purple { 
    color: #00E5FF; /* Solid bright cyan for high contrast */
    text-shadow: none; /* Ensure no glow effect */
}
.cyber-stat-separator {
    color: var(--border-color);
    font-size: 2rem;
    align-self: center; /* Vertically align separator */
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column */
    gap: 3rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.projects-section .skill-category {
    background-color: #16162a; /* Darker background for section boxes */
}

.skill-category h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-list li {
    background-color: var(--dark-bg-light);
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    font-size: 1rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.skill-list li:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}



.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--dark-bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100px; /* Fixed width for better grid alignment */
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

.tool-card img {
    width: 50px;
    height: 50px;
}

.tool-card p {
    font-size: 0.8rem;
    color: var(--text-color);
    margin-bottom: 0;
}

/* Projects Section */
.projects-section .card h3 {
    color: #00BFFF; /* Match the color of the name in the home section */
}
.projects-section .card p {
    flex-grow: 1; /* Allows paragraph to take available space */
    margin-bottom: 1rem; /* Space before button */
}

.ctf-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    align-items: stretch;
}





/* Certifications Section */
.certifications-section .card {
    text-align: center;
    padding: 2rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.certifications-section .card-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem; /* Halved spacing (1.2rem * 0.5) */
}

.certifications-section .cert-logo {
    max-height: 90px;
    object-fit: contain;
    margin-bottom: 15px;
}

.certifications-section .card h3 {
    color: var(--primary-color);
    font-size: 22px; /* 20-22px range */
    font-weight: 700; /* semi-bold to bold */
    letter-spacing: 0.8px; /* 0.5-1px range */
    margin-bottom: 0.1rem; /* Halved spacing (0.2rem * 0.5) */
}

.certifications-section .cert-full-name {
    font-size: 14px; /* 13-14px range */
    color: #a0a0a0;
    opacity: 0.8; /* 70-80% opacity */
    font-weight: 400;
    margin-bottom: 1rem;
    flex-grow: 1; /* Pushes button to bottom */
}



#bug-bounty {
    text-align: center;
}

/* Contact Section */
.contact-grid {
    display: flex;
    gap: 2rem;
    align-items: stretch;
}

.contact-details-card,
.contact-form-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    flex: 1; /* Allow cards to grow equally */
    display: flex; /* Make cards flex containers */
    flex-direction: column; /* Stack content vertically */
}

.contact-details-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.contact-details-card ul {
    list-style: none;
    padding: 0;
}

.contact-details-card p {
    margin-bottom: 15px;
}

.contact-details-card li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-details-card li i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.contact-details-card .social-uiverse {
    justify-content: center; /* Center the icons */
    margin-top: auto;        /* Push the block to the bottom */
    padding-top: 20px;      /* Add padding above icons */
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-button-wrapper {
    display: flex;
    justify-content: center;
}

.contact-section form input,
.contact-section form textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: var(--font-family-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-section form input:focus,
.contact-section form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}

.contact-form-card {
    justify-content: space-between;
}




/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--text-color);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}


/* Footer Bug Fix */
#tool-enlarge-overlay {
    display: none !important;
}

/* Responsive Design */
@media (min-width: 768px) {
    .hamburger-menu {
        display: none; /* Hide on desktop */
    }
    .navbar {
        padding: 0 3rem;
    }
    .hero-grid-container {
        display: flex;
        flex-direction: row; /* Two columns on larger screens */
        align-items: center; /* Vertically center the two main columns */
        justify-content: center; /* Center the whole block horizontally */
        gap: 4rem;
        text-align: left;
    }

    .left-column {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Left align photo and social icons within this column */
        gap: 1.5rem; /* Space between photo and social icons */
    }

    .profile-photo-wrapper {
        margin-right: 0;
        margin-bottom: 0;
        width: 270px; /* Increased size */
        height: 270px; /* Increased size */
    }

    .social-uiverse {
        justify-content: flex-start; /* Left align icons within their container */
        margin-top: 0; /* Space already handled by left-column gap */
        width: auto; /* Allow width to be determined by content */
    }

    .hero-identity-column {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        flex-grow: 1; /* Allow it to take available space */
    }

    .typing-wrapper {
        width: 650px;
    }

    .hero-title {
        white-space: nowrap;
    }

    .hero-name {
        font-size: 5rem; /* Increased size */
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .about-section .two-column-layout {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .about-section .hero-summary-column {
        width: 350px;
        flex-shrink: 0;
    }

    .cyber-stats-line {
        justify-content: flex-start;
        flex-direction: column; /* Stack stats vertically */
        gap: 1.5rem;
    }
    .cyber-stat {
        flex-direction: row; /* Stats in a row with label */
        align-items: center;
        gap: 1rem;
        justify-content: flex-start;
    }
    .cyber-stat-value {
        min-width: 80px; /* Adjusted for smaller font size */
        text-align: left;  /* Align numbers to the left */
    }
    .cyber-stat-separator {
        display: none; /* Hide separator on larger screens */
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr; /* Two columns for skills categories */
    }


}

@media (max-width: 1024px) {
    /* Adjust hero section for smaller screens */
    .hero-name {
        font-size: 2.8rem;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-intro {
        font-size: 1rem;
    }

    .cyber-stat-value {
        font-size: 2rem;
    }

    .projects-grid-container {
        grid-template-columns: 1fr;
    }
}



/* Styles for Core Skills Uiverse Carousel */
#core-skills-carousel-container {
    height: 350px;
    position: relative;
}

#core-skills-carousel-container .wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
    overflow: hidden;
    /* Apply perspective to the parent container */
    perspective: 1000px; 
}

#core-skills-carousel-container .inner {
    --w: 95px;
    --h: 125px;
    --translateZ: calc((var(--w) + var(--h)) + 0px);
    --rotateX: -15deg;
    position: absolute;
    width: var(--w);
    height: var(--h);
    top: 35%;
    left: calc(50% - (var(--w) / 2) - 2.5px);
    z-index: 2;
    transform-style: preserve-3d;
    /* Remove perspective from here and apply rotation directly */
    animation: rotating 20s linear infinite;
}

@keyframes rotating {
  from {
    transform: rotateX(var(--rotateX)) rotateY(0);
  }
  to {
    transform: rotateX(var(--rotateX)) rotateY(1turn);
  }
}

@keyframes rotating-reverse {
  from {
    transform: rotateX(var(--rotateX)) rotateY(0);
  }
  to {
    transform: rotateX(var(--rotateX)) rotateY(-1turn);
  }
}

#core-skills-carousel-container .card {
  position: absolute;
  border-radius: 12px;
  inset: 0;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
    translateZ(var(--translateZ));
  
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: bold;
  padding: 0 5px;
  font-size: 11px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(145deg, #121a2f, #1b2340);
  border: 1px solid rgba(0, 140, 255, 0.25);
  box-shadow: 0 0 12px rgba(0, 153, 255, 0.25);
}

#core-skills-carousel-container .img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#core-skills-carousel-container .label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #00aaff;
  background: transparent;
  backdrop-filter: blur(6px);
  border-radius: 10px;
  transform: translateZ(40px);
  pointer-events: none;
}

#core-skills-carousel-container .card:hover {
  border-color: rgba(0, 191, 255, 1);
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.7);
}

/* Styles for Tools Uiverse Carousel */
#tools-container {
    height: 350px;
    position: relative;
}

#tools-container .wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  text-align: center;
  overflow: hidden;
  /* Apply perspective to the parent container */
  perspective: 1000px;
}

#tools-container .inner {
  --w: 100px;
  --h: 130px;
  --translateZ: calc((var(--w) + var(--h)) + 0px);
  --rotateX: -15deg;
  position: absolute;
  width: var(--w);
  height: var(--h);
  top: 35%;
  left: calc(50% - (var(--w) / 2) - 2.5px);
  z-index: 2;
  transform-style: preserve-3d;
  /* Remove perspective from here and apply rotation directly */
  animation: rotating-reverse 20s linear infinite;
}

#tools-container .tool-card {
  position: absolute;
  border-radius: 8px;
  inset: 0;
  transform: rotateY(calc((360deg / var(--quantity)) * var(--index)))
    translateZ(var(--translateZ));
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  padding: 0.5rem;
  background: linear-gradient(145deg, #121a2f, #1b2340);
  border: 1px solid rgba(0, 140, 255, 0.25);
  backdrop-filter: blur(10px);
  width: 100%;
  height: 100%;
  box-shadow: 0 0 12px rgba(0, 153, 255, 0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

#tools-container .tool-card:hover {
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.7);
  border-color: rgba(0, 191, 255, 1);
  background-color: rgba(46, 59, 85, 0.8);
}



#tools-container .tool-card img {
    width: 50px; /* Existing large size */
    height: 50px;
    object-fit: contain; /* Ensure image fits */
}

#tools-container .tool-card p {
    font-size: 0.8rem; /* Existing small size */
    text-align: center;
    color: #b9e6ff;
    margin-bottom: 0;
}
/* Customizations for Projects Section Card Size */
.projects-section .grid-layout {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem; /* Also reduce the gap slightly */
}

.projects-section .card {
    padding: 1.2rem;
    justify-content: flex-start; /* Align content to the top */
    position: relative; /* Ensure card is a positioning context for the icon */
    background-color: rgba(42, 42, 62, 0.6); /* Lighter background for inner cards */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 123, 255, 0.2); /* Increased shadow for elevation and soft glow */
    transition: all 0.3s ease; /* Add transition for smooth hover effect */
    margin-bottom: 18px;
}

.projects-section .card h3 {
    font-size: 1.1rem; /* Reduced from default */
}

.projects-section .card p {
    font-size: 0.9rem; /* Reduced from default */
    margin-bottom: 0; /* Remove bottom margin as card is clickable */
}

.project-card-icon {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    font-size: 1.5rem;
    color: rgba(0, 140, 255, 0.4);
    opacity: 0.5;
}
/* Customizations for Projects Section Layout */
.projects-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: start;
}

.projects-left-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.group-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

#bug-bounty .grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
    justify-content: center;
}

@media (max-width: 768px) {
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }

    section {
        padding: 4rem 0;
    }

    .hero-grid-container {
        flex-direction: column;
        gap: 2rem;
    }

    .about-section .two-column-layout,
    .skills-grid,
    .projects-grid-container {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        flex-direction: column;
    }
    
    /* --- About Me Stats Alignment --- */
    .cyber-stats-line {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .cyber-stat-separator {
        display: none;
    }

    .contact-details-card,
    .contact-form-card {
        padding: 1.5rem;
    }

    .contact-details-card .social-uiverse {
        gap: 1rem; /* Increase gap for better spacing */
        margin-top: 2rem; /* Add some space on mobile too */
    }

    .contact-details-card .social-uiverse .parent {
        width: 40px; /* Reduce icon size */
        height: 40px; /* Reduce icon size */
    }

    /* --- Contact Form Spacing --- */
    .contact-section form {
        gap: 1.5rem; /* Increased gap */
    }

    .ctf-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .ctf-card {
        padding: 18px;
    }

    .ctf-card img {
        margin-bottom: 10px;
    }

    .ctf-card h3 {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .ctf-card .btn-secondary { /* Targeted for precision */
        margin-top: 8px;
    }

    .hero-identity-column {
        align-items: center;
    }

    .typing-wrapper {
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 50px;
    }
}

/* Blog Section */
.blog-section {
    padding: 100px 0;
    text-align: center;
}

.blog-section .btn {
    display: inline-block;
    margin-top: 30px;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto 40px;
    color: #9ca3af;
    font-size: 15px;
}

.blog-preview {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 15px;
    color: #d1d5db;
    line-height: 1.7;
}

/* ================================= 
      Minimal Footer Styles
==================================== */
.site-footer {
    background-color: var(--dark-bg);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    text-align: center;
}

.site-footer .container.footer-bottom-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Removed gap as margin will be used on individual elements */
}

.footer-copyright {
    margin: 0;
    font-size: 0.9rem;
    color: #9fb3c8;
    line-height: 1.5;
}

.footer-tagline {
    margin: 0;
    margin-top: 0.5rem; /* Add spacing above tagline */
    font-size: 0.85rem;
    color: #00e0ff;
    opacity: 0.85;
    line-height: 1.5;
}

/* ================================= 
      Contact Form Button UX
==================================== */
.btn-primary .spinner {
    display: none;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    width: 20px;
    height: 20px;
    animation: spin 1s ease-in-out infinite;
}

.btn-primary.is-loading .spinner {
    display: block;
}

.btn-primary.is-loading .btn-text {
    display: none;
}

.btn-primary.is-success {
    background-color: var(--accent-color);
    background: var(--accent-color); /* Override linear-gradient */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
  .ctf-card .btn-secondary {
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
    display: inline-block;
    width: auto;
  }

  
}
.ctf-card .btn-wrapper {
margin-top: auto;
display: flex;
justify-content: center;
}

@media (max-width: 992px) {
    #bug-bounty .grid-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #bug-bounty .grid-layout {
        grid-template-columns: 1fr;
    }
}

/* Universal Card Hover Effect */
.card:hover,
.contact-details-card:hover,
.contact-form-card:hover,
.about-section .hero-summary-column:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.4);
}

/* Responsive Button Styles */
@media (max-width: 768px) {
  .btn-primary, .btn-secondary, .resume-btn {
    font-size: 14px;
    gap: 8px;
  }

  .ctf-card .btn-secondary {
    height: 36px; /* Smaller fixed height for this specific context */
    font-size: 12px;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
  }

  .ctf-card .btn-wrapper {
    margin-top: 8px; /* Override margin-top: auto to reduce space */
  }
}

/* New CSS for .cyber-send-btn */
.cyber-send-btn {
  position: relative;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 40px;
  background: rgba(10, 15, 25, 0.9);
  border: 2px solid #00e0ff;
  color: #00e0ff;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,224,255,0.3);
  width: auto;
  display: inline-flex;
  align-self: center;
}

.cyber-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0,224,255,0.6);
}

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

.cyber-send-btn .btn-loader {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top: 2px solid #00e0ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-photo-wrapper:hover {
  transform: scale(1.08);
}
