/* ===== CSS Variables ===== */
:root {
    --charcoal: #111826;
    --electric-blue: #2D9CDB;
    --soft-cyan: #9BE7FF;
    --light-gray: #F8F9FA;
    --white: #FFFFFF;
    --text-gray: #6B7280;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--charcoal);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Animated Background ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(45, 156, 219, 0.1), rgba(155, 231, 255, 0.05));
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    33% { 
        transform: translate(30px, -30px) rotate(120deg); 
    }
    66% { 
        transform: translate(-20px, 20px) rotate(240deg); 
    }
}

/* ===== Navigation ===== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(17, 24, 38, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(45, 156, 219, 0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--electric-blue);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--soft-cyan);
}

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

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* ===== Section ===== */
section {
    min-height: 100vh;
    padding: 6rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Hero Section ===== */
#about {
    display: flex;
    align-items: center;
    padding-top: 8rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(45, 156, 219, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--electric-blue);
    box-shadow: 0 10px 30px rgba(45, 156, 219, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(45, 156, 219, 0.5);
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.hero-text .name {
    color: var(--electric-blue);
    display: inline-block;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(45, 156, 219, 0.5); 
    }
    50% { 
        text-shadow: 0 0 30px rgba(45, 156, 219, 0.8); 
    }
}

.typing-text {
    font-size: 1.5rem;
    color: var(--soft-cyan);
    margin-bottom: 1.5rem;
    min-height: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: rgba(45, 156, 219, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(45, 156, 219, 0.2);
    transform: translateX(5px);
}

.info-item i {
    color: var(--electric-blue);
    font-size: 1.2rem;
    min-width: 24px;
}

.info-item img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.info-item span,
.info-item .phone-link {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.phone-link:hover {
    color: var(--soft-cyan);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 156, 219, 0.1);
    border-radius: 50%;
    color: var(--electric-blue);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--electric-blue);
    color: var(--white);
    transform: translateY(-5px) scale(1.1);
}

/* ===== Career Objectives ===== */
.objectives {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(45, 156, 219, 0.05);
    border-left: 4px solid var(--electric-blue);
    border-radius: 10px;
}

.objectives h2 {
    color: var(--soft-cyan);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.objectives p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===== Section Title ===== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--white);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--electric-blue), var(--soft-cyan));
    animation: expandLine 2s ease-in-out infinite;
}

@keyframes expandLine {
    0%, 100% { 
        width: 100px; 
    }
    50% { 
        width: 150px; 
    }
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(45, 156, 219, 0.2);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--electric-blue);
    box-shadow: 0 15px 30px rgba(45, 156, 219, 0.3);
}

.skill-card h3 {
    color: var(--electric-blue);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(45, 156, 219, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    background: var(--electric-blue);
    transform: translateY(-3px) scale(1.05);
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    gap: 3rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(45, 156, 219, 0.2);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--electric-blue);
    box-shadow: 0 15px 40px rgba(45, 156, 219, 0.3);
}

.project-img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    object-position: center;
    background: rgba(17, 24, 38, 0.8);
    transition: transform 0.3s ease;
    padding: 1rem;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
}

.project-title {
    color: var(--electric-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(155, 231, 255, 0.1);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--soft-cyan);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--electric-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--soft-cyan);
    color: var(--charcoal);
    transform: translateY(-3px);
}

.project-details ul {
    list-style: none;
    margin-top: 1rem;
}

.project-details li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.project-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--electric-blue);
    font-weight: bold;
}

/* ===== Work Experience Timeline ===== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--electric-blue), var(--soft-cyan));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-date {
    text-align: right;
    grid-column: 1;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-date {
    text-align: left;
    grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 1;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--electric-blue);
    border: 4px solid var(--charcoal);
    border-radius: 50%;
    grid-column: 2;
    z-index: 2;
    box-shadow: 0 0 20px rgba(45, 156, 219, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(45, 156, 219, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(45, 156, 219, 0.8);
    }
}

.timeline-date {
    font-weight: 600;
    color: var(--soft-cyan);
    padding: 0.5rem 1rem;
    background: rgba(45, 156, 219, 0.1);
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(45, 156, 219, 0.2);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--electric-blue);
    box-shadow: 0 10px 30px rgba(45, 156, 219, 0.3);
}

.timeline-title {
    color: var(--electric-blue);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--soft-cyan);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-details {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline-details li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.timeline-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--electric-blue);
    font-weight: bold;
}

/* ===== Contact Section ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid rgba(45, 156, 219, 0.2);
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(45, 156, 219, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(45, 156, 219, 0.2);
    transform: translateX(10px);
}

.contact-item i {
    color: var(--electric-blue);
    font-size: 1.5rem;
    width: 30px;
}

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

.contact-item a:hover {
    color: var(--soft-cyan);
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(45, 156, 219, 0.3);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--electric-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.back-to-top:hover {
    background: var(--soft-cyan);
    transform: translateY(-5px);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .profile-img {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .info-item {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        padding: 0 1rem;
        font-size: 0.95rem;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .typing-text {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        justify-content: center;
    }

    .objectives {
        padding: 1.5rem;
    }

    .objectives h2 {
        font-size: 1.5rem;
    }

    .project-img {
        height: 250px;
        padding: 0.5rem;
    }

    .project-info {
        padding: 1.5rem;
    }

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

    .project-links {
        flex-direction: column;
    }

    .project-link {
        justify-content: center;
    }

    section {
        padding: 4rem 0;
    }

    #about {
        padding-top: 6rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 1.4rem;
    }

    .typing-text {
        font-size: 1rem;
    }

    nav ul {
        gap: 0.8rem;
        font-size: 0.85rem;
    }

    .project-card {
        margin-bottom: 2rem;
    }

    .project-img {
        height: auto;
        min-height: 180px;
        max-height: 250px;
        padding: 0.5rem;
        background: rgba(17, 24, 38, 0.5);
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .project-info {
        padding: 1.2rem;
    }

    .project-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .project-tech {
        margin: 0.8rem 0;
    }

    .project-details {
        margin-top: 1rem;
    }

    .project-details ul {
        padding-left: 0;
    }

    .project-details li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        padding-left: 1.2rem;
    }

    .project-link {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .contact-grid {
        padding: 1.5rem 1rem;
    }

    .profile-img {
        width: 150px;
        height: 150px;
    }

    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .objectives h2 {
        font-size: 1.3rem;
    }

    .objectives p {
        font-size: 0.9rem;
    }

    .skill-card h3 {
        font-size: 1.2rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .tech-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .contact-item {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .map-container iframe {
        min-height: 300px;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .timeline-title {
        font-size: 1.1rem;
    }

    .timeline-company {
        font-size: 0.95rem;
    }

    .timeline-details li {
        font-size: 0.85rem;
    }

    .timeline-content {
        padding: 1rem;
    }
}

/* Force show projects on mobile */
@media (max-width: 768px) {
    #project {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        min-height: auto;
    }

    .projects-grid {
        display: grid !important;
    }

    .project-card {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ===== Download CV Button ===== */
.btn-download-cv {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #6c63ff, #4facfe);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-download-cv::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-download-cv:hover::before {
  left: 100%;
}

.btn-download-cv:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.6);
}

.btn-download-cv:active {
  transform: translateY(0);
}

.btn-download-cv i {
  font-size: 16px;
  animation: bounce-icon 1.5s infinite;
}

@keyframes bounce-icon {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}