:root {
    --bg-color: #02132b;
    --nav-color: #02132bf0;
    --text-color: #8892b0;
    --heading-color: #ccd6f6;
    --highlight-color: #e3e7f7;
    --glow-color: #35b2ff;
    --cursor-glow-color: #09265e3d;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Account for fixed nav */
}

body {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

  
#about p:last-of-type {
    margin-bottom: 160px;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: auto;
    padding: 0 20px;
}

header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 2%; /* Adds space between text and image */
}

.header-socials {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
}

.header-socials a {
    color: var(--text-color);
    font-size: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.header-socials a:hover {
    color: var(--highlight-color);
    transform: translateY(-3px);
}

.text-content {
    max-width: 55%; /* Slightly reduced to move content to the right */
}

h1, h2, h3 {
    font-family: 'Montserrat', 'Calibre', 'San Francisco', 'SF Pro Text', -apple-system, system-ui, sans-serif;
    color: var(--heading-color);
    font-weight: 700;
}



h1 {
    font-size: 5rem;
    margin-bottom: 0rem;
    animation: glow 4s infinite;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    animation: glow 4s infinite;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    padding: 15px 0;
    background: none;
    
}

.nav-background-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Optimized for desktop */
    background-color: var(--nav-color); /* semi-transparent */
    z-index: 10; /* bottom of nav stack */
    backdrop-filter: blur(100px); /* optional for frosted look */
  }

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: lowercase;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--highlight-color);
}

nav ul li a.active {
    color: var(--highlight-color); /* Highlight color for active link */
    font-weight: bold; /* Optional: Make the active link bold */
}

.profile-picture {
    border: 5px solid #dfdfdf;
    width: 375px;
    height: 515px;
    margin-left: 120px;
    overflow: hidden;
    position: relative;
}

#about,
#experience,
#projects, #contact {
    position: relative;
}

.profile-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.3s;
}

.profile-img.active {
    opacity: 1;
}

.profile-picture:hover .profile-img.active {
    transform: scale(1.05);
}

.profile-picture::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--heading-color);
    z-index: -1;
    transition: 0.3s;
}

.profile-picture:hover::before {
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
}

.profile-picture .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.section {
    opacity: 0;
    padding: 100px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

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



.project-item {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-item:hover {
    transform: translateY(-5px);
}

.project-item h3 {
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
}

.project-item p {
    margin-bottom: 1rem;
}

.skill-tags {
    margin-bottom: 10px;
}

.skill-tag {
    display: inline-block;
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--highlight-color);
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.project-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--highlight-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--text-color);
}

.project-link i {
    margin-right: 5px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--nav-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-to-top {
    display: inline-block;
    margin-top: 10px;
    color: var(--highlight-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-top:hover {
    color: var(--text-color);
}


#cursor-glow {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 1200px;
    height: 1200px;
    border-radius: 50%;
    z-index: 15;

  
    /* Subtle blue glow that fades out toward the edges */
    background: radial-gradient(
      circle at center,
      rgba(0, 55, 255, 0.12) 0%,  /* a gentle blue with ~15% alpha */
      rgba(53, 178, 255, 0) 70%     /* fully transparent by ~70% */
    );
  
    /* 'screen' blend mode to layer softly atop the dark background */
    mix-blend-mode: screen;
    
    /* Smooth transitions for movement/opacity */
    transition: transform 0.15s ease-out, opacity 0.3s ease;
    transform: translate(-50%, -50%);
    opacity: 0.6; /* Base opacity – can raise or lower if you want more/less glow */
  }

.project-meta {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--text-color);
}

.team-size, .project-timeline {
    display: flex;
    align-items: center;
}

.team-size i, .project-timeline i {
    margin-right: 5px;
}

.job-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.job-attribute {
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    color: var(--text-color);
}

.job-attribute i {
    margin-right: 8px;
    color: var(--highlight-color);
}

.company-name {
    font-weight: bold;
    font-size: 1em;
    color: var(--heading-color);
}

.job-mode {
    background-color: rgba(100, 255, 218, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.experience-item {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.experience-item:hover {
    transform: translateY(-5px);
}

.experience-item h3 {
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
}

.experience-item p {
    margin-bottom: 1rem;
}

.experience-item ul {
    list-style-type: none;
}

.experience-item ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 20px;
}

.experience-item ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--highlight-color);
}

/* Removed unused styles - resume-button */

/* Floating Panel - Complete Structure */
.floating-panel {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.panel-content {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: rgba(2, 19, 43, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 18px;
    min-width: 190px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(136, 146, 176, 0.2);
}

.floating-panel:hover .panel-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.panel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.panel-item:hover {
    background-color: rgba(136, 146, 176, 0.15);
    color: var(--highlight-color);
    transform: translateX(3px);
}

.panel-item i {
    font-size: 16px;
    width: 18px;
}

.panel-item.resume-item:hover {
    color: #ff6b6b;
}

.panel-resume-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
}

.panel-resume-note {
    font-size: 0.7rem;
    color: rgba(136, 146, 176, 0.6);
    font-style: italic;
    margin: 4px 0 0 0;
    text-align: center;
}

/* Contact Section Redesign */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header {
    text-align: left;
    margin-bottom: 50px;
}

.contact-header h2 {
    text-align: left;
    margin-bottom: 20px;
}

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-top: 10px;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

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

.contact-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(136, 146, 176, 0.2);
}

.contact-card-icon {
    width: 45px;
    height: 45px;
    background: rgba(136, 146, 176, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.contact-card-icon i {
    font-size: 18px;
    color: var(--highlight-color);
}

.contact-card h3 {
    color: var(--highlight-color);
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.contact-card p {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.contact-availability {
    font-size: 0.85rem;
    color: var(--text-color) !important;
    font-style: italic;
    opacity: 0.8;
}

.contact-link {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(136, 146, 176, 0.1);
    color: var(--highlight-color);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(136, 146, 176, 0.2);
    font-size: 0.9rem;
}

.contact-link:hover {
    background: rgba(136, 146, 176, 0.2);
    color: var(--heading-color);
    transform: translateY(-1px);
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.03);
    padding: 35px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--highlight-color);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--highlight-color);
    outline: none;
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 2px rgba(136, 146, 176, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(136, 146, 176, 0.6);
}

.contact-submit-btn {
    width: 100%;
    padding: 14px;
    background: rgba(136, 146, 176, 0.15);
    color: var(--highlight-color);
    border: 1px solid rgba(136, 146, 176, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-submit-btn:hover {
    background: rgba(136, 146, 176, 0.25);
    color: var(--heading-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-submit-btn i {
    transition: transform 0.3s ease;
}

.contact-submit-btn:hover i {
    transform: translateX(3px);
}

/* Floating Panel - Toned Down */
.panel-toggle {
    width: 55px;
    height: 55px;
    background: rgba(136, 146, 176, 0.2);
    border: 1px solid rgba(136, 146, 176, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.panel-toggle:hover {
    transform: scale(1.05);
    background: rgba(136, 146, 176, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.panel-toggle i {
    color: var(--highlight-color);
    font-size: 18px;
    transition: transform 0.3s ease;
}

.floating-panel:hover .panel-toggle i {
    transform: rotate(45deg);
}

/* About Me Section Improvements */
#about {
    padding: 80px 0;
}

#about p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 25px;
    color: var(--text-color);
}

#about p:last-of-type {
    margin-bottom: 0;
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    /* Hide floating panel on mobile */
    .floating-panel {
        display: none;
    }
    
    /* Mobile Navigation Improvements */
    nav {
        padding: 10px 0;
    }
    
    nav ul {
        justify-content: center;
        padding: 0 5px;
        gap: 3px;
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100vw;
    }
    
    nav ul li {
        margin: 0 2px;
        flex: 0 0 auto;
    }
    
    nav ul li a {
        font-size: 0.82rem; /* Slightly larger for better readability */
        padding: 8px 8px;
        border-radius: 6px;
        display: block;
        transition: all 0.3s ease;
        min-width: 65px; /* Adequate touch target */
        text-align: center;
        white-space: nowrap;
    }
    
    nav ul li a:hover,
    nav ul li a:active {
        background: rgba(136, 146, 176, 0.15);
        color: var(--highlight-color);
    }
    
    .nav-background-box {
        height: 65px; /* Slightly increased for better mobile coverage */
    }
    
    /* Contact section mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-form-wrapper {
        padding: 20px;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    /* About section mobile */
    #about p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 20px;
    }
    
    /* Better mobile typography */
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Mobile-only footer social section */
.mobile-footer-actions {
    display: none;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px 20px;
    margin-top: 40px;
}

.mobile-footer-actions h3 {
    color: var(--highlight-color);
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
}

.mobile-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 25px;
}

.mobile-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    text-align: center;
}

.mobile-action-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--highlight-color);
    border-color: rgba(136, 146, 176, 0.2);
    transform: translateY(-2px);
}

.mobile-action-item i {
    font-size: 22px;
    color: var(--highlight-color);
}

.mobile-action-item span {
    font-size: 0.85rem;
    font-weight: 500;
}

.mobile-resume-section {
    text-align: center;
}

.mobile-resume-btn {
    width: 100%;
    padding: 15px;
    background: rgba(136, 146, 176, 0.15);
    color: var(--highlight-color);
    border: 1px solid rgba(136, 146, 176, 0.3);
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.mobile-resume-btn:hover {
    background: rgba(136, 146, 176, 0.25);
    color: var(--heading-color);
    transform: translateY(-1px);
}

.resume-note {
    font-size: 0.75rem;
    color: rgba(136, 146, 176, 0.7);
    font-style: italic;
    margin: 0;
}

@media (max-width: 768px) {
    .mobile-footer-actions {
        display: block;
    }
}

/* Desktop - keep floating panel visible */
@media (min-width: 769px) {
    .mobile-footer-actions {
        display: none;
    }
}

/* Enhanced Focus States for Accessibility */
*:focus {
    outline: 2px solid var(--glow-color);
    outline-offset: 2px;
}

/* Remove focus outline for mouse clicks, keep for keyboard navigation */
*:focus:not(:focus-visible) {
    outline: none;
}

nav ul li a:focus,
.panel-item:focus,
.mobile-action-item:focus,
.contact-link:focus {
    outline: 2px solid var(--highlight-color);
    outline-offset: 3px;
    background: rgba(136, 146, 176, 0.1);
}

/* Remove focus outline for nav links when clicked with mouse */
nav ul li a:focus:not(:focus-visible) {
    outline: none;
    background: none;
}

/* Better Navigation Active States */
nav ul li a.active {
    color: var(--highlight-color);
    font-weight: 600;
    position: relative;
}

/* Form Validation & Enhancement */
.form-group {
    position: relative;
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: rgba(76, 175, 80, 0.5);
}

.form-group input:invalid:not(:placeholder-shown):not(:focus),
.form-group textarea:invalid:not(:placeholder-shown):not(:focus) {
    border-color: rgba(244, 67, 54, 0.5);
}

.form-group label {
    transition: all 0.3s ease;
}

.form-group:focus-within label {
    color: var(--glow-color);
    transform: translateY(-2px);
}

/* Enhanced Button States */
.contact-submit-btn,
.mobile-resume-btn,
.contact-link,
.panel-item,
.mobile-action-item {
    position: relative;
    overflow: hidden;
}

.contact-submit-btn::before,
.mobile-resume-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-submit-btn:active::before,
.mobile-resume-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Improved Hover Feedback */
.project-item,
.experience-item,
.contact-card {
    cursor: pointer;
}

.project-item:hover,
.experience-item:hover,
.contact-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Skill Tags Enhancement */
.skill-tag {
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background-color: rgba(136, 146, 176, 0.15);
    transform: translateY(-2px);
}

/* Smooth Section Transitions */
.section {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
}

/* Better Link Interactions */
a {
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Enhanced Mobile Touch Feedback */
@media (max-width: 768px) {
    .mobile-action-item:active,
    .contact-submit-btn:active,
    .mobile-resume-btn:active {
        transform: scale(0.98);
    }
    
    /* Better mobile navigation feedback - prevent sticky :active state */
    nav ul li a:active {
        background: rgba(136, 146, 176, 0.25);
        transform: scale(0.95);
    }
    
    /* Ensure :active state doesn't stick on mobile */
    @media (hover: none) and (pointer: coarse) {
        nav ul li a:active {
            transition: all 0.1s ease;
        }
    }
    
    /* Ensure nav is always centered and responsive */
    nav {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        overflow: hidden;
    }
    
    nav ul {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: calc(100vw - 20px); /* Account for padding */
        overflow: hidden;
        box-sizing: border-box;
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 60px;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--glow-color), var(--highlight-color));
    z-index: 100;
    transition: width 0.3s ease;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--highlight-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Remove old 3D container styles */


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



@keyframes glow {
    0% {
        text-shadow: 0 0 5px var(--glow-color);
    }
    50% {
        text-shadow: 0 0 3px var(--glow-color), 0 0 15px var(--glow-color);
    }
    100% {
        text-shadow: 0 0 5px var(--glow-color);
    }
}

@media (max-width: 1200px) {
    .container {
        width: 97%;
        max-width: none;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    
    .text-content {
        max-width: 100%;
        text-align: center;
    }
    
    .profile-picture {
        margin-left: 0;
    }

    .text-content {
        max-width: 50%;
    }


    h1 {
        font-size: 3.5rem;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 2rem;
    }

    .profile-picture {
        width: 300px;
        height: 412px;
    }

    .header-content {
        flex-direction: row;
        justify-content: center; /* Center content horizontally */
        align-items: center;
        gap: 5%; /* Use percentage for more flexible spacing */
    }

    .profile-img {
        width: 100%;
        height: auto;
    }

    
    

    

}


@media (max-width: 768px) {
    header {
        margin-top: 25px;
        min-height: 100vh;
        padding-top: 75px; /* Slightly reduced for better mobile spacing */
        padding-bottom: 30px; /* Reduced bottom padding */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Start from top instead of center */
    }

    .container {
        width: 95%;
        padding: 0 15px; /* Better mobile padding */
    }

    .section {
        padding: 50px 0; /* Increased for better spacing */
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px; /* Tighter spacing for mobile */
        width: 100%;
        padding: 0 15px; /* Add container padding */
    }

    .text-content {
        max-width: 100%;
        text-align: center;
        padding: 0 5px;
        margin-bottom: 10px; /* Add space below text */
    }

    h1 {
        font-size: 3.5rem; /* Slightly smaller */
        margin-bottom: 12px; /* Tighter margin */
        line-height: 1.05;
    }

    .degree-row {
        margin-bottom: 20px; /* Add space after degree */
        font-size: 0.95rem; /* Slightly smaller text */
    }

    .text-content p {
        font-size: 1rem; /* Ensure readable size */
        line-height: 1.5;
        margin-top: 18px; /* Better spacing from degree */
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 1.3rem;
    }

    .profile-picture {
        width: 240px; /* Slightly smaller */
        height: 330px; /* Proportional height */
        margin: 0;
        order: 2;
    }

    /* Remove old social positioning since they're in mobile footer now */
    .header-socials {
        display: none;
    }

    #about {
        padding-top: 60px; /* Better section spacing */
    }
}

/* iPhone-specific optimizations */
@media (max-width: 430px) {
    /* Mobile nav adjustments for iPhone screens */
    nav ul {
        padding: 0 2px;
        gap: 1px;
        justify-content: space-evenly; /* Better distribution */
    }
    
    nav ul li {
        margin: 0;
        flex: 1; /* Equal width distribution */
        max-width: 25%; /* Ensure 4 items fit evenly */
    }
    
    nav ul li a {
        font-size: 0.76rem; /* Readable but compact */
        padding: 8px 2px;
        min-width: auto; /* Let flex handle width */
        width: 100%;
        box-sizing: border-box;
    }
}

/* Very small screens (iPhone SE) */
@media (max-width: 375px) {
    nav ul {
        padding: 0 1px;
    }
    
    nav ul li a {
        font-size: 0.74rem;
        padding: 7px 1px;
    }
}

@media (max-width: 480px) {
    header {
        margin-top: 25px;
        padding-top: 80px; /* Optimized mobile nav spacing */
        padding-bottom: 25px; /* Reduced bottom padding */
    }

    .container {
        width: 96%;
        padding: 0 8px;
    }

    .header-content {
        gap: 25px; /* Even tighter spacing for small screens */
        padding: 0 10px;
    }

    .text-content {
        padding: 0;
        margin-bottom: 8px;
    }

    h1 {
        font-size: 3rem; /* Smaller for tiny screens */
        margin-bottom: 10px;
        line-height: 1.05;
    }

    .degree-row {
        font-size: 0.9rem; /* Smaller degree text */
        margin-bottom: 16px;
    }

    .text-content p {
        font-size: 0.95rem; /* Slightly smaller paragraph */
        line-height: 1.45;
        margin-top: 16px;
    }

    h2 {
        font-size: 1.6rem;
        margin-bottom: 18px;
    }

    h3 {
        font-size: 1.2rem;
    }

    .profile-picture {
        width: 200px; /* Smaller for tiny screens */
        height: 275px; /* Proportional */
    }
}



@keyframes fadeIn {
    to {
        opacity: 0.2;
    }
}

.degree-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    line-height: 1.2;
}

.mcmaster-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 0;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.4));
}

.mcmaster-word {
    color: #7A003C !important;
    font-weight: bold;
    background: linear-gradient(90deg, #7A003C 0%, #7A003C 40%, #ffffff 50%, #7A003C 60%, #7A003C 100%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: mcmasterShine 2s linear infinite, mcmasterPulse 4s ease-in-out infinite alternate;
}

@keyframes mcmasterShine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes mcmasterPulse {
    0% { filter: drop-shadow(0 0 2px #7A003C); }
    100% { filter: drop-shadow(0 0 8px #7A003C); }
}

/* Fix title colors - white/light blue */
h1, h2 {
    position: relative;
    color: var(--heading-color);
    background: none;
    background-clip: initial;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    animation: none;
}

/* Apply shine effect only to section headings */
h2 {
    color: var(--heading-color) !important;
    font-weight: bold;
    background: linear-gradient(90deg, 
        var(--heading-color) 0%, 
        var(--heading-color) 35%, 
        var(--glow-color) 50%, 
        var(--heading-color) 65%, 
        var(--heading-color) 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3.5s ease-in-out infinite;
}

/* Company name shine effects */
.famzy-shine {
    color: #ff3366 !important;  /* Brighter, more vibrant red */
    font-weight: bold;
    background: linear-gradient(90deg, 
        #ff3366 0%, 
        #ff3366 35%, 
        #ffffff 50%, 
        #ff3366 65%, 
        #ff3366 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s ease-in-out infinite;
}

.aerachron-shine {
    color: var(--glow-color) !important;
    font-weight: bold;
    background: linear-gradient(90deg, 
        var(--glow-color) 0%, 
        var(--glow-color) 35%, 
        #ffffff 50%, 
        var(--glow-color) 65%, 
        var(--glow-color) 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s ease-in-out infinite;
}

.name-shine {
    color: var(--heading-color) !important;
    font-weight: bold;
    background: linear-gradient(90deg, 
        var(--heading-color) 0%, 
        var(--heading-color) 35%, 
        var(--glow-color) 50%, 
        var(--heading-color) 65%, 
        var(--heading-color) 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3.5s ease-in-out infinite;
}

@keyframes shine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 15px;
        order: 2; /* Move contact cards below form on mobile */
    }
    
    .contact-form-wrapper {
        order: 1; /* Move form above contact cards on mobile */
        padding: 20px;
    }
    
    .contact-card {
        padding: 18px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
    }
    
    .contact-card-icon {
        margin: 0;
        flex-shrink: 0;
    }
    
    .contact-card-content {
        flex: 1;
    }
    
    .contact-card h3 {
        margin-bottom: 4px;
        font-size: 1rem;
    }
    
    .contact-card p {
        margin-bottom: 8px;
        font-size: 0.85rem;
    }
    
    .contact-link {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}