:root {
    --bg-color: #0f0f11;
    --text-color: #fffcfc;
    --accent-color: #00f7ff;
    --secondary-color: #1a1a1d;
    --font-main: 'Inter', sans-serif;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 15, 17, 0.9);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.1;
  position: relative;
  z-index: 2;
}

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

.hero-content p {
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin: 0 10px;
}

.cta-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.cta-button-secondary {
    background: var(--accent-color);
    color: var(--bg-color);
}

.cta-button-secondary:hover {
    background: transparent;
    color: var(--accent-color);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Sections */
.section {
  padding: 60px 5%;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: justify;
}

.about-text h1,
.about-text h2,
.about-text h3,
.about-text h4,
.about-text h5,
.about-text h6,
.about-text h1[class=""],
.about-text h2[class=""],
.about-text h3[class=""],
.about-text h4[class=""],
.about-text h5[class=""],
.about-text h6[class=""] {
    color: var(--accent-color);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.about-text h1 { font-size: 2.5rem; }
.about-text h2 { font-size: 2rem; }
.about-text h3 { font-size: 1.75rem; }
.about-text h4 { font-size: 1.5rem; }
.about-text h5 { font-size: 1.25rem; }
.about-text h6 { font-size: 1.1rem; }

.about-text h1:first-child,
.about-text h2:first-child,
.about-text h3:first-child,
.about-text h4:first-child,
.about-text h5:first-child,
.about-text h6:first-child {
    margin-top: 0;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text ul,
.about-text ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.about-text li {
    margin-bottom: 0.5rem;
    list-style: disc;
}

.about-text ol li {
    list-style: decimal;
}

.about-text strong,
.about-text b {
    color: var(--accent-color);
    font-weight: 600;
}

.about-text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.about-text a:hover {
    color: #fff;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.5rem;
}

.skill-tag {
    background: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #333;
}

/* CSS 3D Cube */
.cube-container {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    perspective: 1000px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 10s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.front  { transform: rotateY(0deg) translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotate {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* Portfolio Section */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    color: var(--accent-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background: var(--secondary-color);
}

.item-image {
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
}

.portfolio-item:hover .item-image {
    transform: scale(1.1);
}

.item-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transition: 0.3s;
}

.portfolio-item:hover .item-overlay {
    bottom: 0;
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--secondary-color);
    border: 1px solid #333;
    color: var(--text-color);
    font-family: inherit;
    outline: none;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-color);
}

/* Custom Captcha Styles */
.captcha-group {
    background: rgba(0, 247, 255, 0.05);
    border: 1px solid rgba(0, 247, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.captcha-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.captcha-image-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--secondary-color);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
    justify-content: space-between;
}

.captcha-image {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    border: 1px solid rgba(0, 247, 255, 0.3);
    background: white;
}

.captcha-refresh {
    background: rgba(0, 247, 255, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: rotate(180deg);
}

.captcha-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.captcha-group input {
    background: var(--bg-color);
    border: 2px solid rgba(0, 247, 255, 0.3);
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.captcha-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 247, 255, 0.1);
    outline: none;
}

.captcha-help {
    color: #999;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 5px;
    display: block;
}

/* Contact Icons Enhancement */
.whatsapp-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.whatsapp-contact a:hover {
    color: #25D366;
    transform: translateX(5px);
}

.whatsapp-contact i {
    font-size: 1.2rem;
    color: #25D366;
}

.phone-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.phone-contact a:hover {
    color: #4CAF50;
    transform: translateX(5px);
}

.phone-contact i {
    font-size: 1.1rem;
    color: #4CAF50;
}

/* Responsive Captcha Styles */
@media (max-width: 768px) {
    .captcha-image-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .captcha-image {
        max-width: 180px;
    }
    
    .captcha-refresh {
        align-self: center;
    }
    
    .captcha-container {
        gap: 12px;
    }
}

/* Footer */
.main-footer {
  background: var(--secondary-color);
  border-top: 1px solid #333;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-description {
  color: #ffffff;
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ffffff;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-contact a {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

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

.footer-tech span {
  background: rgba(0, 247, 255, 0.1);
  color: var(--accent-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid var(--accent-color);
}

.footer-tech-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5% 40px 5%;
  border-top: 1px solid #333;
  padding-top: 30px;
}

.footer-tech-section h4 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  text-align: center;
}

.footer-tech-section .footer-tech {
  justify-content: center;
  max-width: 100%;
}

.footer-bottom {
  background: var(--bg-color);
  padding: 20px 5%;
  text-align: center;
  border-top: 1px solid #333;
}

.footer-bottom p {
  color: #ffffff;
  margin: 0;
}

footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid #222;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: flex !important;
    }
    
    /* Hero Section Mobile */
    .hero {
        padding: 0 5%;
        min-height: 100vh;
        height: 100vh;
        padding-top: 80px; /* Account for fixed navbar */
        position: relative;
        overflow: hidden;
    }
    
    .hero-content {
        padding: 2rem 0;
        max-width: 100%;
        z-index: 3;
        margin-top: 0; /* Remove any top margin that might cause overlap */
        position: relative;
    }
    
    .hero-background {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: -1 !important;
        overflow: hidden !important;
    }
    
    .hero-image {
        width: 100% !important;
        height: 100vh !important;
        object-fit: cover !important;
        object-position: center !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        z-index: -2 !important;
    }
    
    .hero-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: -1 !important;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cta-button {
        margin: 0;
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 15px 20px;
        font-size: 0.9rem;
    }
    
    /* About Section Mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-text {
        order: 2;
        text-align: justify;
        text-align-last: left;
    }
    
    .about-visual {
        order: 1;
    }
    
    .cube-container {
        width: 180px;
        height: 180px;
        margin: 3rem auto 2rem; /* Added top margin to move cube down */
    }
    
    .face {
        width: 180px;
        height: 180px;
        font-size: 1.5rem;
    }
    
    .front  { transform: rotateY(0deg) translateZ(90px); }
    .back   { transform: rotateY(180deg) translateZ(90px); }
    .right  { transform: rotateY(90deg) translateZ(90px); }
    .left   { transform: rotateY(-90deg) translateZ(90px); }
    .top    { transform: rotateX(90deg) translateZ(90px); }
    .bottom { transform: rotateX(-90deg) translateZ(90px); }
    
    /* Section Spacing Mobile */
    .section {
        padding: 40px 5%;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* Portfolio Grid Mobile */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .portfolio-item {
        height: 220px;
    }
    
    /* Sample Works Mobile */
    .sample-works-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sample-work-item {
        height: 220px;
    }
    
    /* Skills Grid Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skills {
        justify-content: center;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 4px 12px;
    }
    
    /* Images Mobile Optimization */
    img {
        max-width: 100%;
        height: auto;
    }
    
    .hero-image {
        object-fit: cover;
        object-position: center;
    }
    
    .work-image img,
    .gallery-image,
    .item-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}
.hero-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-color);
  letter-spacing: 2px;
}

/* Hero Background Image */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 17, 0.3);
  z-index: 1;
}

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

/* About Image - replaced with 3D Cube */
/* CSS 3D Cube */
.cube-container {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  perspective: 1000px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotate 10s infinite linear;
}

.face {
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
}

.front  { transform: rotateY(0deg) translateZ(100px); }
.back   { transform: rotateY(180deg) translateZ(100px); }
.right  { transform: rotateY(90deg) translateZ(100px); }
.left   { transform: rotateY(-90deg) translateZ(100px); }
.top    { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotate {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}

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

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

/* Sample Works */
.sample-works .section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: #ffffff;
  font-size: 1.1rem;
}

.sample-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 3rem;
}

.sample-work-item {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--secondary-color);
  border: 1px solid #333;
  transition: transform 0.3s, box-shadow 0.3s;
}

.sample-work-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 247, 255, 0.15);
}

.work-image {
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
}

.sample-work-item:hover .work-image {
  transform: scale(1.1);
}

.work-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  transition: 0.3s;
}

.sample-work-item:hover .work-overlay {
  bottom: 0;
}

.work-overlay h3 {
  color: var(--text-color);
  margin-bottom: 5px;
  font-size: 1.2rem;
  font-weight: 600;
}

.work-overlay p {
  color: #aaa;
  font-size: 0.9rem;
  margin: 0;
}

.works-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.work-item {
  text-align: center;
}

.work-placeholder {
  height: 200px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.work-item h3 {
  font-size: 1.2rem;
  color: var(--text-color);
}

.cta-center {
  text-align: center;
}

/* Image Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  height: 200px;
  border-radius: 8px;
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.05);
}

/* Page Header */
.page-header {
  padding: 120px 5% 60px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary-color) 100%);
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.page-header p {
  font-size: 1.2rem;
  color: #ffffff;
}

/* Active Navigation Link */
.nav-links a.active {
  color: var(--accent-color);
}

/* Project Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.project-tags span {
  background: var(--accent-color);
  color: var(--bg-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Contact Page Styles */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-method {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--secondary-color);
  border-radius: 8px;
  border: 1px solid #333;
}

.contact-method h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.contact-details a {
  color: var(--accent-color);
  text-decoration: underline;
}

.contact-details a:hover {
  color: var(--text-color);
}

.contact-note {
  color: #ffffff;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.response-time, .availability {
  color: #ffffff;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.whatsapp-contact a {
  font-weight: 600;
}

.availability-info {
  padding: 1.5rem;
  background: rgba(0, 247, 255, 0.1);
  border-radius: 8px;
  border: 1px solid var(--accent-color);
}

.availability-info h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.contact-form-container {
  background: var(--secondary-color);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #333;
}

.contact-form-container h3 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 600;
}

/* Contact Page Mobile */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-method {
    padding: 1.2rem;
    margin-bottom: 1.5rem;
  }
  
  .contact-method h3 {
    font-size: 1.2rem;
  }
  
  .contact-form-container {
    padding: 1.5rem;
  }
  
  .contact-form-container h3 {
    font-size: 1.3rem;
  }
  
  .availability-info {
    padding: 1.2rem;
  }
  
  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
  }
  
  .cta-button {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .contact-method {
    padding: 1rem;
  }
  
  .contact-form-container {
    padding: 1rem;
  }
  
  .availability-info {
    padding: 1rem;
  }
  
  .contact-method h3,
  .contact-form-container h3 {
    font-size: 1.1rem;
  }
}

/* Alert Messages */
.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert ul {
  margin: 0;
  padding-left: 1.2rem;
}

.alert li {
  margin-bottom: 0.25rem;
}

/* Field-specific Error Messages */
.error-message {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Tutorial Page Styles */
.category-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.tutorial-card {
  background: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #333;
  transition: transform 0.3s, box-shadow 0.3s;
}

.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 247, 255, 0.1);
}

.tutorial-image {
  height: 200px;
  width: 100%;
}

.tutorial-content {
  padding: 1.5rem;
}

.tutorial-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.tutorial-content p {
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.tutorial-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.difficulty {
  background: var(--accent-color);
  color: var(--bg-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.duration {
  background: #666;
  color: var(--text-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.tutorial-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tutorial-tags span {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid #444;
}

.coming-soon {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--secondary-color);
  border-radius: 8px;
  border: 1px solid #333;
}

.coming-soon h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.coming-soon p {
  color: #ffffff;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Updates */
@media (max-width: 768px) {
  .hero-subtitle {
    font-size: 1.3rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .cta-button {
    margin: 0;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
  
  .category-filter {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-header h1 {
    font-size: 2.5rem;
  }
  
  .works-preview {
    grid-template-columns: 1fr;
  }
  
  .sample-works-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  /* Mobile Image Optimization */
  .gallery-masonry {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .gallery-item {
    height: auto;
    min-height: 200px;
  }
  
  .gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
  }
  
  /* Project Images Mobile */
  .work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  /* Center footer logo on mobile */
  .footer-section .footer-logo {
    text-align: center !important;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
  }
  
  .footer-section .footer-logo a {
    display: inline-block;
  }
  
  /* Make footer logo smaller on mobile */
  .footer-section .footer-logo img {
    height: 40px !important;
    width: auto !important;
    max-width: 150px !important;
  }
  
  /* Move cube down on mobile */
  .cube-container {
    margin-top: 3rem !important;
    margin-bottom: 2rem !important;
  }
  
  .footer-tech {
    justify-content: center;
  }
  
  /* Form Mobile */
  .contact-form {
    padding: 0;
  }
  
  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Navbar Mobile Logo */
  .logo img {
    height: 50px !important;
  }
  
  /* Page Header Mobile */
  .page-header {
    padding: 100px 5% 40px;
  }
  
  .page-header h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .page-header p {
    font-size: 1rem;
  }
}
/* Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background: var(--accent-color);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background: var(--accent-color);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .hamburger {
        display: flex !important;
        order: 3;
        z-index: 1002;
    }
    
    .logo {
        order: 1;
        z-index: 1002;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 15, 17, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        z-index: 1001;
        order: 2;
        
        /* Initially hidden */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        margin: 1rem 0;
        list-style: none;
        
        /* Animation states */
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.3s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.6s; }
    
    .nav-links a {
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-color);
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 0.6rem 1.2rem;
        border-radius: 6px;
        transition: all 0.3s ease;
        display: block;
        text-align: center;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        min-width: 160px;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--accent-color);
        background: rgba(0, 247, 255, 0.1);
        transform: scale(1.05);
    }
}
/* Gallery Page Styles */
.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: var(--secondary-color);
  border: 1px solid #333;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 247, 255, 0.15);
}

.gallery-image {
  width: 100%;
  border-radius: 8px 8px 0 0;
  transition: transform 0.5s;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.3));
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  color: var(--text-color);
  margin-bottom: 5px;
  font-size: 1.1rem;
  font-weight: 600;
}

.gallery-overlay p {
  color: #aaa;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

/* Gallery Mobile Responsive */
@media (max-width: 768px) {
  .gallery-masonry {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
  }
  
  .gallery-filter {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .gallery-filter .filter-btn {
    flex: 0 0 auto;
    min-width: auto;
    text-align: center;
    padding: 5px 10px;
    margin: 0 10px 5px 0;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 400;
    font-size: 1rem;
  }
  
  .gallery-item {
    margin-bottom: 15px;
  }
  
  .gallery-image {
    height: 200px !important;
  }
  
  .gallery-overlay {
    position: static;
    transform: none;
    background: var(--secondary-color);
    border-radius: 0 0 8px 8px;
    padding: 15px;
  }
  
  .gallery-overlay h3 {
    font-size: 1rem;
  }
  
  .gallery-overlay p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .gallery-masonry {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .gallery-filter .filter-btn {
    flex: 0 0 auto;
    min-width: auto;
    font-size: 0.9rem;
    padding: 5px 8px;
    margin: 0 8px 5px 0;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 400;
  }
  
  .gallery-image {
    height: 180px !important;
  }
}
/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 247, 255, 0.3);
  object-fit: contain;
  width: auto;
  height: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: var(--text-color);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent-color);
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-color);
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 1rem;
  text-align: center;
}

/* Lightbox Animation */
.lightbox.show {
  display: block;
  animation: fadeIn 0.3s;
}

.lightbox.show .lightbox-content {
  animation: zoomIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: translate(-50%, -50%) scale(0.7); }
  to { transform: translate(-50%, -50%) scale(1); }
}

/* Responsive Lightbox */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 90vw !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  
  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .lightbox-caption {
    bottom: 10px;
    font-size: 0.9rem;
    padding: 8px 16px;
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .lightbox-content {
    max-width: 95vw !important;
    max-height: 75vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  
  .lightbox-close {
    top: 5px;
    right: 15px;
    font-size: 28px;
    width: 35px;
    height: 35px;
  }
  
  .lightbox-caption {
    bottom: 5px;
    font-size: 0.8rem;
    padding: 6px 12px;
    max-width: 95%;
  }
}
/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  animation: whatsappPulse 2s infinite;
}

.whatsapp-button:hover {
  background: #128C7E;
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-button svg {
  width: 30px;
  height: 30px;
}

/* Pulsing Animation */
@keyframes whatsappPulse {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-button {
    width: 55px;
    height: 55px;
  }
  
  .whatsapp-button svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
  }
  
  .whatsapp-button {
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-button svg {
    width: 25px;
    height: 25px;
  }
}
/* Toast Notification System */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: var(--secondary-color);
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  pointer-events: auto;
  min-width: 300px;
  max-width: 400px;
}

.toast-show {
  transform: translateX(0);
  opacity: 1;
}

.toast-hide {
  transform: translateX(100%);
  opacity: 0;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

.toast-icon {
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-color);
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text-color);
}

/* Toast Types */
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
  color: #10b981;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-info {
  border-left: 4px solid var(--accent-color);
}

.toast-info .toast-icon {
  color: var(--accent-color);
}

/* Mobile Responsive Breakpoints */
@media (max-width: 480px) {
  /* Extra small mobile devices */
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-content p {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .navbar {
    padding: 1rem 3%;
  }
  
  .section {
    padding: 30px 3%;
  }
  
  .cube-container {
    width: 150px;
    height: 150px;
  }
  
  .face {
    width: 150px;
    height: 150px;
    font-size: 1.2rem;
  }
  
  .front  { transform: rotateY(0deg) translateZ(75px); }
  .back   { transform: rotateY(180deg) translateZ(75px); }
  .right  { transform: rotateY(90deg) translateZ(75px); }
  .left   { transform: rotateY(-90deg) translateZ(75px); }
  .top    { transform: rotateX(90deg) translateZ(75px); }
  .bottom { transform: rotateX(-90deg) translateZ(75px); }
  
  .cta-button {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  
  .skill-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
  }
  
  /* Mobile Touch Improvements */
  .filter-btn,
  .cta-button,
  .hamburger,
  .nav-links a {
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 44px;
  }
  
  .hamburger {
    padding: 10px;
  }
  
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Better mobile image handling */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* Mobile form improvements */
  input, textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
  }
  
  /* Prevent zoom on input focus for iOS */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  textarea {
    font-size: 16px !important;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 0 5%;
  }
  
  .hero-content {
    padding: 1rem 0;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .nav-links {
    padding: 1rem;
  }
  
  .nav-links a {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image,
  .gallery-image img,
  .work-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Responsive Toast */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
  
  .toast-content {
    padding: 10px 12px;
  }
  
  .toast-message {
    font-size: 13px;
  }
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
  /* Touch-friendly hamburger */
  .hamburger {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
    -webkit-tap-highlight-color: rgba(0, 247, 255, 0.3);
    touch-action: manipulation;
  }
  
  .hamburger:active {
    background: rgba(0, 247, 255, 0.1);
    border-radius: 8px;
  }
  
  /* Ensure hamburger is always visible and clickable */
  .hamburger {
    position: relative;
    z-index: 1002;
  }
  
  /* Better mobile viewport handling */
  .nav-links {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
  }
}

@media (max-width: 480px) {
  /* Extra small mobile devices */
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-content p {
    font-size: 0.9rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .navbar {
    padding: 1rem 3%;
  }
  
  .section {
    padding: 30px 3%;
  }
  
  .cube-container {
    width: 150px;
    height: 150px;
  }
  
  .face {
    width: 150px;
    height: 150px;
    font-size: 1.2rem;
  }
  
  .front  { transform: rotateY(0deg) translateZ(75px); }
  .back   { transform: rotateY(180deg) translateZ(75px); }
  .right  { transform: rotateY(90deg) translateZ(75px); }
  .left   { transform: rotateY(-90deg) translateZ(75px); }
  .top    { transform: rotateX(90deg) translateZ(75px); }
  .bottom { transform: rotateX(-90deg) translateZ(75px); }
  
  .cta-button {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  
  .skill-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
  }
  
  /* Mobile Touch Improvements */
  .filter-btn,
  .cta-button,
  .hamburger,
  .nav-links a {
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 44px;
  }
  
  .hamburger {
    padding: 10px;
  }
  
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Better mobile image handling */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  /* Mobile form improvements */
  input, textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
  }
  
  /* Prevent zoom on input focus for iOS */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  textarea {
    font-size: 16px !important;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 0 5%;
  }
  
  .hero-content {
    padding: 1rem 0;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .nav-links {
    padding: 1rem;
  }
  
  .nav-links a {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image,
  .gallery-image img,
  .work-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
/* Mobile Footer Logo Center - High Specificity */
@media (max-width: 768px) {
  .main-footer .footer-content .footer-section .footer-logo {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 1rem;
  }
  
  .main-footer .footer-content .footer-section .footer-logo a {
    display: inline-block;
  }
  
  .main-footer .footer-content .footer-section .footer-logo img {
    height: 40px !important;
    width: auto !important;
    max-width: 150px !important;
  }
}

@media (max-width: 480px) {
  .main-footer .footer-content .footer-section .footer-logo {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 1rem;
  }
  
  .main-footer .footer-content .footer-section .footer-logo img {
    height: 35px !important;
    width: auto !important;
    max-width: 120px !important;
  }
}
/* Mobile Image Optimization - Comprehensive */
@media (max-width: 768px) {
  /* General Image Optimization */
  img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover;
    object-position: center;
  }
  
  /* Hero Background Mobile - Full Height */
  .hero {
    min-height: 100vh !important;
    height: 100vh !important;
    padding-top: 80px !important; /* Account for navbar */
    position: relative !important;
    overflow: hidden !important;
  }
  
  .hero-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: -1 !important;
    overflow: hidden !important;
  }
  
  .hero-image {
    width: 100% !important;
    height: 100vh !important;
    object-fit: cover !important;
    object-position: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: -2 !important;
    min-height: 100vh !important;
  }
  
  .hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: -1 !important;
  }
  
  .hero-content {
    padding: 2rem 0 !important;
    margin-top: 0 !important;
    z-index: 3 !important;
    position: relative !important;
  }
  
  /* Gallery Images Mobile */
  .gallery-image img,
  .gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  /* Project Images Mobile */
  .work-image img,
  .item-image img,
  .sample-work-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  /* Portfolio Images Mobile */
  .portfolio-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  /* Tutorial Images Mobile */
  .tutorial-image,
  .tutorial-card img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  /* Lightbox Mobile Optimization - Viewport Units */
  .lightbox-content {
    max-width: 90vw !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }
  
  /* Prevent image overflow */
  .hero,
  .gallery-item,
  .portfolio-item,
  .sample-work-item,
  .work-item {
    overflow: hidden;
  }
  
  /* Ensure body doesn't overflow */
  body {
    overflow-x: hidden !important;
  }
}

@media (max-width: 480px) {
  /* Extra Small Mobile Devices */
  .hero {
    min-height: 100vh !important;
    height: 100vh !important;
    padding-top: 80px !important; /* Account for navbar */
    position: relative !important;
    overflow: hidden !important;
  }
  
  .hero-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: -1 !important;
    overflow: hidden !important;
  }
  
  .hero-image {
    width: 100% !important;
    height: 100vh !important;
    object-fit: cover !important;
    object-position: center center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: -2 !important;
    min-height: 100vh !important;
  }
  
  .hero-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: -1 !important;
  }
  
  .hero-content {
    padding: 1.5rem 0 !important;
    margin-top: 0 !important;
    z-index: 3 !important;
    position: relative !important;
  }
  
  .lightbox-content {
    max-width: 95vw !important;
    max-height: 75vh !important;
    object-fit: contain !important;
  }
  
  /* Ensure all images fit screen */
  img {
    max-width: 100vw !important;
    height: auto !important;
  }
}

/* Mobile Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh !important;
    height: 100vh !important;
  }
  
  .hero-background {
    height: 100vh !important;
  }
  
  .hero-image {
    object-fit: cover !important;
    object-position: center !important;
    width: 100% !important;
    height: 100vh !important;
  }
  
  .lightbox-content {
    max-width: 85vw !important;
    max-height: 85vh !important;
    object-fit: contain !important;
  }
}
/* Mobile Horizontal Scroll Prevention - Critical Fix */
@media (max-width: 768px) {
  /* Prevent horizontal overflow on all containers */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  /* Fix common overflow culprits - but exclude hamburger and its children */
  .container,
  .hero,
  .section,
  .footer-content,
  .main-footer {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  /* Fix grid layouts that might overflow */
  .about-grid,
  .portfolio-grid,
  .gallery-masonry,
  .sample-works-grid,
  .skills-grid,
  .contact-grid,
  .tutorials-grid {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  /* Fix hero content */
  .hero-content {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
    padding-top: 2rem !important;
    margin-top: 0 !important;
    z-index: 3 !important;
  }
  
  /* Fix navbar - ensure proper layout */
  .navbar {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 1rem 5% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(15, 15, 17, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    overflow: visible !important;
  }
  
  /* Logo positioning and sizing */
  .logo {
    order: 1 !important;
    z-index: 1002 !important;
    max-width: 60% !important;
    flex-shrink: 0 !important;
  }
  
  .logo img {
    height: 50px !important;
    width: auto !important;
    max-width: 100% !important;
  }
  
  /* HAMBURGER MENU - CRITICAL VISIBILITY FIX */
  .hamburger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    position: relative !important;
    z-index: 1003 !important;
    order: 3 !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
  }
  
  .hamburger span {
    display: block !important;
    width: 25px !important;
    height: 3px !important;
    background: var(--text-color) !important;
    margin: 2px 0 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
    position: relative !important;
    transform-origin: center !important;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px) !important;
    background: var(--accent-color) !important;
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0 !important;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px) !important;
    background: var(--accent-color) !important;
  }
  
  /* Fix sections */
  .section {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
  }
  
  /* Fix footer */
  .main-footer {
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  .footer-content {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: 5% !important;
    padding-right: 5% !important;
  }
  
  /* Fix wide elements - but exclude hamburger and navbar children */
  .section *:not(.hamburger):not(.hamburger *):not(.logo):not(.logo *),
  .hero *:not(.hamburger):not(.hamburger *),
  .main-footer *:not(.hamburger):not(.hamburger *) {
    max-width: 100% !important;
  }
  
  /* Fix images that might cause overflow */
  img:not(.hamburger img):not(.logo img) {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }
  
  /* Fix text that might overflow */
  h1, h2, h3, h4, h5, h6, p, div:not(.hamburger), span:not(.hamburger span) {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix buttons and form elements */
  .cta-button,
  .filter-btn,
  input,
  textarea,
  button:not(.hamburger) {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix navigation menu */
  .nav-links {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    position: fixed !important;
    top: 0 !important;
    height: 100vh !important;
    background: rgba(15, 15, 17, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 1001 !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }
  
  .nav-links.active {
    transform: translateX(0) !important;
  }
  
  .nav-links li {
    margin: 1rem 0 !important;
    list-style: none !important;
    opacity: 0 !important;
    transform: translateX(50px) !important;
    transition: all 0.3s ease !important;
  }
  
  .nav-links.active li {
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
  
  .nav-links a {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: var(--text-color) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    min-width: 160px !important;
  }
  
  /* Fix lightbox */
  .lightbox {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }
}

/* Extra small devices - additional fixes */
@media (max-width: 480px) {
  /* More aggressive overflow prevention for very small screens */
  .section *:not(.hamburger):not(.hamburger *):not(.logo):not(.logo *) {
    max-width: 100% !important;
  }
  
  .hero-content h1 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-content p {
    font-size: 0.85rem !important;
  }
  
  /* Ensure padding doesn't cause overflow */
  .section {
    padding-left: 3% !important;
    padding-right: 3% !important;
  }
  
  .navbar {
    padding: 1rem 3% !important;
  }
  
  .footer-content {
    padding-left: 3% !important;
    padding-right: 3% !important;
  }
  
  /* Smaller hamburger for very small screens */
  .hamburger {
    width: 40px !important;
    height: 40px !important;
  }
  
  .hamburger span {
    width: 22px !important;
  }
}