/* Professional Black & White + Digitized Accent Theme */
:root {
    --primary-color: #00eaff; /* Neon blue accent */
    --secondary-color: #00ff99; /* Neon green accent */
    --accent-color: #00ffd0; /* Cyan accent */
    --bg-primary: #18181b; /* Pure black background */
    --bg-secondary: #23232a; /* Slightly lighter black */
    --bg-tertiary: #1a1a1a;
    --text-primary: #f9fafb; /* Pure white text */
    --text-secondary: #a1a1aa; /* Soft gray text */
    --text-accent: #00eaff; /* Neon blue accent for text */
    --glass-bg: rgba(36, 36, 44, 0.92);
    --glass-border: rgba(0, 234, 255, 0.18);
    --shadow-glow: 0 0 24px rgba(0, 234, 255, 0.12);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth fade for AOS animations on users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .floating-image,
    .animate-float,
    .animate-pulse,
    .hover-lift {
        animation: none !important;
        transform: none !important;
    }
}

/* Body and HTML */
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size for rem calculations */
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated Background Particles */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: radial-gradient(circle at 25% 25%, rgba(0, 234, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 255, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 255, 208, 0.05) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
}

/* Typography */
.gradient-text {
    background: none;
    color: var(--primary-color);
    font-weight: 700;
}

/* ENHANCED NAVIGATION STYLES */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.max-w-6xl {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Links */
.nav-link {
    color: var(--text-secondary);
    background: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(0, 234, 255, 0.08);
    transform: translateY(-2px);
}

/* Glass Effect */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glow);
    border-radius: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}

.glass-card:hover {
    box-shadow: 0 0 32px rgba(0, 234, 255, 0.18);
    transform: translateY(-2px);
}

/* ENHANCED BUTTON STYLES */
.glow-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 234, 255, 0.3);
    transition: all 0.3s ease;
    padding: 0.875rem 1.75rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.glow-button:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 6px 30px rgba(0, 234, 255, 0.4);
    transform: translateY(-3px);
}

.outline-button {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.outline-button:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 234, 255, 0.3);
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 3rem 0;
    border-radius: 1px;
}

/* ENHANCED TIMELINE STYLES */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-left {
    flex-direction: row;
}

.timeline-right {
    flex-direction: row-reverse;
}

.timeline-left > div:first-child {
    margin-right: 2rem;
    width: calc(50% - 2rem);
}

.timeline-right > div:first-child {
    margin-left: 2rem;
    width: calc(50% - 2rem);
}

.timeline-dot {
    width: 24px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    margin-left: 20px;
    margin-right: 20px;
    box-shadow: 0 0 12px rgba(0, 234, 255, 0.18);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.timeline-dot.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 18px rgba(0, 255, 208, 0.22);
    animation: pulse 2s infinite;
}

.timeline-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 0 25px rgba(0, 234, 255, 0.8);
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ENHANCED SKILLS SECTION */
.skill-item {
    margin-bottom: 1.5rem;
}

.skill-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(5px);
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    width: 0;
    transition: width 2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.skill-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: skillShimmer 2s infinite;
}

@keyframes skillShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ENHANCED TOOL BUTTONS */
.tool-button {
    background: linear-gradient(135deg, var(--glass-bg), rgba(18, 18, 56, 0.8));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    min-height: 100px;
}

.tool-button:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 234, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ENHANCED PROJECTS SECTION */
.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    backdrop-filter: blur(12px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-icon {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 234, 255, 0.1);
    border-radius: 1rem;
    width: fit-content;
    margin: 0 auto;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.tech-tag {
    background: rgba(0, 234, 255, 0.2);
    color: var(--text-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 234, 255, 0.3);
    white-space: nowrap;
}

.project-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 234, 255, 0.4);
}

.project-btn-outline {
    background: transparent;
    color: var(--text-accent);
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ENHANCED FORM STYLES */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-input {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1.5px solid var(--glass-border);
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: inherit;
    resize: vertical;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.2);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 234, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(0, 234, 255, 0.5);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* ENHANCED SOCIAL LINKS */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    color: var(--primary-color);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 234, 255, 0.4);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 234, 255, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 234, 255, 0.5);
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--text-accent);
    outline-offset: 2px;
}

/* Loading Animation */
.skill-bar-fill[data-width='90'] {
    width: 90%;
}
.skill-bar-fill[data-width='88'] {
    width: 88%;
}
.skill-bar-fill[data-width='85'] {
    width: 85%;
}
.skill-bar-fill[data-width='82'] {
    width: 82%;
}
.skill-bar-fill[data-width='80'] {
    width: 80%;
}
.skill-bar-fill[data-width='92'] {
    width: 92%;
}
.skill-bar-fill[data-width='75'] {
    width: 75%;
}

/* Additional Hover Effects */
.hover-lift {
    transition: all 0.3s ease;
}

.contact-form {
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 234, 255, 0.1), rgba(0, 255, 208, 0.1));
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.contact-form:hover::before {
    opacity: 1;
}

/* Footer Enhancements */
footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-top: 1px solid var(--glass-border);
    user-select: none;
}

/* Image styling for certificate previews */
#achievements img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* ========================================
   RESPONSIVE DESIGN BREAKPOINTS
======================================== */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .max-w-6xl {
        padding: 0 2rem;
    }

    .glow-button,
    .outline-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) {
    .max-w-6xl {
        padding: 0 1.5rem;
    }

    .timeline-left > div:first-child,
    .timeline-right > div:first-child {
        width: calc(50% - 1.5rem);
    }

    .timeline-left > div:first-child {
        margin-right: 1.5rem;
    }

    .timeline-right > div:first-child {
        margin-left: 1.5rem;
    }
}

/* Tablet screens (768px to 1023px) */
@media (max-width: 1023px) {
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tool-button {
        padding: 1.25rem 0.75rem;
        min-height: 90px;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .floating-image {
        animation: none;
    }

    .floating-image img {
        width: 280px;
        max-width: 100%;
    }
}

/* Small tablets and large phones (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* NAVIGATION RESPONSIVE */
    .nav-toggle {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        backdrop-filter: blur(12px);
        border: 1px solid var(--glass-border);
        border-top: none;
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    nav ul.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-link i {
        width: 20px;
    }

    /* HERO SECTION RESPONSIVE */
    .flex.md\\:flex-row {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .gradient-text {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }

    .floating-image img {
        width: 250px;
        max-width: 90%;
    }

    /* TIMELINE RESPONSIVE */
    .timeline-container {
        padding-left: 2rem;
        padding-right: 0;
    }

    .timeline-line {
        left: 1rem;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2.5rem;
    }

    .timeline-left,
    .timeline-right {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-left > div:first-child,
    .timeline-right > div:first-child {
        width: 100%;
        margin: 0 0 1rem 2rem;
    }

    .timeline-dot {
        position: absolute;
        left: -2rem;
        top: 1rem;
        margin: 0;
    }

    /* SKILLS SECTION RESPONSIVE */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* TOOLS SECTION RESPONSIVE */
    .grid.grid-cols-2.sm\\:grid-cols-3.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .tool-button {
        padding: 1rem 0.5rem;
        min-height: 80px;
        font-size: 0.75rem;
    }

    .tool-button i {
        font-size: 1.5rem;
    }

    .tool-button img {
        width: 24px;
        height: 24px;
    }

    /* PROJECTS SECTION RESPONSIVE */
    .project-card {
        padding: 1.5rem;
    }

    .project-icon {
        padding: 0.75rem;
    }

    .project-icon i {
        font-size: 2.5rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    /* ACHIEVEMENTS SECTION RESPONSIVE */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* FORM RESPONSIVE */
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* BUTTONS RESPONSIVE */
    .glow-button,
    .outline-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        gap: 0.25rem;
    }

    /* SPACING ADJUSTMENTS */
    .glass-card {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem;
    }

    .section-divider {
        margin: 2rem 0;
    }

    /* BACK TO TOP BUTTON */
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .max-w-6xl {
        padding: 0 1rem;
    }

    /* TYPOGRAPHY */
    .gradient-text {
        font-size: 2rem !important;
        line-height: 1.1;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* HERO SECTION */
    .floating-image img {
        width: 200px;
        max-width: 85%;
    }

    /* NAVIGATION */
    header .max-w-6xl {
        padding: 0.75rem 1rem;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* TOOLS GRID */
    .grid.grid-cols-2.sm\\:grid-cols-3.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .tool-button {
        padding: 0.75rem 0.5rem;
        min-height: 70px;
        font-size: 0.7rem;
    }

    .tool-button i {
        font-size: 1.25rem;
    }

    .tool-button img {
        width: 20px;
        height: 20px;
    }

    /* CARDS AND SPACING */
    .glass-card {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

    .project-card {
        padding: 1rem;
    }

    .project-icon {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .project-icon i {
        font-size: 2rem;
    }

    /* BUTTONS */
    .glow-button,
    .outline-button {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        gap: 0.25rem;
    }

    .project-btn,
    .project-btn-outline {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* SOCIAL LINKS */
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* FORM */
    .form-input {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    /* TIMELINE */
    .timeline-container {
        padding-left: 1.5rem;
    }

    .timeline-line {
        left: 0.75rem;
    }

    .timeline-dot {
        left: -1.5rem;
        width: 20px;
        height: 20px;
        border-width: 3px;
    }

    .timeline-left > div:first-child,
    .timeline-right > div:first-child {
        margin-left: 1.5rem;
    }

    /* SKILLS */
    .skill-bar {
        height: 8px;
    }

    .skill-item {
        margin-bottom: 1.25rem;
    }

    /* TECH TAGS */
    .tech-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
    }

    /* BACK TO TOP */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* SECTION SPACING */
    section {
        margin-bottom: 3rem !important;
    }

    .section-divider {
        margin: 1.5rem 0;
    }

    /* ACHIEVEMENTS CARDS */
    #achievements .glass-card {
        padding: 1rem;
    }

    #achievements h3 {
        font-size: 1rem;
        line-height: 1.3;
    }

    #achievements .fab.fa-linkedin {
        font-size: 1.5rem;
    }
}

/* Extra small phones (360px and below) */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .max-w-6xl {
        padding: 0 0.75rem;
    }

    .gradient-text {
        font-size: 1.75rem !important;
    }

    .floating-image img {
        width: 180px;
    }

    .glass-card {
        padding: 0.75rem !important;
    }

    .glow-button,
    .outline-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .tool-button {
        padding: 0.5rem 0.25rem;
        min-height: 60px;
        font-size: 0.65rem;
    }

    .nav-link {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .timeline-container {
        padding-left: 1rem;
    }

    .timeline-line {
        left: 0.5rem;
    }

    .timeline-dot {
        left: -1rem;
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

    .timeline-left > div:first-child,
    .timeline-right > div:first-child {
        margin-left: 1rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .skill-bar-fill::after {
        animation-duration: 1.5s;
    }

    .floating-image {
        animation-duration: 4s;
    }
}

/* Print styles */
@media print {
    .particles-bg,
    .back-to-top,
    header,
    footer {
        display: none !important;
    }

    .glass-card {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    .gradient-text {
        color: black !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .floating-image img {
        width: 200px;
    }

    .gradient-text {
        font-size: 2rem !important;
    }

    .glass-card {
        padding: 1rem !important;
    }

    .timeline-container {
        padding: 1rem 0;
    }
}

/* Custom container classes for better responsive control */
.container-fluid {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Utility classes for responsive design */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

@media (max-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .d-sm-none {
        display: none !important;
    }

    .d-sm-block {
        display: block !important;
    }
}

/* Text alignment utilities */
.text-center-mobile {
    text-align: left;
}

@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Spacing utilities for mobile */
@media (max-width: 768px) {
    .mb-mobile-2 {
        margin-bottom: 1rem !important;
    }

    .mb-mobile-3 {
        margin-bottom: 1.5rem !important;
    }

    .mt-mobile-2 {
        margin-top: 1rem !important;
    }

    .mt-mobile-3 {
        margin-top: 1.5rem !important;
    }
}

/* Final touch-ups for cross-browser compatibility */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

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

button,
input,
textarea,
select {
    font-family: inherit;
}

/* Ensure smooth scrolling works across browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
