/* Responsive styles for screens under 1024px */
@media (max-width: 1024px) {
  /* Remove full viewport constraints on sections */
  .section {
    height: auto;
    width: 100%;
    min-height: auto;
    padding: 0;
  }

  .hero-section {
    height: auto;
    min-height: 100vh;
  }

  .content {
    padding: calc(var(--spacing-unit) * 10) 1.34rem calc(var(--spacing-unit) * 5);
  }

  .about-section {
    width: 100%;
    height: auto;
    min-height: auto;
  }

  .about-container {
    padding: calc(var(--spacing-unit) * 8) 1rem;
  }

  .contact-section {
    min-height: auto;
    width: 100%;
  }

  .contact-section h2 {
    justify-content: center;
    display: flex;
    text-align: center;
    margin-bottom: 0;
  }

  .contact-container {
    padding: calc(var(--spacing-unit) * 8) 1.5rem;
  }

  .footer {
    height: auto;
    width: 100%;
    padding: calc(var(--spacing-unit) * 8) 0 calc(var(--spacing-unit) * 4);
  }

  .error-section {
    width: 100%;
    height: auto;
    min-height: 100vh;
    padding: calc(var(--spacing-unit) * 10) 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  .logo {
    font-size: 1.4rem;
  }

  /* Hero section adjustments */
  .main-heading {
    font-size: clamp(2rem, 15vw, 4rem);
  }

  .subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    max-width: 100%;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.6rem 1.2rem;
  }

  .cta-buttons {
    flex-direction: row;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    font-size: 0.85rem;
    padding: 1rem 1.5rem;
  }

  /* Blob animations - reduce size */
  .blob1 {
    width: 250px;
    height: 250px;
  }

  .blob2 {
    width: 200px;
    height: 200px;
  }

  .blob3 {
    width: 225px;
    height: 225px;
  }

  .cursor-glow {
    width: 300px;
    height: 300px;
  }

  /* About section */
  .about-container {
    width: 90%;
  }

  .about-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .about-intro {
    font-size: 1rem;
    max-width: 100%;
  }

  .about-h2,
  .about-h3 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }

  .about-p {
    font-size: 1.1rem;
    line-height: 1.5;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }

  .skill-category {
    padding: 1rem;
  }

  .skill-category h4 {
    font-size: 0.95rem;
  }

  .skill-category li {
    font-size: 0.75rem;
  }

  body.about .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
  }

  body.about .skills-container {
    width: 90%;
  }

  /* Projects section */
  .projects-container {
    width: 90%;
  }

  .project-heading {
    font-size: 1.75rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
  }

  .project-image {
    height: 180px;
  }

  .project-content {
    padding: calc(var(--spacing-unit) * 1.5);
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-description {
    font-size: 0.85rem;
  }

  .tag {
    font-size: 0.7rem;
    padding: calc(var(--spacing-unit) / 2.5) calc(var(--spacing-unit) * 0.8);
  }

  body.projects .main-heading {
    margin-top: 7rem;
  }

  body.projects .projects-container {
    margin-top: 5rem;
  }

  body.about .main-heading {
    margin-top: 7rem;
  }

  /* Contact section */
  .contact-container {
    gap: 2rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .form-group {
    padding-right: 0;
  }

  h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  body.contact h1 {
    font-size: 2rem;
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 5rem;
  }

  /* Footer */
  .footer-content {
    width: 90%;
    height: auto;
    padding: calc(var(--spacing-unit) * 2) 0;
  }

  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
  }

  .footer-column h3 {
    font-size: 1rem;
  }

  .footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .copyright {
    font-size: 0.75rem;
  }

  /* Error page */
  .error-code {
    font-size: clamp(5rem, 15vw, 10rem);
  }

  .error-title {
    font-size: clamp(1.3rem, 4vw, 2rem);
  }

  .error-message {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    padding: 0 1rem;
  }

  .back-button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  /* Container adjustments */
  .container {
    padding: 0 calc(var(--spacing-unit) * 2);
  }

  /* Scroll indicator - hide on tablet */
  .scroll-indicator {
    display: none;
  }
}

/* Mobile specific styles (under 768px) */
@media (max-width: 768px) {
  .content {
    padding: calc(var(--spacing-unit) * 8) 0.67rem calc(var(--spacing-unit) * 4);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    display: flex;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--background);
    border-top: 1px solid var(--color-border);
    padding: calc(var(--spacing-unit) * 2);
    gap: calc(var(--spacing-unit) * 1.5);
    margin-top: 0;
    height: 100vh;
  }

  .nav-menu li {
    list-style: none;
    padding: 20px 0px;
    border-bottom: 1px solid var(--text);
    padding-left: 2rem;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .about-container {
    padding: calc(var(--spacing-unit) * 6) 0.67rem;
  }

  .contact-container {
    padding: calc(var(--spacing-unit) * 6) 1rem;
  }

  /* Typography */
  .subtitle {
    font-size: 0.875rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  /* Buttons */
  .btn-primary,
  .btn-secondary {
    font-size: 0.8rem;
    padding: 0.875rem 1.25rem;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 1.5);
  }

  .projects-container {
    width: 92%;
  }

  .project-heading {
    font-size: 2rem;
    margin-top: 3rem;
  }

  /* About */
  .about-container {
    width: 92%;
  }

  .about-me-container {
    max-width: 85%;
    margin-top: 2rem;
  }

  .about-intro {
    font-size: 0.95rem;
  }

  .about-p {
    font-size: 1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  body.about .skills-grid {
    grid-template-columns: 1fr;
  }

  body.about .skills-container {
    width: 92%;
  }

  /* Contact */
  .contact-container {
    gap: 1.5rem;
  }

  .contact-form {
    padding: 1.25rem;
  }

  h1 {
    font-size: 2rem;
  }

  body.contact h1 {
    font-size: 1.75rem;
  }

  .feature-item {
    flex-direction: row;
    text-align: center;
    align-items: center;
  }

  .feature-content {
    margin: 0 auto;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-column a:hover {
    transform: none;
  }

  /* Error page */
  .error-code {
    font-size: clamp(4rem, 12vw, 8rem);
  }

  .error-title {
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  }

  .back-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Blobs - further reduce */
  .blob1 {
    width: 200px;
    height: 200px;
  }

  .blob2 {
    width: 160px;
    height: 160px;
  }

  .blob3 {
    width: 180px;
    height: 180px;
  }

  .cursor-glow {
    width: 250px;
    height: 250px;
  }
}

/* Small mobile devices (under 480px) */
@media (max-width: 480px) {
  .content {
    padding: 0 7.5vw;
  }

  .projects-container,
  .about-container {
    width: 95%;
  }

  .container {
    padding: 0 calc(var(--spacing-unit) * 1.5);
  }

  .project-heading {
    font-size: 2rem;
    margin-top: 2.5rem;
  }

  .contact-form {
    padding: 1rem;
  }

  .form-group {
    gap: 0.4rem;
  }

  input,
  textarea {
    padding: 0.65rem 0.875rem;
    padding-right: 0;
    font-size: 0.95rem;
  }

  button[type="submit"] {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }

  .footer-content {
    width: 95%;
  }
}

/* Tablets and small desktops (≤ 1024px) */
@media (max-width: 1024px) {
  .project-content {
    gap: 2rem;
    flex-direction: column;
    align-items: center;
  }

  .text {
    max-width: 90%;
  }

  .images {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .images img {
    width: 45%;
    height: auto;
  }
}

/* Large phones and tablets (≤ 768px) */
@media (max-width: 768px) {
  .project {
    padding: 2rem;
  }

  .title {
    font-size: 2rem;
  }

  .site-tagline {
    font-size: 1rem;
  }

  .quote {
    padding-left: 0.75rem;
  }

  .images img {
    width: 100%;
    max-width: 320px;
  }
}

/* Small phones (≤ 480px) */
@media (max-width: 480px) {
  .project {
    padding: 1.5rem;
  }

  .title {
    font-size: 1.6rem;
  }

  .text {
    line-height: 1.6;
  }

  .images {
    gap: 0.75rem;
  }

  .images img {
    width: 100%;
    height: auto;
  }
}

body.site .project {
    text-align: left !important;
}