/* ==========================================================================
   DARSHAN DEVADIGA — RESPONSIVE DESIGN SYSTEM
   Breakpoints: 1440px • 1280px • 1024px • 768px • 640px • 480px • 430px • 390px • 375px • 360px • 320px
   ========================================================================== */

/* Global Anti-Overflow & Mobile Safety */
*, *::before, *::after {
  max-width: 100%;
  box-sizing: border-box;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   1200px & 1280px Desktop Adaptation
   ========================================================================== */
@media (max-width: 1200px) {
  .projects-bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .project-card-hero {
    grid-column: span 6;
    grid-template-columns: 1fr;
  }
  
  .project-card-hero .project-card-media {
    aspect-ratio: 16 / 10;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .project-card-featured {
    grid-column: span 3;
  }

  .project-card-standard {
    grid-column: span 3;
  }
  
  .other-projects-grid {
    grid-template-columns: 1fr;
  }

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

  .panel-col-7,
  .panel-col-5,
  .panel-col-4,
  .panel-col-8,
  .panel-col-12 {
    grid-column: span 1;
  }

  .what-i-bring-grid {
    grid-template-columns: 1fr;
  }

  .bring-col-4,
  .bring-col-6 {
    grid-column: span 1;
  }
}

/* ==========================================================================
   1024px Tablet Landscape
   ========================================================================== */
@media (max-width: 1024px) {
  html {
    scroll-padding-top: 76px;
  }

  .header-wrapper {
    padding-block: 12px;
  }

  .section {
    padding-block: clamp(64px, 7.5vw, 90px);
    scroll-margin-top: 76px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 50px;
    scroll-margin-top: 76px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  
  .hero-supporting {
    margin-inline: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats-row {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .project-card-featured,
  .project-card-standard {
    grid-column: span 6;
  }

  .quick-profile-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }

  .quick-profile-text p {
    margin-inline: auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .nav-pill {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
  
  .mobile-nav-overlay {
    display: flex;
  }

  .case-study-hero {
    padding-top: 110px;
    padding-bottom: 50px;
    scroll-margin-top: 76px;
  }
}

/* ==========================================================================
   768px Tablet Portrait
   ========================================================================== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 72px;
  }

  .header-wrapper {
    padding-block: 10px;
    background: rgba(5, 8, 11, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .nav-container {
    padding-inline: 18px;
  }

  .section {
    padding-block: clamp(52px, 6.5vw, 72px);
    scroll-margin-top: 72px;
  }

  .hero-section {
    padding-top: 100px;
    padding-bottom: 40px;
    scroll-margin-top: 72px;
  }

  .hero-title {
    font-size: clamp(38px, 9vw, 52px);
  }

  .hero-subtitle {
    font-size: clamp(16px, 3.8vw, 20px);
  }

  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .experience-timeline {
    padding-left: 26px;
  }

  .experience-timeline::before {
    left: 7px;
  }

  .exp-node {
    left: -26px;
    top: 28px;
    width: 14px;
    height: 14px;
  }

  .exp-card {
    padding: var(--space-5);
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .projects-bento-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .project-card-hero,
  .project-card-featured,
  .project-card-standard {
    grid-column: span 1;
  }

  .education-timeline-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .quick-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .contact-cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .contact-link-card {
    width: 100%;
    box-sizing: border-box;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-3);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .case-study-hero {
    padding-top: 100px;
    padding-bottom: 40px;
    scroll-margin-top: 72px;
  }

  .case-study-meta-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

/* ==========================================================================
   640px Mobile Landscape & Large Phones
   ========================================================================== */
@media (max-width: 640px) {
  .container {
    width: 100%;
    padding-inline: 16px;
    box-sizing: border-box;
  }

  .nav-container {
    padding-inline: 16px;
  }

  .logo-sub {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-bento-card {
    max-width: 100%;
    width: 100%;
  }

  .filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .filter-btn {
    font-size: 12.5px;
    padding: 6px 14px;
  }
}

/* ==========================================================================
   480px / 430px / 390px / 375px Standard Mobile Phones
   ========================================================================== */
@media (max-width: 480px) {
  html {
    scroll-padding-top: 68px;
  }

  body {
    font-size: 15px;
    overflow-x: hidden;
  }

  /* Compact Fixed Mobile Header */
  .header-wrapper {
    padding-block: 8px;
    background: rgba(5, 8, 11, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-container {
    padding-inline: 14px;
    gap: 8px;
  }

  .nav-logo {
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }

  .logo-symbol {
    width: 32px;
    height: 32px;
    font-size: 14px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .logo-title {
    font-size: 13.5px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .logo-sub {
    display: none;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .nav-cta {
    font-size: 11.5px;
    padding: 6px 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  .menu-toggle {
    width: 34px;
    height: 34px;
    padding: 6px;
    border-radius: 7px;
    flex-shrink: 0;
  }

  /* Section Spacing Below Fixed Header */
  .section {
    padding-block: 48px;
    scroll-margin-top: 68px;
  }

  .section-header {
    margin-bottom: var(--space-5);
  }

  .section-title {
    font-size: clamp(24px, 7.5vw, 32px);
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .section-subtitle {
    font-size: 14px;
    line-height: 1.55;
  }

  /* Hero Section Mobile Spacing & Typography */
  .hero-section {
    padding-top: 86px;
    padding-bottom: 36px;
    min-height: auto;
    scroll-margin-top: 68px;
  }

  .hero-status-pill {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    max-width: 100%;
    margin-bottom: 14px;
    box-sizing: border-box;
  }

  .status-indicator {
    width: 6px;
    height: 6px;
    margin-top: 4px;
    flex-shrink: 0;
  }

  .hero-status-text {
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.05em;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .hero-greeting {
    font-size: 13.5px;
    margin-bottom: 2px;
  }

  .hero-title {
    font-size: clamp(30px, 9.5vw, 40px);
    line-height: 1.1;
    margin-bottom: 4px;
    word-break: break-word;
  }

  .hero-subtitle {
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
  }

  .hero-headline {
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.35;
    margin-bottom: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .hero-supporting {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
    margin-bottom: 20px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 16px;
    font-size: 13.5px;
  }

  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .hero-stat-item {
    padding: 10px 6px;
    border-radius: var(--radius-sm);
  }

  .hero-stat-num {
    font-size: 19px;
  }

  .hero-stat-lbl {
    font-size: 9.5px;
    line-height: 1.3;
  }

  .hero-bento-card {
    padding: 14px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .stage-code-block {
    font-size: 10.5px;
    padding: 6px 10px;
    overflow-x: auto;
  }

  .hero-visual-wrapper::before {
    width: 200px;
    height: 200px;
  }

  .hero-visual-wrapper::after {
    width: 250px;
    height: 250px;
  }

  /* About Section */
  .about-feature-card {
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .about-card-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .about-card-badge svg {
    width: 18px;
    height: 18px;
  }

  .about-feature-title {
    font-size: 16px;
  }

  .about-feature-desc {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Skills Bento */
  .skill-bento-panel {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .skill-category-title {
    font-size: 16px;
  }

  .skill-badge {
    font-size: 11px;
    padding: 4px 9px;
  }

  /* Services Grid */
  .service-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .service-icon-wrap {
    width: 38px;
    height: 38px;
    margin-bottom: 10px;
  }

  .service-card-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .service-card-desc {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Experience Cards */
  .exp-card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .exp-company {
    font-size: 16px;
  }

  .exp-role {
    font-size: 13.5px;
  }

  .exp-list li {
    font-size: 13px;
    padding-left: 16px;
    line-height: 1.5;
  }

  /* Projects */
  .project-card-content {
    padding: 16px 14px;
  }

  .project-card-title {
    font-size: 17px;
    word-break: break-word;
  }

  .project-card-desc {
    font-size: 13px;
    line-height: 1.55;
  }

  .project-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .project-card-link {
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
  }

  .other-project-card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  /* Education */
  .edu-card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .edu-degree {
    font-size: 16px;
  }

  .edu-institution {
    font-size: 13.5px;
  }

  .edu-desc {
    font-size: 13px;
    line-height: 1.55;
  }

  /* What I Bring */
  .bring-card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .bring-card-title {
    font-size: 15.5px;
  }

  .bring-card-desc {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Quick Profile */
  .quick-profile-card {
    padding: 18px 14px;
    border-radius: var(--radius-lg);
  }

  .quick-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  /* Contact Section & 2-Column Horizontal Cards */
  .contact-grid {
    gap: 20px;
  }

  .contact-info-col p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
  }

  .contact-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .contact-link-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .contact-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    margin-bottom: 0;
  }

  .contact-card-label {
    font-size: 10.5px;
    letter-spacing: 0.10em;
  }

  .contact-card-value {
    font-size: 13px;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }

  .contact-cta-box {
    padding: 20px 14px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .contact-cta-box h3 {
    font-size: 20px;
    line-height: 1.25;
    margin-bottom: 6px;
    word-break: break-word;
  }

  .contact-cta-box p {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .contact-cta-box .btn {
    width: 100%;
    justify-content: center;
  }

  /* Case Studies */
  .case-study-hero {
    padding-top: 86px;
    padding-bottom: 36px;
    scroll-margin-top: 68px;
  }

  .case-section-block {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .case-section-heading {
    font-size: 17px;
  }

  .case-study-text p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Browser Mockups */
  .browser-mockup {
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .browser-mockup-header {
    padding: 8px 12px;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  .browser-mockup-address {
    font-size: 10.5px;
    padding: 3px 8px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .browser-mockup-body {
    padding: 20px 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .browser-preview-title {
    font-size: 19px;
    word-break: break-word;
    line-height: 1.25;
  }

  .browser-preview-desc {
    font-size: 12.5px;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .browser-preview-actions {
    width: 100%;
  }

  .browser-preview-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .cursor-spotlight {
    display: none !important;
  }
}

/* ==========================================================================
   360px & 320px Ultra-Small Viewports (Compact Android & iPhone SE)
   ========================================================================== */
@media (max-width: 360px) {
  html {
    scroll-padding-top: 64px;
  }

  .container {
    width: 100%;
    padding-inline: 10px;
    box-sizing: border-box;
  }

  .nav-container {
    padding-inline: 10px;
    gap: 6px;
  }

  .logo-symbol {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 6px;
  }

  .logo-title {
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .nav-cta {
    font-size: 10.5px;
    padding: 5px 9px;
  }

  .menu-toggle {
    width: 30px;
    height: 30px;
    padding: 5px;
    border-radius: 6px;
  }

  .hero-section {
    padding-top: 80px;
    padding-bottom: 30px;
    scroll-margin-top: 64px;
  }

  .hero-title {
    font-size: 27px;
  }

  .hero-subtitle {
    font-size: 12px;
  }

  .hero-headline {
    font-size: 17px;
  }

  .hero-supporting {
    font-size: 13px;
  }

  .hero-stats-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .quick-stats-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-link-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
  }

  .contact-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-bottom: 0;
  }

  .contact-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .contact-card-label {
    font-size: 10px;
  }

  .contact-card-value {
    font-size: 12px;
  }

  .filter-btn {
    font-size: 11px;
    padding: 5px 10px;
  }

  .case-study-hero {
    padding-top: 80px;
    padding-bottom: 30px;
    scroll-margin-top: 64px;
  }

  .browser-mockup-address {
    max-width: 120px;
    font-size: 9.5px;
  }
}

