/* Modern Professional Portfolio Styles */

:root {
    /* Updated color scheme with more subdued, professional tones */
    --primary-color: #2c3e50; /* Dark blue-gray */
    --secondary-color: #3498db; /* Medium blue */
    --accent-color: #e67e22; /* Warm orange */
    --background-light: #f5f5f5;
    --background-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-dark: #333333;
    --card-bg: #ffffff;
    --card-bg-dark: #1a1a1a;
    --border-radius: 8px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), #34495e);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #2980b9);
    --gradient-accent: linear-gradient(135deg, var(--accent-color), #d35400);
    --glow: 0 0 15px rgba(52, 152, 219, 0.3);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    color: var(--text-dark);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease, transform 0.4s ease;
}

.site-header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.logo span {
    color: var(--accent-color);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.logo:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 0;
    position: relative;
    display: inline-block;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover, .main-nav ul li a.active {
    color: var(--primary-color);
}

.main-nav ul li a:hover::after, .main-nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 20%);
    opacity: 0.8;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../assets/grid.svg');
    background-size: cover;
    opacity: 0.1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

/* Floating animation for hero elements */
.hero h1, .hero .subtitle, .hero .cta-button {
    animation: float 6s ease-in-out infinite;
}

.hero h1 {
    animation-delay: 0s;
}

.hero .subtitle {
    animation-delay: 0.5s;
}

.hero .cta-button {
    animation-delay: 1s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4em;
    margin-bottom: 10px;
    color: var(--text-light);
    text-shadow: 0 0 15px rgba(0,0,0,0.2);
    position: relative;
    display: inline-block;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-color);
}

.hero .subtitle {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

.hero .profile-image-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 40px;
    background: rgba(255,255,255,0.1);
    padding: 5px;
    box-shadow: 0 0 0 5px rgba(255,255,255,0.2), var(--shadow), 0 0 20px rgba(52, 152, 219, 0.5);
    position: relative;
    overflow: hidden;
    animation: profileFloat 6s ease-in-out infinite;
}

@keyframes profileFloat {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(10px) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.hero .profile-image-wrapper::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--gradient-primary);
    z-index: -1;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.hero .profile-image-wrapper::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

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

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

.hero .profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    transition: transform 0.5s ease;
    filter: contrast(1.05) brightness(1.05);
}

.hero .profile-image-wrapper:hover .profile-image {
    transform: scale(1.1);
    filter: contrast(1.1) brightness(1.1);
}

.cta-button {
    display: inline-block;
    background: var(--gradient-accent);
    color: var(--text-light);
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: var(--shadow), 0 0 15px rgba(255, 62, 127, 0.5);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), 0 0 20px rgba(0, 217, 255, 0.6);
}

.cta-button:hover::before {
    opacity: 1;
}

/* --- General Section Styling --- */
.section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    position: relative;
}

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

.section:nth-child(even) {
    background-color: var(--card-bg);
}

.section-title {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

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

.section-subtitle {
    text-align: center;
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* --- About Section --- */
#about .about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

#about .about-text {
    flex: 1;
    min-width: 300px;
}

#about .about-text p {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.8;
    position: relative;
    padding-left: 15px;
    border-left: 3px solid var(--primary-color);
    animation: fadeInRight 0.8s both;
    animation-play-state: paused;
}

.section.visible #about .about-text p:nth-child(1) { animation-delay: 0.1s; }
.section.visible #about .about-text p:nth-child(2) { animation-delay: 0.3s; }

.section.visible #about .about-text p {
    animation-play-state: running;
}

#about .contact-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.contact-detail-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: fadeInRight 0.5s both;
    animation-play-state: paused;
}

.section.visible .contact-detail-item:nth-child(1) { animation-delay: 0.1s; }
.section.visible .contact-detail-item:nth-child(2) { animation-delay: 0.3s; }
.section.visible .contact-detail-item:nth-child(3) { animation-delay: 0.5s; }

.section.visible .contact-detail-item {
    animation-play-state: running;
}

.contact-detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.contact-detail-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover), var(--glow);
    color: var(--text-light);
}

.contact-detail-item:hover::before {
    opacity: 1;
}

.contact-detail-item:hover i,
.contact-detail-item:hover a {
    color: var(--text-light);
}

.contact-detail-item i {
    color: var(--primary-color);
    margin-right: 12px;
    font-size: 1.3em;
    transition: color 0.3s ease;
}

.contact-detail-item a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    justify-content: center;
    margin-top: 20px;
}

.skill-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px 20px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 3px solid transparent;
    animation: fadeInScale 0.5s both;
    animation-play-state: paused;
}

.section.visible .skill-card {
    animation-play-state: running;
}

.section.visible .skill-card:nth-child(1) { animation-delay: 0.1s; }
.section.visible .skill-card:nth-child(2) { animation-delay: 0.2s; }
.section.visible .skill-card:nth-child(3) { animation-delay: 0.3s; }
.section.visible .skill-card:nth-child(4) { animation-delay: 0.4s; }
.section.visible .skill-card:nth-child(5) { animation-delay: 0.5s; }
.section.visible .skill-card:nth-child(6) { animation-delay: 0.6s; }
.section.visible .skill-card:nth-child(7) { animation-delay: 0.7s; }
.section.visible .skill-card:nth-child(8) { animation-delay: 0.8s; }
.section.visible .skill-card:nth-child(9) { animation-delay: 0.9s; }
.section.visible .skill-card:nth-child(10) { animation-delay: 1.0s; }

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

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transition: height 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.skill-card:hover::before {
    height: 6px;
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2);
    color: var(--secondary-color);
}

.skill-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.skill-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: width 0.3s ease;
}

.skill-card:hover .skill-name::after {
    width: 70%;
}

.skill-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin-top: 5px;
}

/* Skill level indicator */
.skill-level {
    width: 100%;
    height: 6px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.skill-level-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.section.visible .skill-card .skill-level-fill {
    width: var(--skill-percent, 0%);
}

.skill-card:hover .skill-level-fill {
    animation: pulse-opacity 1.5s infinite;
}

@keyframes pulse-opacity {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* --- Experience & Education Timeline --- */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--gradient-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    box-shadow: var(--glow);
    animation: timelinePulse 2s infinite;
}

@keyframes timelinePulse {
    0% { box-shadow: 0 0 5px rgba(52, 152, 219, 0.3); }
    50% { box-shadow: 0 0 15px rgba(52, 152, 219, 0.5); }
    100% { box-shadow: 0 0 5px rgba(52, 152, 219, 0.3); }
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    right: -12px;
    background-color: var(--card-bg);
    border: 4px solid var(--primary-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: var(--glow);
    transition: all 0.3s ease;
    animation: timelineCirclePulse 3s infinite;
}

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

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--card-bg);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--card-bg);
}

.timeline-item.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--card-bg);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--card-bg) transparent transparent;
}

.timeline-item.right::after {
    left: -12px;
}

.timeline-content {
    padding: 25px 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
    animation: fadeInRight 1s both;
    animation-play-state: paused;
}

.section.visible .timeline-item.left .timeline-content {
    animation-play-state: running;
}

.section.visible .timeline-item.right .timeline-content {
    animation: fadeInLeft 1s both;
    animation-play-state: running;
}

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

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

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.timeline-content:hover::before {
    width: 100%;
    opacity: 0.1;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.4em;
    position: relative;
}

.timeline-content h4 {
    color: var(--secondary-color);
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.timeline-date {
    font-size: 0.9em;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(255, 62, 127, 0.1);
    border-radius: 15px;
}

.timeline-description p, .timeline-description ul {
    font-size: 0.95em;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.timeline-content:hover .timeline-description p,
.timeline-content:hover .timeline-description ul {
    color: var(--text-dark);
}

.timeline-description ul {
    list-style-type: none;
    padding-left: 5px;
    margin-top: 10px;
}

.timeline-description li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.timeline-description li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2em;
}

/* --- Achievements Section --- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.achievement-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: fadeInUp 0.6s both;
    animation-play-state: paused;
}

.section.visible .achievement-card {
    animation-play-state: running;
}

.section.visible .achievement-card:nth-child(2) {
    animation-delay: 0.2s;
}

.section.visible .achievement-card:nth-child(3) {
    animation-delay: 0.4s;
}

.section.visible .achievement-card:nth-child(4) {
    animation-delay: 0.6s;
}

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

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-accent);
    transition: height 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover), 0 0 20px rgba(255, 62, 127, 0.3);
}

.achievement-card:hover::before {
    height: 100%;
    opacity: 0.05;
}

.achievement-card .icon {
    font-size: 2.8em;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.achievement-card:hover .icon {
    transform: scale(1.2);
}

.achievement-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
    position: relative;
    display: inline-block;
}

.achievement-card h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.achievement-card:hover h3::after {
    width: 80%;
}

.achievement-card .date {
    font-size: 0.9em;
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(0, 217, 255, 0.1);
    border-radius: 15px;
}

/* --- References Section --- */
#references .references-intro {
    text-align: center;
    margin-bottom: 40px;
}

.action-button {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 14px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: all 0.3s ease;
    box-shadow: var(--shadow), 0 0 15px rgba(110, 0, 255, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.action-button:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), 0 0 20px rgba(0, 217, 255, 0.5);
}

.action-button:hover::before {
    opacity: 1;
}

.action-button i {
    margin-right: 10px;
}

/* --- Modal Styling --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 550px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3), var(--glow);
    position: relative;
    animation: fadeInModal 0.5s ease-out;
    border-top: 5px solid var(--primary-color);
}

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

.close-button {
    color: var(--secondary-color);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-button:hover,
.close-button:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
    background-color: rgba(255, 62, 127, 0.1);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.modal-title i {
    margin-right: 10px;
    color: var(--accent-color);
}

.reference-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.reference-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.reference-item:hover {
    transform: translateX(5px);
}

.reference-item p {
    margin-bottom: 5px;
}

.reference-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.reference-item i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.reference-item a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 3px 0;
}

.reference-item a:hover {
    color: var(--primary-color);
}

/* --- Footer --- */
.site-footer {
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 50px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s both;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../assets/grid.svg');
    background-size: cover;
    opacity: 0.05;
}

.site-footer p {
    margin: 0 0 10px;
    font-size: 1em;
    position: relative;
    z-index: 1;
}

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

.site-footer a:hover {
    text-decoration: none;
    color: var(--secondary-color);
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.5);
}

.site-footer .fa-heart {
    color: var(--accent-color);
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .hero h1 { font-size: 3.2em; }
    .hero .subtitle { font-size: 1.3em; }
    .section-title { font-size: 2.4em; }
    
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 10px; }
    .timeline-item.left::before, .timeline-item.right::before {
        left: 10px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--card-bg) transparent transparent;
    }
    .timeline-item.left::after, .timeline-item.right::after {
        left: 10px;
    }
    .timeline-item.right { left: 0%; }
}

@media (max-width: 768px) {
    .site-header {
        padding: 12px 0;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
    }
    
    .main-nav.active {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav ul li {
        margin: 12px 0;
        width: 100%;
        text-align: center;
    }
    
    .main-nav ul li a {
        display: block;
        padding: 10px;
    }
    
    .menu-toggle {
        display: block;
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        transform: scale(1.1);
        color: var(--accent-color);
    }
    
    .hero { padding: 140px 0 80px; }
    .hero h1 { font-size: 2.5em; }
    .hero .subtitle { font-size: 1.1em; }
    .section { padding: 70px 0; }
    .section-title { font-size: 2em; }
    .section-subtitle { font-size: 1em; margin-bottom: 40px; }
    
    .skill-tag {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2em; }
    .hero .profile-image-wrapper { width: 150px; height: 150px; }
    .cta-button, .action-button { padding: 12px 25px; font-size: 1em; }
    .section-title { font-size: 1.8em; }
    .timeline-content { padding: 20px; }
    .timeline-content h3 { font-size: 1.2em; }
    
    .contact-detail-item,
    .achievement-card {
        padding: 20px;
    }
}
