@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Theme */
:root {
    --primary-color: #5E5DF0;
    --primary-dark: #4a4ac8;
    --secondary-color: #f59e0b;
    --accent-color: #ff4081;
    --text-primary: #333;
    --text-secondary: #555;
    --text-light: #777;
    --bg-primary: #fdfdff;
    --bg-secondary: #f5f5fa;
    --bg-tertiary: #eef0f3;
    --border-color: #ddd;
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 10px 30px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #5E5DF0 0%, #7b5dfa 100%);
    --gradient-secondary: linear-gradient(135deg, #ff4081 0%, #ff79b0 100%);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --primary-color: #6c6af7;
    --primary-dark: #5a58e1;
    --text-primary: #f0f0f0;
    --text-secondary: #ccc;
    --text-light: #aaa;
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --border-color: #333;
    --glass-bg: rgba(22, 33, 62, 0.5);
    --glass-border: rgba(22, 33, 62, 0.3);
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: all 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

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

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.navbar {
    box-shadow: var(--shadow-light);
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--primary-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%236366f1" stop-opacity="0.1"/><stop offset="100%" stop-color="%236366f1" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
  opacity: 0.5;
}

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

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
    animation: fadeInUp 1s ease-out;
    text-align: left;
}

.greeting {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.0rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.0rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.5rem 1rem;
    font-family: system-ui;
    border: none;
    align-items: center;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    box-shadow: var(--shadow-large);
    animation: float 6s ease-in-out infinite;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.floating-element {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 0%;
    animation: float 4s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 65%;
    right: 0%;
    animation: float 5s ease-in-out infinite reverse;
}

.floating-element:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 0;
    left: 15%;
    animation: float 3s ease-in-out infinite;
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* About Section */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

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

.stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about-image {
  display: flex;
  justify-content: center;
}

.image-container {
    width: 100%;
    max-width: 350px;
    height: 350px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    padding: 5px;
    box-shadow: var(--shadow-medium);
    margin: 0 auto; /* Center it in the grid cell */
}

.image-placeholder {
    object-fit: cover;
    width: 100%;
    border-radius: 15px;
    height: -webkit-fill-available;
}

/* Projects Section */
.projects-grid {
  width: 100%;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75em, 1fr));
  gap: 2rem;
  width: 100%;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.project-thumbnail {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.project-thumbnail .slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.project-thumbnail .slide {
    display: none;
    width: 100%;
    height: 100%;
}

.project-thumbnail .slide.active {
    display: block;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.slideshow-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.project-card:hover .slideshow-nav {
    opacity: 1;
}

.slideshow-nav button {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slideshow-nav button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

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

.tech-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Skills Section */
.skills {
    background: var(--bg-secondary);
}

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

.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    overflow-wrap: break-word;
}

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

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.skill-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: var(--primary-color);
    color: white;
}

.skill-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-item svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-item:hover i {
    color: white;
}

.skill-item span {
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.skill-item:hover span {
    color: white;
}

/* Contact Section */
.contact {
    background: var(--bg-primary);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Employment History Section */
.employment {
    background: var(--bg-secondary);
}

.employment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18.75em, 1fr));
    gap: 2rem;
}

.job-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

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

.job-header {
    margin-bottom: 1.5rem;
}

.job-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.job-company {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.job-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.job-details {
    list-style: none;
    padding-left: 0;
}

.job-details li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.job-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Social Links in Hero Section */
.hero-social-links {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 992px) {
    .hero-social-links {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 2rem;
        padding-bottom: 2rem;
    }
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.project-thumbnail {
    position: relative;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.project-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.show-videos-container {
    text-align: center;
    margin-top: 2rem;
        justify-content: center;
    display: flex;
}

#show-video-projects-btn {
    font-size: 1rem;
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-large);
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    transition: background 0.3s ease;
}

.close:hover {
    background: rgba(0, 0, 0, 0.6);
}

.modal-body {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

.modal-video {
    width: 50%;
    position: relative;
    background-color: #000;
}

.modal-slideshow-media{height: inherit;}

.modal-video iframe,
.modal-slideshow img,
.modal-slideshow video {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.modal-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.modal-info {
    padding: 2rem;
     width:50%;
    overflow-y: auto;
}


@media (max-width: 769px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-video {
 width:100%;
    }
    .modal-video iframe {
        position: relative;
        height: 100%;
    }
    .modal-info {
       width:100%;
    }

    .modal {
    overflow-y: auto;
}

.modal-content {
    margin: auto;
    max-height: unset;
}


}

.modal-info h3 {
  line-height: 1.3;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.modal-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-links {
    display: flex;
    column-gap: 1rem;
    row-gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.modal-links a {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modal-links a:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  background: var(--bg-tertiary);
  padding: 2rem 0;
  text-align: center;
}

.footer-content p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: unset;
  }
  .hero-text {
    order: 2;
  }
  .hero-visual {
    order: 1;
  }
  .hero-social-links {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
  }
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .about-image {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
    .floating-element:nth-child(1){
        width: 50px;
        height: 50px;
        left: -15px;
    }
    .floating-element:nth-child(3){
        width: 65px;
        height: 65px;
        bottom: -20px;
    }
    .floating-element:nth-child(2){
        width: 50px;
        height: 50px;
        right: -20px;
    }
    section {
        padding: 4rem 0;
    }
    .section-header {
        margin-bottom: 3rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 1rem;
    }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: var(--bg-primary);
        width: 80%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        padding-top: 5rem;
        box-shadow: var(--shadow-large);
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-link {
        font-size: 1.2rem;
        margin: 1rem 0;
    }
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    .hero-image, .hero-image img {
        width: 220px;
        height: 220px;
    }
    .image-container {
        width: 100%;
        max-width: 300px;
        height: 300px;
    }
    .about-stats {
        grid-template-columns: 1fr;
    }
    .job-card, .skill-category {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons, .contact-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    .btn {
        font-size: 0.9rem;
        width: 100%;
    text-align: center;
    }
    .container {
        padding: 0 1rem;
    }
    #show-video-projects-btn{font-size: 12px;}

    .hero-content {
        gap: 2rem;
    }
    section {
        padding: 3rem 0;
    }
}

@media (max-width: 360px){
  screenerror{
    display: block;
  }
  noscreenerror{
    display: none;
  }

}@media (min-width: 360px){
  screenerror{
    display: none;
  }
  noscreenerror{
    display: block;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background-color: var(--bg-tertiary);
    border-radius:2px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 2px;
}
