/* ============================================
   CSS VARIABLES (Custom Properties)
   These are reusable values used throughout the CSS.
   Change these to quickly update the entire color scheme.
   ============================================ */
:root {
    --bg-color: #050811;
    /* Main dark background color */
    --section-bg: rgba(13, 18, 33, 0.85);
    /* Semi-transparent section background */
    --primary-neon: #00d4ff;
    /* Primary accent color (cyan) */
    --secondary-neon: #4d7cff;
    /* Secondary accent color (blue) */
    --text-main: #f1f5f9;
    /* Main text color (bright white) */
    --text-body: #cbd5e1;
    /* Body text color (slightly dimmer) */
    --text-dim: #94a3b8;
    /* Dimmed text for less important content */
    --glass-bg: rgba(10, 15, 30, 0.75);
    /* Glassmorphism background */
    --card-shadow: 0 8px 32px rgba(0, 212, 255, 0.12);
    /* Shadow for cards/sections */
    --card-glow: 0 0 20px rgba(0, 212, 255, 0.15);
    /* Glow effect on hover */
    --neon-glow: 0 0 15px rgba(0, 212, 255, 0.4);
    /* Strong neon glow */
}

/* ============================================
   RESET & BASE STYLES
   Basic styles applied to the entire page
   ============================================ */

/* Apply border-box to all elements (padding included in width) */
* {
    box-sizing: border-box;
}

/* Enable smooth scrolling when clicking anchor links */
html {
    scroll-behavior: smooth;
}

/* Main body styling */
body {
    margin: 0;
    /* Remove default margins */
    padding-top: 70px;
    /* Space for fixed navbar */
    font-family: 'Inter', Arial, sans-serif;
    /* Modern font with fallbacks */
    background-color: var(--bg-color);
    /* Dark background */
    /* Subtle gradient orbs in background for depth */
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(77, 124, 255, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    /* Default text color */
    line-height: 1.6;
    /* Comfortable line spacing */
}

/* ============================================
   SECTIONS
   Container styling for each page section
   ============================================ */
section {
    background-color: var(--section-bg);
    /* Semi-transparent dark background */
    max-width: 900px;
    /* Maximum width for readability */
    margin: 40px auto;
    /* Center horizontally with spacing */
    padding: 30px;
    /* Inner spacing */
    border-radius: 20px;
    /* Rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
    backdrop-filter: blur(10px);
    /* Blur effect (glassmorphism) */
    box-shadow: var(--card-shadow);
    /* Subtle shadow */
}

/* ============================================
   HEADINGS
   Typography for h1, h2, h3 elements
   ============================================ */

/* Main title (your name) - gradient text effect */
h1 {
    font-size: 36px;
    /* Gradient background for text */
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    -webkit-background-clip: text;
    /* Clip gradient to text (Safari) */
    background-clip: text;
    /* Clip gradient to text (standard) */
    -webkit-text-fill-color: transparent;
    /* Make text transparent to show gradient */
    margin-bottom: 10px;
}

/* Section titles */
h2 {
    font-size: 26px;
    color: var(--primary-neon);
    /* Cyan color */
    margin-bottom: 16px;
    text-transform: uppercase;
    /* ALL CAPS */
    letter-spacing: 1px;
    /* Space between letters */
}

/* Card/subsection titles */
h3 {
    font-size: 19px;
    color: var(--text-main);
    /* White text */
    margin-top: 10px;
}

/* ============================================
   TEXT ELEMENTS
   Styling for paragraphs, lists, etc.
   ============================================ */

/* Paragraphs */
p {
    color: var(--text-body);
    /* Slightly dimmed white */
    line-height: 1.7;
    /* Extra line spacing for readability */
}

/* Unordered lists */
ul {
    padding-left: 20px;
    /* Indent list items */
}

/* List items */
li {
    color: var(--text-body);
    margin-bottom: 6px;
    /* Space between items */
}

/* ============================================
   LINKS
   Styling for all anchor (<a>) tags
   ============================================ */
a {
    color: var(--primary-neon);
    /* Cyan link color */
    text-decoration: none;
    /* No underline */
    transition: all 0.3s ease;
    /* Smooth hover animation */
}

a:hover {
    color: var(--secondary-neon);
    /* Change to blue on hover */
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    /* Glowing effect */
}

/* ============================================
   RESUME BUTTON
   Styled button for Download Resume link
   ============================================ */
.btn-resume {
    display: inline-block;
    /* Allow padding/margin */
    margin-top: 16px;
    padding: 12px 28px;
    /* Inner spacing */
    /* Gradient background (blue to cyan) */
    background: linear-gradient(135deg, var(--secondary-neon), var(--primary-neon));
    color: #fff !important;
    /* White text (override link color) */
    font-weight: 600;
    /* Semi-bold */
    font-size: 14px;
    letter-spacing: 0.5px;
    /* Slight letter spacing */
    border-radius: 8px;
    /* Rounded corners */
    text-transform: uppercase;
    /* ALL CAPS */
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.25);
    /* Subtle glow shadow */
    transition: all 0.3s ease;
}

.btn-resume:hover {
    transform: translateY(-3px);
    /* Lift up on hover */
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    /* Stronger glow */
    text-shadow: none;
    /* Remove text glow from link hover */
}

/* ============================================
   NAVIGATION BAR
   Fixed header with navigation links
   ============================================ */
.nav-bar {
    position: fixed;
    /* Stay at top when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    /* Full width */
    display: flex;
    /* Flexbox layout */
    justify-content: center;
    /* Center items horizontally */
    gap: 32px;
    /* Space between nav links */
    padding: 16px 0;
    background: var(--glass-bg);
    /* Semi-transparent background */
    backdrop-filter: blur(16px);
    /* Blur content behind (glassmorphism) */
    -webkit-backdrop-filter: blur(16px);
    /* Safari support */
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    /* Subtle cyan bottom border */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    /* Drop shadow */
    z-index: 1000;
    /* Above all other content */
}

/* Navigation links */
.nav-bar a {
    color: var(--text-main);
    /* White text */
    font-weight: 500;
    /* Medium weight */
    font-size: 15px;
    text-decoration: none;
    position: relative;
    /* For positioning the underline */
    padding: 6px 2px;
    transition: all 0.3s ease;
}

/* Nav link hover state */
.nav-bar a:hover {
    color: var(--primary-neon);
    /* Turn cyan on hover */
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
    /* Glowing effect */
}

/* Animated underline (hidden by default) */
.nav-bar a::after {
    content: "";
    /* Empty pseudo-element */
    position: absolute;
    left: 0;
    bottom: -4px;
    /* Position below text */
    width: 100%;
    height: 2px;
    /* Thin line */
    background: var(--primary-neon);
    /* Cyan color */
    box-shadow: 0 0 10px var(--primary-neon);
    /* Glowing effect */
    transform: scaleX(0);
    /* Hidden (scaled to 0 width) */
    transform-origin: left;
    /* Animate from left side */
    transition: transform 0.3s ease;
    /* Smooth animation */
}

/* Active nav link (current section) */
.nav-bar a.active {
    color: var(--primary-neon);
    /* Cyan text */
}

/* Show underline for active link */
.nav-bar a.active::after {
    transform: scaleX(1);
    /* Scale to full width */
}

/* ============================================
   CARDS SYSTEM
   Grid layout for Skills, Projects, Certifications
   ============================================ */

/* Cards container - responsive grid */
.cards {
    display: grid;
    /* Grid layout */
    /* Auto-fit columns: minimum 260px, expand to fill space */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    /* Space between cards */
    margin-top: 20px;
}

/* Individual card */
.card {
    background: rgba(255, 255, 255, 0.03);
    /* Very subtle light background */
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    /* Subtle border */
    /* Smooth animation with custom easing curve */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    /* For pseudo-element positioning */
}

/* Gradient border effect (hidden by default) */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Cover entire card */
    border-radius: 16px;
    padding: 1px;
    /* Gradient from transparent to cyan */
    background: linear-gradient(135deg, rgba(0, 212, 255, 0), rgba(0, 212, 255, 0.1));
    /* Mask trick to show only the border */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.4s ease;
    pointer-events: none;
    /* Allow clicks to pass through */
}

/* Card hover state */
.card:hover {
    transform: translateY(-8px) scale(1.01);
    /* Lift up and slightly enlarge */
    background: rgba(255, 255, 255, 0.05);
    /* Slightly brighter background */
    border-color: rgba(0, 212, 255, 0.25);
    /* Cyan border */
    box-shadow: var(--card-glow);
    /* Glowing shadow */
}

/* Show gradient border on hover */
.card:hover::before {
    opacity: 1;
}

/* Card titles */
.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-neon);
    /* Cyan color */
    font-size: 18px;
}

/* Card paragraphs */
.card p {
    font-size: 14px;
    margin-bottom: 8px;
}

/* ============================================
   CARD BUTTONS
   Buttons inside cards (View on GitHub, View Certificate)
   ============================================ */
.btn-card {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: transparent;
    /* No fill, just border */
    border: 1px solid var(--primary-neon);
    /* Cyan border */
    color: var(--primary-neon) !important;
    /* Cyan text */
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-card:hover {
    background: var(--primary-neon);
    /* Fill with cyan */
    color: #050811 !important;
    /* Dark text */
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
    /* Glowing effect */
    text-shadow: none;
    transform: translateY(-2px);
    /* Slight lift */
}

/* ============================================
   EXPERIENCE SECTION
   Styling for experience card elements
   ============================================ */

/* Duration label with subtle styling */
.experience-duration {
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Button group for certificate & LOR */
.experience-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

/* ============================================
   CONTACT FORM
   Form inputs and submit button
   ============================================ */
.contact-form {
    max-width: 500px;
    /* Limit form width */
    display: flex;
    flex-direction: column;
    /* Stack elements vertically */
    gap: 16px;
    /* Space between inputs */
    padding-bottom: 40px;
    /* Bottom padding */
}

/* Text inputs and textarea */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    padding-right: 42px;
    background: rgba(255, 255, 255, 0.05);
    /* Dark transparent background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border */
    border-radius: 10px;
    color: var(--text-main);
    /* White text */
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Focus state (when clicked/selected) */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    /* Remove default outline */
    border-color: var(--primary-neon);
    /* Cyan border */
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
    /* Subtle glow */
    background: rgba(255, 255, 255, 0.08);
    /* Slightly brighter */
}

/* Submit button */
.contact-form button {
    padding: 14px;
    /* Gradient background */
    background: linear-gradient(90deg, var(--secondary-neon), var(--primary-neon));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    /* Pointer cursor on hover */
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form button:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    /* Glowing effect */
    transform: scale(1.02);
    /* Slightly enlarge */
}

/* Flash message styles */
.flash-message {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.flash-message.error {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
}

/* ============================================
   INPUT GROUP
   Wrapper for input + icon
   ============================================ */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 16px;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.input-group input:focus~.input-icon,
.input-group textarea:focus~.input-icon {
    opacity: 1;
}

/* Character counter */
.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
    transition: color 0.3s ease;
}

/* Submit button inner elements */
.btn-text {
    display: inline;
}

.btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

/* Disabled submit button */
.contact-form button:disabled {
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   FOOTER
   Bottom section with social links
   ============================================ */
footer {
    display: flex;
    justify-content: center;
    /* Center icons */
    gap: 25px;
    /* Space between icons */
    padding: 40px 0;
    background: rgba(10, 15, 30, 0.8);
    /* Dark background */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle top border */
}

/* Social icons base styling */
footer img {
    width: 32px;
    transition: all 0.3s ease;
}

/* GitHub icon - originally black, needs to be inverted to white */
.icon-github {
    filter: invert(1);
    /* Invert colors (black → white) */
    opacity: 0.9;
}

.icon-github:hover {
    opacity: 1;
    transform: scale(1.1);
    /* Enlarge slightly */
    filter: invert(1) drop-shadow(0 0 10px var(--primary-neon));
    /* Add cyan glow */
}

/* LinkedIn icon - keep original blue color */
.icon-linkedin {
    opacity: 0.9;
}

.icon-linkedin:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px #0a66c2);
    /* Blue glow matching LinkedIn brand */
}

/* ============================================
   RESPONSIVE DESIGN
   Adjust styles for smaller screens
   ============================================ */
@media (max-width: 600px) {

    /* Smaller headings on mobile */
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    /* Smaller section margins/padding */
    section {
        margin: 20px;
        padding: 20px;
    }
}