/* Approved mobile and tablet layout refinements. Desktop styles remain unchanged. */
@media (max-width: 991px) {
  :root { --mobile-gutter: clamp(20px, 5.5vw, 32px); }
  #portfolio-content :is(.wrapper,.normal-wrapper,.skills-wrapper,.project-wrapper,.hero-text-block) { min-width:0; }
  #portfolio-content :is(h1,h2,h3,p,a) { overflow-wrap:break-word; }
  #portfolio-content :is(.paragraph_18px,.paragraph_16px) { text-align:left;line-height:1.65; }
  #portfolio-content .project-description a { overflow-wrap:anywhere; }
  #portfolio-content :is(.animated-link-button,.social-link-block,.menu-button) {
    min-height:44px; min-width:44px;
  }
  #portfolio-content .animated-link-button { display:inline-flex;align-items:center;max-width:100%; }
  #portfolio-content :is(a,button,[tabindex]):focus-visible { outline:2px solid #c5acff;outline-offset:4px; }
  #portfolio-content .contact-booking .cal-inline-widget { min-width:0!important;width:100%; }
  #portfolio-content .project-description { padding:clamp(22px,4vw,32px); }
  #portfolio-content .footer-row { grid-template-columns:1fr;gap:24px;justify-items:center; }
  #portfolio-content .footer-horizontal :is(.footer-logo,.footer-socials,.copyrights) { grid-column:1;grid-row:auto;justify-self:center; }
  #portfolio-content .footer-horizontal .footer-logo { grid-row:1;max-width:420px; }
  #portfolio-content .footer-socials { justify-content:center;gap:12px; }
  #portfolio-content .footer-horizontal .social-link-block { margin:0;display:flex;align-items:center;justify-content:center; }
  #portfolio-content .footer-horizontal .copyrights { text-align:center;font-size:12px;line-height:1.8; }
  #portfolio-content .footer { padding:48px var(--mobile-gutter) max(40px,env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) {
  #portfolio-content .nav-bar { padding-inline:var(--mobile-gutter); }
  #portfolio-content .hero-header-glass { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:72px; }
  #portfolio-content .brand { margin:0;max-width:calc(100% - 60px); }
  #portfolio-content .brand .logo-img { width:clamp(200px,61vw,280px);height:auto; }
  #portfolio-content .menu-button { flex:none;margin:0;padding:12px; }
  #portfolio-content .nav-bar .menu-button::before { inset:0; }
  #portfolio-content .nav-menu .nav-link { padding:18px 24px;min-height:56px; }
  #portfolio-content .hero-section { height:auto;max-height:none; }
  #portfolio-content .hero-image-box { height:clamp(260px,40svh,400px); }
  #portfolio-content .hero-text-block { position:relative;z-index:2; }
  #portfolio-content .hero-text-block { padding:32px var(--mobile-gutter) 48px;background:linear-gradient(145deg,rgba(28,21,48,.88),rgba(15,12,27,.88)); }
  #portfolio-content .heading_76px { font-size:clamp(29px,7.5vw,42px);line-height:1.15;letter-spacing:-.025em;margin-bottom:24px; }
  #portfolio-content .heading_76px .white_50 { font-size:.72em;letter-spacing:0; }
  #portfolio-content :is(.heading_55px,.heading_linkedin,.certificate-heading) { font-size:clamp(28px,7.2vw,38px);line-height:1.17;letter-spacing:-.025em;text-wrap:balance; }
  #portfolio-content .heading_24px { font-size:clamp(21px,5.2vw,24px);line-height:1.35; }
  #portfolio-content .paragraph_18px { font-size:16px; }
  #portfolio-content .paragraph_16px { font-size:16px; }
  #portfolio-content > :is(.experience-section,.education-section,.skills-section,.projects-section,.research-section,.testimonial-section,.forms-section) { padding:64px var(--mobile-gutter);min-height:0; }
  #portfolio-content .wrapper:is(.projects-grid,.sticky-grid,.grid-3_col) { grid-template-columns:minmax(0,1fr);gap:32px; }
  #portfolio-content .experience-grid { gap:32px; }
  #portfolio-content .experience-block { padding-top:24px;border-top:1px solid rgba(218,199,255,.16); }
  #portfolio-content .number { font-size:72px;line-height:1.1;margin-bottom:16px; }
  #portfolio-content .skills-wrapper { padding-top:24px;border-top:1px solid rgba(218,199,255,.16); }
  #portfolio-content ._80px-bottom_m { margin-bottom:32px; }
  #portfolio-content ._120px-bottom_m { margin-bottom:40px; }
  #portfolio-content .philosophy-floating { width:calc(100% - var(--mobile-gutter)*2); }
  #portfolio-content .mid_left-block.instagram { height:auto;max-height:none;padding:32px 24px;gap:24px; }
  #portfolio-content .philosophy-values-copy > .normal-wrapper { flex:initial; }
  #portfolio-content .philosophy-values-copy .philosophy-copy { overflow:visible; }
  #portfolio-content .philosophy-values-copy .paragraph_18px { font-size:16px;line-height:1.65; }
  /* Keep the existing photo size and crop, without adding image zoom. */
  #portfolio-content .philosophy-floating .mid_image { height:450px; }
  #portfolio-content .instagram-note { font-size:14px;line-height:1.6; }
  #portfolio-content .testimonial-text { padding:24px; }
  #portfolio-content .testimonial-text .heading_24px { font-size:19px;line-height:1.65; }
  #portfolio-content .testimonial-text ._64px-bottom_m { margin-bottom:28px; }
  #portfolio-content .testimonial-text > :is(.heading_18px,.paragraph_16px) { text-align:center; }
  #portfolio-content .certificates-section { padding-block:64px; }
  #portfolio-content .certificate-heading { padding-inline:var(--mobile-gutter);margin-bottom:24px; }
  #portfolio-content .certificates-gallery { scroll-padding-inline:var(--mobile-gutter);scroll-snap-type:x proximity; }
  #portfolio-content .certificates-track { padding-inline:var(--mobile-gutter);gap:16px; }
  #portfolio-content .certificate-card { width:calc(100vw - var(--mobile-gutter)*2 - 24px);height:clamp(220px,34svh,310px);padding:10px; }
  #portfolio-content .certificate-more { width:calc(100vw - var(--mobile-gutter)*2 - 24px); }
  #portfolio-content .footer-horizontal .footer-logo { max-width:360px; }
}
@media (min-width:768px) and (max-width:991px) {
  #portfolio-content .hero-header-glass { display:flex;align-items:center;justify-content:space-between;gap:16px; }
  #portfolio-content .brand { margin:0;flex:0 1 220px;min-width:0; }
  #portfolio-content .brand .logo-img { width:100%;height:auto; }
  #portfolio-content .nav-menu { flex-shrink:0; }
  #portfolio-content .heading_55px { font-size:40px;line-height:1.2;text-wrap:balance; }
  #portfolio-content .experience-grid { gap:20px; }
  #portfolio-content .experience-block { padding-right:0; }
  #portfolio-content .philosophy-floating { align-items:stretch; }
  #portfolio-content .insta-section { height:auto; }
  #portfolio-content .mid_left-block.instagram { height:auto;max-height:none;min-height:600px;padding:32px; }
  #portfolio-content .philosophy-copy { overflow:visible; }
  #portfolio-content .philosophy-floating .mid_image { height:auto;min-height:600px; }
}
